Operating System - HP-UX
1826644 Members
3448 Online
109695 Solutions
New Discussion

Copying large amount of data to a NFS mounted directory.

 
Mark Hoensheid
Advisor

Copying large amount of data to a NFS mounted directory.

I am running HPUX 11.11 on a L2000 box. We are looking to copy or mv a large number of data/files daily to a NFS mounted directory to another HPUX system. The cp right now takes about 3 Hrs. and I was wondering what the best way to cp just the files that have changed on a daily basis. This would help tremendously....

Thanks in advance...
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: Copying large amount of data to a NFS mounted directory.

Hi:

My first thought is to leverage the incremental backup capabilities of 'fbackup'.

You could "collect" the updated files inot a directory of choice with 'frecover' and then copy only the "recovered" files. Something like:

# cd /realdir
# fbackup -1 ???i . ???f - | (cd /tempdir; frecover ???Xsrf

Have a look at the 'fbackup' man pages for more information.

Regards!

...JRF...

Darren Prior
Honored Contributor

Re: Copying large amount of data to a NFS mounted directory.

Hi,

Here's an alternative to James' neat solution, this time using cpio:

You'd need to touch -t the file /tmp/nfsbackup with an appropriate time before you first used it.

cd /dir2backup
find . -newer /tmp/nfsbackup | cpio -pdmulv /backupdest
touch /tmp/nfsbackup

regards,

Darren.
Calm down. It's only ones and zeros...
James R. Ferguson
Acclaimed Contributor

Re: Copying large amount of data to a NFS mounted directory.

Hi (again):

Sorry, I dropped part of the command. It should be:

# cd /realdir
# fbackup -1 ???i . ???f - | (cd /tempdir; frecover ???Xsrf -)

...JRF...

Mark Hoensheid
Advisor

Re: Copying large amount of data to a NFS mounted directory.

Thanks James & Darren for your suggestions.

I think the CPIO will work just fine. I am running a test right now to see which will be quicker.

I couldn't get fbackup going to a mounted nfs directory before? I didn't spend a whole lot of time on it though..

Thanks again...
Steven E. Protter
Exalted Contributor

Re: Copying large amount of data to a NFS mounted directory.

Another probably inferior suggestion.

set $TmpDirList to location to check

set DAYS to 1 for anything modified in the last day.

find ${TmpDirList} -type f -mtime +${DAYS} -print > /tmp/filelist

You can read the filelist in a script and cpio tar your files into a backukp.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ed Mitchell_1
Advisor

Re: Copying large amount of data to a NFS mounted directory.

fbackup -n to cross nfs mount points
if it ain't broke, don't patch it.
A. Clay Stephenson
Acclaimed Contributor

Re: Copying large amount of data to a NFS mounted directory.

Plan C. Use rdist. It will take care of most of the decisions on which files need updating automatically. Man rdist for details.
If it ain't broke, I can fix that.