This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
computing:rsyncrsnapshot [2019/04/10 01:30] – oemb1905 | computing:rsyncrsnapshot [2020/01/27 19:55] – oemb1905 | ||
---|---|---|---|
Line 7: | Line 7: | ||
------------------------------------------- | ------------------------------------------- | ||
- | sudo rsync -avxHAX --progress --delete / | + | Let's start with rsnapshot. |
- | Adding | + | sudo apt install rsnapshot |
+ | nano /etc/rsnapshot.conf | ||
+ | < | ||
- | sudo rsync -avxHAXhHP --delete | + | Uncomment the alpha, beta, gamma, and delta sections under // |
- | + | ||
- | Cloning entire drives, use: | + | |
- | | + | |
- | | + | < |
- | 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: | + | < |
+ | < | ||
+ | < | ||
+ | <backup /home/ localhost> | ||
+ | | ||
- | cd /etc/ | ||
- | sudo nano fstab | ||
- | <Edit the drive UUID of the new destination drive> | ||
- | | ||
- | Now, make the destination volume bootable: | ||
- | grub-install /dev/sdX | ||
- | | ||
- | If you are using this method to clone your existing server to another hard drive on the same host, then make sure to run // | ||
- | rsync over ssh | ||
- | sudo rsync -avHe --delete -e 'ssh -p 53213' user@172.39.58.38:/home/Archives/ . | + | Making an rsync over ssh mirror using alternate port and the old syntax. |
- | | + | |
+ | From remote server to target backup localhost: | ||
+ | |||
+ | | ||
+ | |||
+ | From localhost to target remote backup server: | ||
+ | |||
+ | rsync -av --delete -e 'ssh -p 59333 -i / | ||
| | ||
- | That last one works perfectly ... but no matter what, I was having it prompt me for a password despite normal ssh working fine without one. I settled on these: | + | -- -- -- -- -- |
- | Executed on the target backup machine, pulling from source to target | + | Using the more modern syntax and no alternate port, we have: |
- | rsync -avWeqr --delete -e 'ssh -p 59333 -i / | + | From remote server to target backup localhost: |
- | Executed on the source machine, sending from source to target | + | sudo rsync -avi --delete root@server.com:/ |
- | | + | 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:// | ||
- | https:// | ||
- | https:// | ||
- | This tutorial is a designated " | ||
- | --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2019/04/09 19:26// | + | This tutorial is a designated " |
+ | --- // | ||
| |