Operating System - HP-UX
1752782 Members
5645 Online
108789 Solutions
New Discussion юеВ

Re: How do perform Incremental backup using tar or CPIO

 
SOLVED
Go to solution
Henry Chua
Super Advisor

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
7 REPLIES 7
Eric Antunes
Honored Contributor

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.
Sridhar Bhaskarla
Honored Contributor
Solution

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
Henry Chua
Super Advisor

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!

Eric Antunes
Honored Contributor

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.
A. Clay Stephenson
Acclaimed Contributor

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.
Sridhar Bhaskarla
Honored Contributor

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
Henry Chua
Super Advisor

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..!!