Open norsemangrey opened 5 months ago
look at the original snapshot format, there should be a {} in it, that gets filled in with the backup name automaticly.
I'm probably being dense, but I'm not sure i follow ....
The original snapshot format is this: {}-%Y-%m-%dT%H:%M:%SZ
which means my snapshots would be named host-1-<timestamp>
. I don't need the snapshot profile- / backup name as part of the snapshot name ... just the timestamp, but I need it to be the same for all profiles in the same script.
uuh why are you calling the date command in your snapshot format line? $(date..)
Because I want to resolve the timestamp in the variable before passing it the zfs-autobackup function so that I get the the same timestamp for both snapshot profiles....otherwise there will be some seconds difference ..... It was what I was trying to explain above, but I was probably doing a poor job of it xD
You're using a fixed string as snapshot "format". This makes it so that zfs-autobackup cant parse the dates and times of the existing snapshots.
If you just want the timestamp, use --snapshot-format=%Y-%m-%dT%H:%M:%SZ
Edwin
I'm having an issue where old snapshots are not thinned when trying to resolve the snapshot format timestamp to a variable before passing it to the zfs-autobackup function.
I'm running multiple snapshot profiles in the same script and for the purpose of managing the snapshots later I would like them all to have the same timestamp in the snapshot name. Thus I'm trying to do something like in the below example, instead of passing timestamp format like this
SNAPSHOT_FORMAT="%Y-%m-%dT%H:%M:%S-auto"
.This works fine in that the snapshots are created and with the correct name, but thinning of old snapshots no longer works. Is this a bug, and if not is there another way to accomplish what I'm trying to do?