Prune from CLI - Access Denied

Hi :slight_smile:

I’m using Duplicacy Web Edition on my Windows 10 laptop.

Now i wanted to try to operate via CLI to prune some snapshots.

I have actually 2 repos, both on the same storage, that’s encrypted.

First doubt is that when i listed snapshots for “0” there was no prompt for the storage password. When i listed snapshots for “1” i was asked for the password. Tried again with “1” and the password was not asked this time.

Maybe the second access to “1” had it cached?, but why it was not asked when i listed “0” for the first time?

So:

C:\ProgramData\.duplicacy-web\repositories\localhost\0>duplicacy_win_x64_2.7.2.exe list

Listed without asking for password.

C:\ProgramData\.duplicacy-web\repositories\localhost\1>duplicacy_win_x64_2.7.2.exe list

Had to put in the password.

C:\ProgramData\.duplicacy-web\repositories\localhost\1>duplicacy_win_x64_2.7.2.exe list

No password this time.

C:\ProgramData\.duplicacy-web\repositories\localhost\all>duplicacy_win_x64_2.7.2.exe list

Had to put in the password.

I’m just curious to understand how this works.

So after this i pruned my old snapshots:

C:\ProgramData\.duplicacy-web\repositories\localhost\all>duplicacy_win_x64_2.7.2.exe prune -id Thunderbird -r 1-4
Storage set to W:/My Documents/PC_Duplicacy_Backups
Deleting snapshot Thunderbird at revision 1
Deleting snapshot Thunderbird at revision 2
Deleting snapshot Thunderbird at revision 3
Deleting snapshot Thunderbird at revision 4
Fossil collection 1 saved
The snapshot Thunderbird at revision 1 has been removed
The cached snapshot Thunderbird at revision 1 could not be removed: remove C:\ProgramData\.duplicacy-web\repositories\localhost\all/.duplicacy/cache/WorkDocs/snapshots/Thunderbird/1: Access is denied.
The snapshot Thunderbird at revision 2 has been removed
The cached snapshot Thunderbird at revision 2 could not be removed: remove C:\ProgramData\.duplicacy-web\repositories\localhost\all/.duplicacy/cache/WorkDocs/snapshots/Thunderbird/2: Access is denied.
The snapshot Thunderbird at revision 3 has been removed
The cached snapshot Thunderbird at revision 3 could not be removed: remove C:\ProgramData\.duplicacy-web\repositories\localhost\all/.duplicacy/cache/WorkDocs/snapshots/Thunderbird/3: Access is denied.
The snapshot Thunderbird at revision 4 has been removed
The cached snapshot Thunderbird at revision 4 could not be removed: remove C:\ProgramData\.duplicacy-web\repositories\localhost\all/.duplicacy/cache/WorkDocs/snapshots/Thunderbird/4: Access is denied.

And:

C:\ProgramData\.duplicacy-web\repositories\localhost\all>duplicacy_win_x64_2.7.2.exe prune -id Firefox -r 1-3
Storage set to W:/My Documents/PC_Duplicacy_Backups
Fossil collection 1 found
Fossils from collection 1 can't be deleted because deletion criteria aren't met
Deleting snapshot Firefox at revision 1
Deleting snapshot Firefox at revision 2
Deleting snapshot Firefox at revision 3
Fossil collection 2 saved
The snapshot Firefox at revision 1 has been removed
The snapshot Firefox at revision 2 has been removed
The snapshot Firefox at revision 3 has been removed

So i think for Firefox it went well, but something was wrong with Thunderbird.

Any idea what it is?

EDIT: Something is strange with my setup, maybe when i switched to Duplicacy Web Edition as a service. Not sure. Don’t know why but i see i have only 1 backup id on my storage instead of 2 (from storage tab). Also from Restore tab i see a third option “duplicacyweb” that is an empty folder in C:\ProgramData\.duplicacy-web\repositories\localhost\all\.duplicacy\cache\WorkDocs\snapshots alongside my Firefox and Thunderbird folders :thinking:

Thanks!

Uhm i tried to start over.

Created the storage, my two schedules, 1 for each repository ID.

After i run both the schedules if i go to the storage tab i see Backup IDs: 1 at the top, instead of 2.

Don’t know why. A bug in the Windows app maybe?

Listing from the CLI works:

Snapshot Firefox revision 1 created at 2021-04-14 12:38 -hash
Snapshot Thunderbird revision 1 created at 2021-04-14 12:38 -hash

EDIT: I see the issue now, if i schedule 2 backup jobs, 1 per snapshot id, i have the issue i’ve illustrated.
If i make a single schedule job with both the snapshot ids the issue is not present.

I don’t know if this is an issue, so basically in the Storage tab i see only data about the schedule i just performed, and not general informations on my jobs on the storage. Why this happens?

The Access is denied error can be caused by a permission issue. That is, you may have run backups as administrator (if the web GUI is installed as a service) which will create files/directories that can’t be deleted by an ordinary user.

This can also explain why you needed to enter password in some cases – the keyring file created under the .duplicacy directory is user sensitive. Passwords stored there by one user can’t be accessed by another user.

1 Like

I see, thank you!

Any hint about my “issue” with the number of Backup IDs present in the Web ui?

The number of Backup IDs is only updated by backups job run locally so it doesn’t included backups from other machines.

Yes, what I was trying to say is that there I see only a backup id number equal to the number of backups performed in the last scheduled job.

So if I have a schedule to run 1 backup, in the storage tab I will see Backup IDs:1.
If the schedule has ‘n’ backup, in the storage i will see Backup IDs:n.

Is this the intended way this has to work? If yes I do not understand why :nerd_face:

Hi @gchen do you have an hint on this?

Thanks!

That number records the number of distinct backup ids. If you have 2 schedules running the same backup then it will be counted as 1.

Oh ok so it’s correct that the number is different based on the running schedule.