Re: How do perform Incremental backup using tar or CPIO (369 Views)
Reply
Super Advisor
Henry Chua
Posts: 444
Registered: ‎09-05-2004
Message 1 of 8 (369 Views)
Accepted Solution

How do perform Incremental backup using tar or CPIO

Hi guys,

I have 2 system one running UX the other on Sun. I want to periodically perform incremental backup from UX to sun. I have set up the /.rhost in both system. But is the best way to do this? Any suggestion? if I am using tar or CPIO how to I go about doin it?

Thanks & regards
Henry
Please use plain text.
Honored Contributor
Eric Antunes
Posts: 1,931
Registered: ‎06-15-2003
Message 2 of 8 (369 Views)

Re: How do perform Incremental backup using tar or CPIO

Hi,

Where is the tape? In the Sun server?? If so why don't simply copy files to a backup directory on Sun server and tar them later? I've a similar backup strategy here, only with 2 UX servers...

To do a incremental backup on the tape you run:

#tar rv

Regards,

Eric
Each and every day is a good day to learn.
Please use plain text.
Honored Contributor
Sridhar Bhaskarla
Posts: 6,350
Registered: ‎08-15-2001
Message 3 of 8 (369 Views)

Re: How do perform Incremental backup using tar or CPIO

Hi Henry,

I assume you mean HP-UX when you said UX.

'fbackup' is your best bet on HP-UX as it can handle incremental backups very effectively. You can specify a file (in a filesystem) instead of tape drive to create the archive with fbackup. You can use the following command

/usr/sbin/fbackup -i /dir1 -i /dir2 -f - |remsh sun_server dd of=/filesystem/hpux.fbackup bs=1024k

use the options -0 to -9 depending on the level of incremental backup. 'man fbackup' for more options. Remember, the above is only if you are writing into the filesystem not to the tape.

'tar' and 'cpio' do not support incremental backups. You will have to use GNU's tar.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Please use plain text.
Super Advisor
Henry Chua
Posts: 444
Registered: ‎09-05-2004
Message 4 of 8 (369 Views)

Re: How do perform Incremental backup using tar or CPIO



yes Sri I meant HPUX..
The problem is that I need to perform this backup to a solaris 8 box.. i dun think fbackup is supported on system other than HPUX. Thank u Eric for your advise.. but what I meant is to actually backing up one of my UX mountpt say /HOST1 to a mount pt I created on the Sun system say /HOST1_backup.. what will be the usual practise in this case?

thank u all for your support!

Please use plain text.
Honored Contributor
Eric Antunes
Posts: 1,931
Registered: ‎06-15-2003
Message 5 of 8 (369 Views)

Re: How do perform Incremental backup using tar or CPIO

Well,

Here I use NFS to copy files from one server to the other but I don't know if there is any way to connect those 2 different OS servers with NFS...?

What do mean by incremental? I've already heared about this in one course but, since I don't use this strategy, I don't remember?

Did you checked the tar manual? There may be an interesting key to do what you want:

#tar uv (not rv like I posted before...)

Another idea is to explore a FTP strategy...

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Please use plain text.
Acclaimed Contributor
A. Clay Stephenson
Posts: 17,825
Registered: ‎07-16-1998
Message 6 of 8 (369 Views)

Re: How do perform Incremental backup using tar or CPIO

If you are wanting to do incrementals with tar or cpio then all the work is going to have to be done by you. Basically, you would do a full backup and create a reference file using touch with a timestamp of the time of the full backup. You then use find -newer reffile to find all files modified and feed that list to cpio or tar. You should consider using the Gnu version of tar on both ends since it can handle files up to 8GB.

A much easier solution is to use rdist that is run periodically to transfer the changed files. Man rdist for details. Another option is to download and install rsync; like rdist it's also available for Sun rdist.

If it ain't broke, I can fix that.
Please use plain text.
Honored Contributor
Sridhar Bhaskarla
Posts: 6,350
Registered: ‎08-15-2001
Message 7 of 8 (369 Views)

Re: How do perform Incremental backup using tar or CPIO

Henry,

As long as you will be able to write into the filesystem of SUN server, you should be able to use the example command I gave you to backup. Try it and see.

However, it is not going to work if you want to use the tape drive on the SUN box because fbackup itself needs to handle the tape drive directly.

GNU tar which can be downloaded from the porting center can be used for incremental backup on HP. Then you can pipe the output to your remsh and to the remote tape drive if you want.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Please use plain text.
Super Advisor
Henry Chua
Posts: 444
Registered: ‎09-05-2004
Message 8 of 8 (369 Views)

Re: How do perform Incremental backup using tar or CPIO

Hi Sri,

for this setting:

Source:
Hostname: host1
path: /users/HOST3
filesystem: hfs

target:
Hostname: host2
path: /home/HOST3_BACKUP
filesystem: ufs

is this command correct?

/usr/sbin/fbackup -i /users/HOST3
-i /home/HOST3_BACKUP -f - |remsh sun_server dd of=/filesystem/hpux.fbackup bs=1024k

can u roughly explain wat each section of this command does and what does different level of incremental backup i.e. fom 1-9 means?

Thank u so much..!!
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation