You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?).
The text was updated successfully, but these errors were encountered:
Thanx for pointing out that problem of yours. Which ZFS version on which platforms are you using ?
If I change the format it will be iso8601 formatted, something like: 2018-09-17T07:20:02+02
but + is not allowed in snapshot names. so just 2018-09-17T07:20:02 using UTC should be ok.
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?).The text was updated successfully, but these errors were encountered: