User Tools

Site Tools


computing:rsyncrsnapshot

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
computing:rsyncrsnapshot [2018/11/24 06:00] oemb1905computing:rsyncrsnapshot [2019/07/31 09:57] oemb1905
Line 7: Line 7:
 ------------------------------------------- -------------------------------------------
  
-  sudo rsync -avxHAX --progress --delete /sourcefiles/path /backup/path+Using alternate port and the old syntax for that:
  
-Adding //h//, //H//, //P//, will preserve hard links, give you human readable output, and show the progress (eliminating the need for --progress).+From remote server to target backup localhost:
  
-  sudo rsync -avxHAXhHP --delete /sourcefiles/path /backup/path +  rsync -av --delete -e 'ssh -p 59333 -i /home/user/.ssh/id_rsa' user@10.8.9.3:/home/user/Server/ /home/user/Server/
-   +
-Cloning entire drives, use:+
  
-  sudo rsync -avxHAXhHP --delete /sourcefiles/path /backup/path --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} +From localhost to target remote backup server
-   +
-If the drive you are cloning from has a different filesystem than the destination drive, you can remove the exclusions as //-x// will handle those exclusions in that case.  After cloning, you will need to adjust fstab on the destination partition:+
  
-  cd /etc/ +  rsync -av --delete -e 'ssh -p 59333 -i /home/user/.ssh/id_rsa' /home/user/Server/ user@10.8.9.3:/home/user/Server/
-  sudo nano fstab +
-  <Edit the drive UUID of the new destination drive>+
      
-Now, make the destination volume bootable:+-- -- -- -- -- 
  
-  grub-install /dev/sdX +Using the more modern syntax and no alternate portwe have:
-   +
-If you are using this method to clone your existing server to another hard drive on the same host, then make sure to run //grub-update// on the primary OS.  After you do that, both the kernels for the primary OS and the cloned OS will appear in GRUBand you can boot into the clone, specifically, to make sure that everything migrated properly and is in working order.  It is not sufficient to simply run rsync and hope that all went well.+
  
-rsync over ssh+From remote server to target backup localhost:
  
-  rsync -avxHAXhHP --delete 'ssh -p 53333' user@remotemachine:/home/user/*.zip /path/to/dir/on/localhost+  sudo rsync -avi --delete root@server.com:/home/location/of/mysqldump.sql /home/user/backup/of/mysqldump.sql  
 + 
 +From localhost to target remote backup server:  
 + 
 +  sudo rsync -avi --delete /home/user/backup/of/mysqldump.sql root@server.com:/home/location/of/mysqldump.sql
      
-https://opensource.com/article/17/1/rsync-backup-linux 
-https://github.com/opensourceway/rsync-backup-script 
-https://gist.github.com/enoch85/45eba73c49f760905bc2 
  
- --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2018/11/22 12:56// 
  
 +This tutorial is a designated "Invariant Section" of the "Technotronic" section of Haack's Wiki as described on the [[https://jonathanhaack.com/dokuwiki/doku.php?id=start|Start Page]].
 +
 + --- //[[oemb1905@jonathanhaack.com|oemb1905]] 2019/07/31 09:53//
      
computing/rsyncrsnapshot.txt · Last modified: 2023/04/10 21:29 by oemb1905