From df312d3200a7d1389860f383d873de8d198a7fa0 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Thu, 9 Jan 2020 18:13:23 +0100 Subject: [PATCH] [VBACKUP-SINGLE] Added enc password and pigz compression --- FreeBSD/vm-backup-single.bash | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/FreeBSD/vm-backup-single.bash b/FreeBSD/vm-backup-single.bash index f8e3992..76f242e 100644 --- a/FreeBSD/vm-backup-single.bash +++ b/FreeBSD/vm-backup-single.bash @@ -6,6 +6,7 @@ vm_dataset="zroot/vms" vm_pid=`/usr/bin/pgrep -f "bhyve: $vm"` backup_location="/tank/backup/vms/" backup_date=`date "+%Y-%m-%d"` +enc_password="nDNmPPBPk7jQnwke" # snapshot vm echo "" @@ -24,9 +25,6 @@ for vm in $vm; do do ps -p $vm_pid > /dev/null done - - vm list | grep $vm ## DELETE ME - fi echo "" @@ -53,9 +51,9 @@ for vm in $vm; do ## send snapshot to backup destination zfs send $vm_dataset/$vm@$backup_date | \ - gzip | \ - openssl enc -aes-256-cbc -a -pbkdf2 -iter 1000 -salt -k development \ - > $backup_location/$vm-$backup_date.gz.enc + pigz -c -p 4 | \ + openssl enc -aes-256-ctr -a -pbkdf2 -iter 1000 -salt -k $enc_password \ + > $backup_location/$vm-$backup_date.pigz.enc ## delete snapshot sleep 1