icewind1991 / files_snapshots

Access filesystem snapshots from Nextcloud
40 stars 7 forks source link

Nextcloud can see BTRFS Snapshots but no versions available #8

Open Fabiosilvero opened 6 years ago

Fabiosilvero commented 6 years ago

Hello,

Nextcloud can see my BTRFS snapshots in Administration/Snapshots, but when I want to access to the previous versions of the documents whose are in my snapshots, the message "No versions available" is displayed.

OS : Debian 9 Nextcloud : 12 Filesystem : BTRFS Snapshots : read-only

Files ownership and permissions : www-data:www-data 770

tacruc commented 6 years ago

Is there a second Version's tab, I had the Problem that the Files Versions app and this app both created an Tab called Versions?

Fabiosilvero commented 6 years ago

Yes, there was a second Version's tab. I have already disabled Versions to let Snapshots work. But older versions of files aren't displayed in this case as well :/

tacruc commented 6 years ago

In the Administration sections, are the Dates detected correctly. Should look like in https://github.com/icewind1991/files_snapshots/blob/master/README.md

See althoug #4 and #6

Fabiosilvero commented 6 years ago

I think everything is correct from this side as you can see in the screenshot attached.

But the field date is blank tho...

capture du 2017-11-07 22-35-46

Edit : With #6 and the " * " added in front of Y, I can see the date in the Date field in Snapshots. But still no previous versions available... capture du 2017-11-07 22-44-15

Edit 2 : I've also modified my crontab in order to create with btrfs-snap RW Snapshots instead of read-only 6 hours ago. Still no luck...

tacruc commented 6 years ago

Sorry I have no Idea left that's what solved the Problem in my test installations.

Fabiosilvero commented 6 years ago

I found what caused the issue : I tried to view the previous versions of files inside a group folder (created with the app). No snapshots are visible. Same thing with folders shared with me, even if I created the file. Only the user who shared the folder can see the snapshots and roll back.

I tested with a file in my own folders, it works fine. I can see the previous file and roll back.

ghost commented 4 years ago

Are seconds necessary? I can't seem to get my snapshots to list properly. I'd appreciate some input =)

The snapshots are named like this: nc_data.20191030T0000 ('nc_data.' + YYYYMMDD + 'T' + HHMM) and they are mounted in .../htdocs/nextcloud/data

I can't seem to get the app to pickup the date, so I think I am using the wrong date string. I've tried several variants, including empty. I followed the PHP documentation.

nc_data.ymd?Gi
*ymd?Gi
ymd?Gi
ymd*Gi
ymdGi

The result is always this: image

tacruc commented 4 years ago

I thin you need a big Y not y as your year has 4 digits

ghost commented 4 years ago

You're right. Must be tired. I read the PHP doc many times but got the Y vs y confused. Thanks! Snapshot versions do work as they should now. :)

Wishing we had support for multiple snapshot paths though. Some subfolders that I have are on different volumes/snap shot paths. Other folders are external storage (but local to the server) https://github.com/icewind1991/files_snapshots/issues/22