Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Snapshot name requirements. #23

Open
ClashTheBunny opened this issue Sep 16, 2018 · 2 comments
Open

Document Snapshot name requirements. #23

ClashTheBunny opened this issue Sep 16, 2018 · 2 comments

Comments

@ClashTheBunny
Copy link
Contributor

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?).

@jollyjinx
Copy link
Owner

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.

@ClashTheBunny
Copy link
Contributor Author

Sending
From:openzfs on osx v 1.7.2, El Cap. Perl 5.28, as the latest one segfaulted. Time::Date 2.30
To: Debian zfsonlinux 0.7.9-3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants