Solved

HPUX

Posted on 2011-03-19
6
525 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 40

Accepted Solution

by:
jlevie earned 250 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 250 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now