linux:rsync

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
linux:rsync [2020/03/26 10:32] michaellinux:rsync [2020/03/26 10:42] – [Rsync Examples] michael
Line 37: Line 37:
  
 <WRAP center box 100%> <WRAP center box 100%>
-==== Copy/Sync Files and Directory Locally ====+==== Basic Copy/Sync Files and Directory ====
  
-<code>$ rsync --e "ssh -p 14022/local/dir user@host:/backup/dir</code> +<wrap em>Attention</wrap>: the examples still have a "--dry-runin them. If you want to copy data effectively and not only test the command, you have to remove this parameter
-</WRAP>+
  
 +----
  
 +  * ''Copy/Sync Files and Directory locally'' <code>$ rsync -av /mnt/sourcefiles/webproject1/* /var/www/html/webproject1/ --delete --dry-run</code>
  
-<WRAP center box 100%+  * ''Copy/Sync Files and Directory from a Server to local'' <code>$ rsync -av remote.serverdomain.com:/volume1/stuff/folder/ /mnt/localstorage/folder/other-folder/ --delete --dry-run</code
-==== Copy/Sync Files and Directory to or From a Server ==== +  * ''Copy/Sync Files and Directory from local to a Server'' <code>$ rsync -av remote.serverdomain.com:/volume1/stuff/folder/ /mnt/localstorage/folder/other-folder/ --delete --dry-run</code>
  
-<code>$ rsync -av remote.serverdomain.com:/volume1/stuff/folder/ /mnt/localstorage/folder/other-folder/ --delete --dry-run</code> 
 </WRAP> </WRAP>
  
Line 56: Line 55:
  
 To use another port with rsync, you can use the ''-e'' option to create an ssh tunnel and then using normal ssh parameter: To use another port with rsync, you can use the ''-e'' option to create an ssh tunnel and then using normal ssh parameter:
 +
  
 <code>$ rsync -a -e "ssh -p 14022" /local/dir user@host:/backup/dir</code> <code>$ rsync -a -e "ssh -p 14022" /local/dir user@host:/backup/dir</code>
  • linux/rsync.txt
  • Last modified: 2020/03/26 10:43
  • by michael