icewind1991 / files_snapshots

Access filesystem snapshots from Nextcloud
40 stars 7 forks source link

Time formatting for zfs snapshots #4

Open minorsecond opened 7 years ago

minorsecond commented 7 years ago

I'm trying to figure out how to set the formatting for the following:

zfs-auto-snap_frequent-2017-06-23-1930

I've got Y-m-d-Hi, but that doesn't work. I also tried Y-M-d-HH, which doesn't work either.

AceSlash commented 7 years ago

Y-m-d-HM if it's like the unix date command, did you try that?

minorsecond commented 7 years ago

Thanks. I tried that as well:

screen shot 2017-06-26 at 4 32 14 pm

I'm assuming that the date should appear under "Date."

tacruc commented 7 years ago

Have you tried *Y-m-d-Hi

Ryushin commented 6 years ago

I am also having this same problem. My snapshots are named the same as well. I've tried the * as well. I've tried the date command format. My data directory is not in my nextcloud folder but in it's own zfs dataset.

snapshots_no_date

tacruc commented 6 years ago

Try *Y-m-d-Hi More: http://php.net/manual/de/datetime.createfromformat.php

M expect a text representation of the Month

Ryushin commented 6 years ago

Afraid I tried that one as well before. Can you take a manual snapshot with that name and see if your installation can detect it. I've tried a bunch of variations. I even tried creating a manual snapshot named autosnap_2017_11_22_06:50:01_hourly and it still did not pick it up when I used the example on your git home page.

tacruc commented 6 years ago

My test installation is offline right now and will stay for a while, my production installation is on a different setup so the app is not installed sorry.

tacruc commented 6 years ago

I think -*-*-Y-m-d-Hi is what you need. Here is the php code I tried it with: http://sandbox.onlinephpfunctions.com/code/7487c65221842b5315cf227f2492143d76b3aee8

Ryushin commented 6 years ago

Score!! The crowd goes wild! Thanks so much.

Yagu-znal commented 5 years ago

I am struggling to find the proper formatting as well. My snapshots are called "auto-20181228.1200-2w". I have tried to get it to recognize for 2 hours. No dice. Can anyone enlighten me?

StreamThreader commented 5 years ago

Same problem with time format. Name is "zfs-auto-snap_weekly-2019-08-19-10h23" how to set ? ---Y-m-d-Hi this format not work 123 Without asterisk * in start line - work!