hello, I'am making a little script to make ZFS snapshots, send and receive,etc
so far so good :
the backup will be the zroot/files plus the date (looks very good and usefull)
now, how I'can know if
after this
note:in the future I'will change to ssh keys metod to make it more automatized
the backup machine is my home and only do that, I'plug in it,make the backups and shutdown
so far so good :
Bash:
#!/usr/local/bin/bash
header="/files@backup"
fecha=`date -j +"%Y-%d-%m--%H:%M:%S"`
sep="-"
snap=$header$sep$fecha
echo "Making snapshot of /zroot/files" $snap
zfs snapshot zroot$snap
echo "-----------------------------------------" >> /home/juan/log-snapshots
echo $snap >> /home/juan/log-snapshots
echo "-----------------------------------------" >> /home/juan/log-snapshots
zfs send zroot$snap | pv | ssh root@10.1.80.2 zfs receive -dvF zroot
zfs destroy zroot$snap
the backup will be the zroot/files plus the date (looks very good and usefull)
now, how I'can know if
zfs send
returns without error?after this
Code:
zfs send zroot$snap | pv | ssh root@10.1.80.2 zfs receive -dvF zroot
note:in the future I'will change to ssh keys metod to make it more automatized
the backup machine is my home and only do that, I'plug in it,make the backups and shutdown