Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

HPUX

Posted on 2011-03-19
6
Medium Priority
?
560 Views
Last Modified: 2012-05-11
i need to copy an entire directory to a nfs share - then I would like to copy only the changed filed to the nfs share. to copy only the changed files - so far i have this

find / -type f -xdev -mtime -1 -print | xargs ll | sort -rn -k5

I was wondering if it would work to pipe this find's output into a file - then somehow use the file to use the rcp command to copy only the changed files to my nfs share, would this be possible?
0
Comment
Question by:JeffBeall
  • 2
  • 2
  • 2
6 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 35174944
FYI, you don't need to use "| xargs ll | sort -rn -k5"

you can direct the output of the find command to a file for later use.

eg:
find / -type f -xdev -mtime -1 -print >/tmp/myfilelist

and create a tar ball for the files in the list
tar -cvf /tmp/mtfile.tar `cat /tmp/myfilelist`

to make backup and restore easier, you should use related path to create the list.
eg
cd /
find . -type f -xdev -mtime -1 -print >/tmp/myfilelist

you can also use find + cp to copy files in one go, pleae look at the example
in http:Q_22575711.html

for more details.
Have a nice weekend!
0
 
LVL 40

Expert Comment

by:jlevie
ID: 35175669
There's a better way. Use rync to copy the changed files. As an example if /mnt/target is the nfs mount point and /home/files is the directory to be mirrored to the nfs mount point, the following command will sync the two directories:

rsync -av --delete /home/files/ /mnt/nfs

See "man rsync" for more information.
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 35177056
I don't have rsyn. It is not in HPUX which is what my server runs.
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 40

Accepted Solution

by:
jlevie earned 1000 total points
ID: 35177309
Download the sources from http://rsync.samba.org/download.html and build & install it.
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 1000 total points
ID: 35177585
agreed with jlevie, rsync is a better tool for backup.

You can downlaod the binary package for HP-UX from:
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/rsync-3.0.7/

Please remember to download and install all the dependencies packages. (just follow the links in the download page).
0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 35180632
thank you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question