[Solved] Snapshots Rollback: Directory not empty

[Please complete the below template with details of the problem reported on your Web-UI. Be as detailed as possible. Community members, including developers, shall try and help. Thanks for your time in reporting this issue! We recommend purchasing commercial support for expedited support directly from the developers.]

Brief description of the problem

I really want to understand how the snapshots rollback works, I can’t rollback to a snapshot form webui, also the share isn’t exported via samba

Detailed step by step instructions to reproduce the problem

Try to rollback to any of the snapshots

Web-UI screenshot

Error Traceback provided on the Web-UI

Traceback (most recent call last): File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 40, in _handle_exception yield File "/opt/rockstor/src/rockstor/storageadmin/views/share_command.py", line 78, in post share.pool) File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 627, in rollback_snap remove_share(pool, subvol_name, '-1/-1') File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 547, in remove_share run_command(delete_cmd, log=True) File "/opt/rockstor/src/rockstor/system/osi.py", line 109, in run_command raise CommandException(cmd, out, err, rc) CommandException: Error running a command. cmd = ['/sbin/btrfs', 'subvolume', 'delete', '/mnt2/NasPool/Rockon_Settings']. rc = 1. stdout = ["Delete subvolume (no-commit): '/mnt2/NasPool/Rockon_Settings'", '']. stderr = ["ERROR: cannot delete '/mnt2/NasPool/Rockon_Settings': Directory not empty", '']

Is this normal practice to produce this error saying directory isn’t empty? Am I supposed to delete the the content in the share and try the rollback? And if this is the case, do you guys think its reasonable to delete the content in order of performing a rollback?

Thanks folks

Ok I can confirm after using my test share to rollback. I have deleted all the content in the share, removed it from samba then I was able to rollback successfully without any issues. I think it’s bit scary when we get an error saying “directory not empty” of course it’s not, and the end user will have a couple of options.

1- Copy all content in the share, cause they scared anything might go wrong and they can totally lose their data. [This option is so inconvenient from space wise].

2- Delete all the content in the share and be a wild cowboy, and I wonder how many people will do this in production environment, before knowing this is the right approach :smiley:.

I understand that the rollback straight away in the same directory might be risky, people might lose the newer data they have added to share (I am not 100% sure of that and I might be wrong), but here is a suggestion.

Can you guys make it to
1- Select a different share for the rollback!.
2- Once we select the rollback, it’ll take a snapshot and give it a unique name then process the rollback in the same directory after deleting existing data or overwriting it?