-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I had a tough time figuring out why my snapshots would not transfer. The hint came when it printed a totally off the wall date of the unix epoch. Snapshot names must be formatted at dates. Old snapshots can be converted by listing the snapshots that aren't dates:
zfs list -r -t snapshot -o name,creation <volume> | grep -v "@[0-9]"
Followed by a zfs rename for each snapshot listed to the date listed converted to UTC:
zfs rename <volume>@backup-foo-2 2018-09-16-1200
A more robust way to do it would be if Perl's Date::Time(snapshot name) returns -1, we could treat the snapshot as if it were named the date of it's creation time locally and remotely. So we would have @backup-foo-2 locally and @2018-09-16-1200 remotely. That would let legacy snapshots transparently translate. It would always translate to the same thing, and it would never change (As long as the timezone was UTC?).