ipvchange
This commit is contained in:
parent
45e63e31a2
commit
b209da9250
1 changed files with 4 additions and 4 deletions
|
@ -26,7 +26,7 @@ fi
|
|||
backup_block () {
|
||||
|
||||
source_zfs_snapshots=$(zfs list -t snapshot)
|
||||
backups_server_zfs_snapshots=$(ssh -p $backup_server_port $backup_server zfs list -t snapshot)
|
||||
backups_server_zfs_snapshots=$(ssh -$backup_server_ipv -p $backup_server_port $backup_server zfs list -t snapshot)
|
||||
|
||||
for dataset in $source_datasets;
|
||||
do
|
||||
|
@ -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" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean" && echo "Send OK"
|
||||
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"
|
||||
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" -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 | 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
|
||||
|
@ -57,7 +57,7 @@ snaps_to_delete=$(echo "$backups_server_zfs_snapshots" | grep "$backup_server_da
|
|||
for snap in $snaps_to_delete
|
||||
do
|
||||
echo "Deleting snapshot "$snap" on "$backup_server""
|
||||
ssh "$backup_server" -p "$backup_server_port" zfs destroy "$snap"
|
||||
ssh -$backup_server_ipv "$backup_server" -p "$backup_server_port" zfs destroy "$snap"
|
||||
done
|
||||
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue