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/14 23:31] – 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:/ | + | Making an rsync over ssh mirror using alternate port and the old syntax. |
- | sudo rsync -avWeqr --delete -e 'ssh -p 59999' / | + | |
- | + | ||
- | 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. | + | |
- | [Update] | + | From remote server to target backup localhost: |
- | Here is how I got rsync over pub key authentication (no password prompt) working properly on Debian 9.7. This is an answer on Stack Exchange: | + | |
- | The examples provided as answers here either provide an alternate solutions or make the official solution unclear. Here are two examples with explicit path examples and entries so people can adjust for their needs without interpreting obtuse bash notation: | + | From localhost to target remote backup server: |
- | Execute this from the target backup machine, which pulls from source to target backup | + | rsync -av --delete -e 'ssh -p 59333 -i / |
+ | |||
+ | -- -- -- -- -- | ||
- | rsync -av --delete -e 'ssh -p 59333 -i / | + | Using the more modern syntax and no alternate port, we have: |
- | Execute this from the source machine, which sends from source | + | From remote server |
- | rsync -av --delete | + | |
- | Since ssh public key authentication is a requirement for this question' | + | From localhost |
- | Also, I might add that the initial | + | sudo rsync -avi --delete |
+ | | ||
- | This tutorial is a designated " | ||
- | --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2019/04/09 19:26// | + | This tutorial is a designated " |
+ | --- // | ||
| |