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/01/13 19:27] – oemb1905 | computing:rsyncrsnapshot [2023/04/10 20:57] – oemb1905 | ||
---|---|---|---|
Line 7: | Line 7: | ||
------------------------------------------- | ------------------------------------------- | ||
- | sudo rsync -avxHAX --progress --delete | + | Since I am backing up multiple remote hosts, I chose to create separate configs for each remote host instead of putting those destinations in the '' |
- | Adding | + | #base config |
- | + | config_version | |
- | | + | snapshot_root |
+ | cmd_cp | ||
+ | cmd_rm | ||
+ | cmd_rsync | ||
+ | cmd_ssh | ||
+ | cmd_logger | ||
+ | verbose | ||
+ | loglevel | ||
+ | logfile | ||
+ | | ||
+ | | ||
+ | retain | ||
+ | # | ||
+ | backup | ||
+ | | ||
+ | backup | ||
+ | backup | ||
+ | backup | ||
| | ||
- | Cloning entire drives, use: | + | Then, to run this, I use a simple script I created. |
- | sudo rsync -avxHAXhHP --delete / | ||
- | | ||
- | 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/ | + | [BEGIN OLD] Let's start with rsnapshot. |
- | sudo nano fstab | + | |
- | <Edit the drive UUID of the new destination drive> | + | |
- | + | ||
- | Now, make the destination volume bootable: | + | |
- | | + | |
- | | + | nano /etc/rsnapshot.conf |
- | 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 GRUB, and you can boot into the clone, specifically, | + | |
- | rsync over ssh | + | Uncomment the alpha, beta, gamma, and delta sections under //backup levels// section, enable the sync-first option, and specify the directories you want to backup (remember, '' |
- | | + | |
- | + | < | |
- | That last one works perfectly ... | + | < |
+ | < | ||
+ | < | ||
+ | <backup / | ||
+ | <backup /etc/ localhost> | ||
+ | |||
+ | Now, edit the default script inside | ||
+ | |||
+ | <0 */4 * * * root | ||
+ | | ||
+ | < | ||
+ | <30 2 1 * * root / | ||
| | ||
- | https:// | + | Personally, I use a simple script to ensure that the sync_first command completed before I run any of the '' |
- | https:// | + | |
- | https:// | + | |
- | This tutorial is a designated " | + | [[https://repo.haacksnetworking.com/oemb1905/haackingclub/ |
- | --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2018/11/22 12:56// | + | Of course, I have one of these for alpha, another for beta, and gamma, and so on until delta. |
+ | |||
+ | [[https:// | ||
+ | |||
+ | OK ... that's pretty much it for getting started with rsnapshot. | ||
+ | |||
+ | From remote server to target backup localhost, with alt port: | ||
+ | |||
+ | rsync -av --delete -e 'ssh -p 59333 -i /home/user/ | ||
+ | |||
+ | From localhost to target remote backup server, with alt port: | ||
+ | |||
+ | rsync -av --delete -e 'ssh -p 59333 -i / | ||
+ | |||
+ | From remote server to target backup localhost, with standard port: | ||
+ | |||
+ | sudo rsync -avi --delete root@server.com:/home/location/ | ||
+ | |||
+ | From localhost to target remote backup server, with standard port: | ||
+ | |||
+ | sudo rsync -avi --delete | ||
+ | |||
+ | Once you master these steps, checkout remote-upgrades, | ||
+ | |||
+ | This tutorial is a designated " | ||
+ | --- // | ||
| |