I recommend using the web UI if that’s where you defined your backup jobs. You got the right idea by clicking the blue “command line…” link. On that next page, pick “purge” from the dropdown menu. Replace all the contents of the “Commandline arguments” text box with something like this:
Then scroll to the bottom and click the “run purge command now” button.
Whatever the path looks like from Duplicati’s perspective. I got the idea you were using a Mac since you mentioned Time Machine. So no drive letter or anything.
On Windows you would use a drive letter and backslashes:
Yep, when you use an asterisk like the above examples, all contents of those folders are purged from the backup data.
storage-URL is the backup destination. It should be populated automatically by the web UI. It’s what appears in the “target URL” box:
The “filenames” parameter can be used if you want to just purge a single file. If you want to purge an entire folder, you need to use the --include= option with a wildcard like I showed above. But in either case they would go in the “command line arguments” box in the above screen shot.
If so, does that delete the contents of foldernamehere or does it also delete the folder itself from Documents?
Based on your reply, it sounds like the Target URL field shouldn’t be modified in this situation, correct?
Is there a way to test that this will work or did work? Duplicati doesn’t seem to have a way to show deleted files from backups in the same way Time Machine does. I see there is a “–dry-run” command, but I’m not sure exactly what that is going to do based on the one sentence in the user manual.
I’m not a Mac person but from a quick Google search it looks like that would be correct.
From my experience the entire “foldernamehere” folder is removed from backups and is no longer displayed at all in the folder tree when you attempt a restore.
Yes, as you noted you can use --dry-run parameter. You’ll be able to see the job output to confirm there are no errors. Nothing actually changes so the “purged” folder will still appear in the restore folder tree of course.
You might consider creating a new backup job just to test out the purge operation so you get more familiar/comfortable with it. Make a new job, select a small number of folders, do at least one backup, then try the purge command.
I think one issue may be that the 2 short dashes were changed to 1 long dash below:
Question: For backups of Mac folders with a space in the folder name, how should the command be handled? A few possible options are:
/Users/macusernamehere/Documents/folder name here/*
/Users/macusernamehere/Documents/folder\ name\ here/*
Another challenge is that it takes a very long time (several minutes for each level of the backup’s folder hierarchy, so a deeply nested folder in multiple backups takes hours altogether!) to see if running a purge command has worked or not. This separate, but related, challenge seems to be under discussion already. Also, the past few attempts to open each restore version page for the backup produces this pop-up:
Missing XSRF Token. Please reload the page
Pressing OK on this pop-up seems to make it go away without any further obvious issue at this point.
Another challenge is that I often run into “database is locked” errors, even though nothing is happening with the database. Usually, running a “verify” first, then running a “commandline…” seems to address this issue when it occurs.
Oh yeah, that would definitely be a problem. Try again with two short dashes.
I can’t test this myself as I don’t have a Mac, but I think escaping the spaces with a backslash should work. Enclosing the path in double quotes would probably work, too.
What version of Duplicati are you using? What browser?
This usually means you’re trying to do two things at once. The normal Duplicati scheduler only does one thiong at a time, but if it’s busy doing a backup or something and you try to do a restore or manually run some other command, you can get this message.