- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem about "rsync"
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2007 05:35 AM
тАО10-06-2007 05:35 AM
rp7400 /source is my source data
rp8400 /dest is my destination data.
I want to sync /source directory to the directory /dest on the machine rp8400.
If any of the files already exist on the destination system then the rsync remote-update protocol is used to update the file by
sending only the differences.
I have install "rsync" on both servers.
Could you give me some sample to let me know how to use this tool name "rsync"
Thanks,louis
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2007 05:57 AM
тАО10-06-2007 05:57 AM
Re: Problem about "rsync"
Here's the main rsync site:
http://samba.anu.edu.au/rsync/
Here's the rsync man page online:
http://samba.anu.edu.au/ftp/rsync/rsync.html
Here are other rsync examples:
http://samba.anu.edu.au/rsync/examples.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2007 06:36 AM
тАО10-06-2007 06:36 AM
Solutionrsync -avz -e ssh \
--delete \
--exclude=.glancerc_hp \
--exclude=.sh_history \
--include=.ssh/authorized_hosts \
--exclude=.ssh/id* \
--exclude=.ssh/known_hosts \
--exclude=.sw \
--exclude=work \
--exclude=junk \
--exclude=adviser.out \
--exclude=Mail \
--exclude=.profile \
--exclude=pubring.gpg \
--exclude=secring.gpg \
--exclude=.gpmhp_atlig0 \
--exclude=.lsof_atlig0 \
--rsync-path=/usr/local/bin/rsync \
$HOME/ $MYSYS:$HOME
This example is used to sync all the files in $HOME (the user's home directory) to the same directory on $MYSYS -- where $MYSYS is the remote computer name. The -avz options are in the man page and you will need to choose your login method (ie, remsh/rsh or ssh). My example uses ssh and is recommended (but you must be running ssh on both machines). Notice the --delete (that's correct, two - signs in front of exclude, per the man page) will remove files that do not (or no longer) exist at the source. The --exclude= shows which source files and/or directories are to be ignored and not sent to the destination.
The -rsync option is a helper for the destination system to locate it's copy of rsync, normally not required but use if needed. The last two parameters are the source, but NOTICE THE TRAILING / on the first $HOME. This tells the destination not to start another directory at the destination, but to put everything into the last parameter, in this case $HOME with no trailing /.
Now before you run rsync on a really big and important source, test it in a /tmp directory. Change files on both ends and watch how rsync handles the additions, deletions and changes.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2007 08:01 AM
тАО10-06-2007 08:01 AM
Re: Problem about "rsync"
-e ssh ensures the data stream is encrypted.
Here is a rl example.
rsync -avH --stats --delete -e ssh /var/httpd/ $othernode:/var/httpd/
othernode variable is set to the destination node.
You might want to be careful with the --delete option
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2007 09:12 PM
тАО10-06-2007 09:12 PM
Re: Problem about "rsync"
/usr/bin/rsync -avuzgp \
--delete-after \
--exclude 'lost+found' \
--rsh=ssh \
--rsync-path=/usr/bin/rsync \ remote_host:/remote_dir \
/local_dir
--delete-after deletes after the transfer
--rsh=ssh the default is remote shell (rsh): use ssh instead of it
--rsync-path=/usr/bin/rsync if you are working with 2 different unix flavors (HP-UX locally, linux remotely in this example) this tells rsync where to find the rsync command remotely, otherwise it will not work (if the remote path of rsync is different from the local one)
hope this helps
Enrico