OK Not sure if this was the place to put it but I am sure that @MichaelTunnell will tell me to move it if I need to.
I want to automate snapshots on a machine with ZFS and send those snapshots to another machine over SSH. I can make it happen but can’t seem to make it happen again when the second snapshot is taken.
I found a nice post that explains it pretty good but after the 2nd snapshot I don’t want to touch it again and his explanation requires you to know the different increments to send.
here is my simple script I was just going to cron but it isn’t working after the first snapshot is taken and sent.
#!/bin/bash
MYDATE=`date +%F-%T`
# do the snapshot
zfs snapshot Storage/profiles@${MYDATE}
#send snapshot
zfs send Storage/profiles@${MYDATE} | ssh my.server -p 2201 zfs receive tank/profiles@${MYDATE}
From what I have read that line requires the dataset to not exist so I need to do the incrementals … just looking for some guidance please. My google foo is not strong today and I keep barking up the wrong tree.