How to delete some folder or/and files inside each backup version

Below is the help text for purge but I believe basically it would be to either run a command line like the following in a shell:

“C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe” purge “googledrive:///MyBackups/Duplicati/GoogleDrive?authid=MyAuthID” File1ToBeDeleted.txt File2ToBeDeleted.exe --dbpath=“”

Or in the GUI you could:

  • select the “Commandline …” job menu item-
  • select purge from the Command list
  • delete anything in “Commandline arguments”
  • click “Edit as text” across from “Advanced options” and deleted everything but --dbpath from there
  • in “Commandline arguments” put the files to be deleted OR use the --include=<filter>. In both causes put one per line
  • for testing, I suggest you START with also using the --dry-run flag, just to make sure you are not going to accidentally delete more than you want
  • click the blue “Run ‘purge’ command” button at the bottom of the page
Duplicati.CommandLine.exe help purge


Usage: purge <storage-URL> <filenames> [<options>]

  Purges (removes) files from remote backup data. This command can either take
  a list of filenames or use the filters to choose which files to purge. The
  purge process creates new filesets on the remote destination with the
  purged files removed, and will start the compacting process after a purge.
  By default, the matching files are purged in all versions, but this can be
  limited by choosing one or more versions. To test what will happen, use the
  --dry-run flag.

  --dry-run
    Performs the operation, but does not write changes to the local database
    or the remote storage
  --version=<int>
    Selects specific versions to purge from, multiple versions can be
    specified with commas
  --time=<time>
    Selects a specific version to purge from
  --no-auto-compact
    Performs a compact process after purging files
  --include=<filter>
    Selects files to purge, using filter syntax
2 Likes