files_snapshots icon indicating copy to clipboard operation
files_snapshots copied to clipboard

Nextcloud can see BTRFS Snapshots but no versions available

Open Fabiosilvero opened this issue 7 years ago • 9 comments

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

Fabiosilvero avatar Nov 07 '17 15:11 Fabiosilvero

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?

tacruc avatar Nov 07 '17 15:11 tacruc

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 :/

Fabiosilvero avatar Nov 07 '17 16:11 Fabiosilvero

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

tacruc avatar Nov 07 '17 16:11 tacruc

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

Fabiosilvero avatar Nov 07 '17 21:11 Fabiosilvero

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

tacruc avatar Nov 08 '17 01:11 tacruc

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.

Fabiosilvero avatar Nov 09 '17 09:11 Fabiosilvero

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

ghost avatar Nov 04 '19 17:11 ghost

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

tacruc avatar Nov 04 '19 18:11 tacruc

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

ghost avatar Nov 04 '19 18:11 ghost