Difference between revisions of "Rsync"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
# Backup Command | # Backup Command | ||
− | rate limit 10000 Kbytes per second | + | rate limit 10000 Kbytes per second on zfs |
``` | ``` | ||
− | rsync -avz --recursive --bwlimit=10000 --relative -e ssh -p 22 -l | + | sudo zfs create -o mountpoint=/bkp zfspv-pool/bkp |
+ | sudo adduser bkp | ||
+ | sudo chown bkp:bkp /bkp | ||
+ | rsync -avz --recursive --bwlimit=10000 --exclude "hourly." --relative -e "ssh -p 22 -l bkp" --progress /var/lib/influxdb 10.x.x.x:/bkp/myinfluxbkp | ||
``` | ``` | ||
Backup example | Backup example | ||
``` | ``` | ||
− | rsync -avzSuc --recursive --relative --delete -e "ssh -p 22 -i /home/ | + | rsync -avzSuc --recursive --relative --delete -e "ssh -p 22 -i /home/user/.ssh/id_ed25519" --progress --files-from=files.dat / user@10.x.x.x:/home/busk/rsync --include-from=includes.dat --exclude-from=excludes.dat |
``` | ``` | ||
Use lxd container and lxc snapshots to manage state. You can use rdiff-backup command tool as well | Use lxd container and lxc snapshots to manage state. You can use rdiff-backup command tool as well | ||
+ | |||
+ | |||
+ | ``` | ||
+ | sudo rsync --dry-run -rv -e "ssh -p 22 -i /home/myuser/.ssh/id_ed25519" --rsync-path="sudo rsyn | ||
+ | c" myuser@10.x.x.x:/bkp/foo /docker/ | ||
+ | ``` |
Latest revision as of 19:15, 15 May 2024
Backup Command
rate limit 10000 Kbytes per second on zfs
sudo zfs create -o mountpoint=/bkp zfspv-pool/bkp sudo adduser bkp sudo chown bkp:bkp /bkp rsync -avz --recursive --bwlimit=10000 --exclude "hourly." --relative -e "ssh -p 22 -l bkp" --progress /var/lib/influxdb 10.x.x.x:/bkp/myinfluxbkp
Backup example
rsync -avzSuc --recursive --relative --delete -e "ssh -p 22 -i /home/user/.ssh/id_ed25519" --progress --files-from=files.dat / user@10.x.x.x:/home/busk/rsync --include-from=includes.dat --exclude-from=excludes.dat
Use lxd container and lxc snapshots to manage state. You can use rdiff-backup command tool as well
sudo rsync --dry-run -rv -e "ssh -p 22 -i /home/myuser/.ssh/id_ed25519" --rsync-path="sudo rsyn c" myuser@10.x.x.x:/bkp/foo /docker/