shape_add
This commit is contained in:
parent
90063a4797
commit
3f955e7e93
3 changed files with 24 additions and 2 deletions
|
@ -7,6 +7,7 @@ backup_server_dataset="tank/backups"
|
|||
backup_server_delete_old_snaps=y
|
||||
backup_server_number_keep_snaps=31
|
||||
|
||||
shape_megabytes=20
|
||||
#Source server settings
|
||||
#DO NOT CHANGE zfsnap_days_keep_snaps AFTER FIRST FULL BACKUP!
|
||||
|
||||
|
|
21
testing-testing-backup-backup-config
Normal file
21
testing-testing-backup-backup-config
Normal file
|
@ -0,0 +1,21 @@
|
|||
#Backup server settings
|
||||
|
||||
backup_server="130.193.10.42"
|
||||
backup_server_port="11271"
|
||||
backup_server_ipv=4
|
||||
backup_server_dataset="crypt/backups"
|
||||
backup_server_delete_old_snaps=n
|
||||
backup_server_number_keep_snaps=7200
|
||||
|
||||
shape_megabytes=20
|
||||
#Source server settings NOT CHANGE AFTER FIRST FULL BACKUP!
|
||||
|
||||
zfsnap_enable=y
|
||||
zfsnap_days_keep_snaps=1
|
||||
|
||||
source_datasets="
|
||||
crypt/lxd/storage/containers/alpine
|
||||
crypt/lxd/storage/containers/milan-rdp-moje
|
||||
crypt/lxd/storage/containers/test
|
||||
"
|
||||
|
|
@ -38,10 +38,10 @@ backup_snap=$(echo "$backups_server_zfs_snapshots" | grep "$backup_server_datase
|
|||
if [ -z "$backup_snap" ]
|
||||
then
|
||||
echo "Snapshot on backup server not found, sending "$dataset"@"$source_snap" to server "$backup_server" "$backup_server_dataset"/"$dataset_clean""
|
||||
zfs send -c "$dataset"@"$source_snap" | pv | ssh -$backup_server_ipv "$backup_server" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean" && echo "Send OK"
|
||||
zfs send -c "$dataset"@"$source_snap" | pv -L "$shape_megabytes"m | ssh -$backup_server_ipv "$backup_server" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean" && echo "Send OK"
|
||||
else
|
||||
echo "Snapshot on backup server found, sending incremental from "$dataset"@"$backup_snap" to "$dataset"@"$source_snap" to server "$backup_server" "$backup_server_dataset"/"$dataset_clean""
|
||||
zfs send -ci "$dataset"@"$backup_snap" "$dataset"@"$source_snap" | pv | ssh -$backup_server_ipv "$backup_server" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean" -F && echo "Send OK"
|
||||
zfs send -ci "$dataset"@"$backup_snap" "$dataset"@"$source_snap" | pv -L "$shape_megabytes"m | ssh -$backup_server_ipv "$backup_server" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean" -F && echo "Send OK"
|
||||
fi
|
||||
done
|
||||
del_snaps_block
|
||||
|
|
Loading…
Reference in a new issue