[opensuse] usage of rsync to sync to remote websites
I think this is possible but don't know how to code it. Need to rsync prod.com to a subdirectory in backup.com Thanks, Duaine -- Duaine Hechler Piano, Player Piano, Pump Organ Tuning, Servicing & Rebuilding Reed Organ Society Member Florissant, MO 63034 (314) 838-5587 dahechler@att.net www.hechlerpianoandorgan.com -- Home & Business user of Linux - 10 years -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Duaine & Laura Hechler wrote:
I think this is possible but don't know how to code it.
Need to rsync prod.com to a subdirectory in backup.com
Thanks, Duaine
**NOTE: The -n option means "dry run" use it for testing, just remove it to do the actual copy. The option -v is verbose output, don't use it if you don't want to see the name of each file as it is copied. Add the --delete option to make sure that backup.com is an exact duplicate of prod.com and that no files deleted on prod.com after the first rsync don't remain on backup.com subsequent to their deletion on prod.com. If on different machines across the internet and you are not on either one: rsync -avne ssh authorized_user@prod.com:/path/to/prod.com/document/root \ authorized_user@backup.com:/path/to/subdirectory **NOTE: no trailing slash after ../root If on backup.com and prod.com is across internet: rsync -avne ssh authorized_user@prod.com:/path/to/prod.com/document/root \ /path/to/subdirectory If both prod.com and backup.com are on the same lan and you are on backup.com box (no "e -ssh" needed) rsync -avn authorized_user@prod.com:/path/to/prod.com/document/root \ /path/to/subdirectory remove the 'n' when you have it the way you want it! -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
David, Looks good except both are ISPs that do not allow ssh. Duaine David C. Rankin wrote:
Duaine & Laura Hechler wrote:
I think this is possible but don't know how to code it.
Need to rsync prod.com to a subdirectory in backup.com
Thanks, Duaine
**NOTE: The -n option means "dry run" use it for testing, just remove it to do the actual copy. The option -v is verbose output, don't use it if you don't want to see the name of each file as it is copied. Add the --delete option to make sure that backup.com is an exact duplicate of prod.com and that no files deleted on prod.com after the first rsync don't remain on backup.com subsequent to their deletion on prod.com.
If on different machines across the internet and you are not on either one:
rsync -avne ssh authorized_user@prod.com:/path/to/prod.com/document/root \ authorized_user@backup.com:/path/to/subdirectory
**NOTE: no trailing slash after ../root
If on backup.com and prod.com is across internet:
rsync -avne ssh authorized_user@prod.com:/path/to/prod.com/document/root \ /path/to/subdirectory
If both prod.com and backup.com are on the same lan and you are on backup.com box (no "e -ssh" needed)
rsync -avn authorized_user@prod.com:/path/to/prod.com/document/root \ /path/to/subdirectory
remove the 'n' when you have it the way you want it!
-- Duaine Hechler Piano, Player Piano, Pump Organ Tuning, Servicing & Rebuilding Reed Organ Society Member Florissant, MO 63034 (314) 838-5587 dahechler@att.net www.hechlerpianoandorgan.com -- Home & Business user of Linux - 10 years -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Duaine & Laura Hechler wrote:
David,
Looks good except both are ISPs that do not allow ssh.
Duaine
Bummer, However, all may not be lost. Man page: "You can also specify any remote shell you like, either by using the -e command line option, or by setting the RSYNC_RSH environment variable." -e, --rsh=COMMAND specify the remote shell to use ssh is just the default. Check with the ISP and find out what is available and give that a try. Alternatively, why not use wget, then create a tar gzipped or bzipped2 file and send that to backup.com? wget has several options that will allow you to pretty much get just what you need. Take a look at the following options: wget -r -nH -v --cut-dirs=3 --progress=bar http://prod.com -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
David C. Rankin
-
Duaine & Laura Hechler