I don’t want to store some files to security reason and want to reduce cloud space.
How I can do this?
I don’t want to store some files to security reason and want to reduce cloud space.
How I can do this?
Have you looked into the “Smart Backup Retention” or “Custom Backup Retention” options?
If you’re looking to get them out of an existing backup then draka2007’s suggestion could do it the easy way.
If you need to get things out right away then there are some command line options such as purge
that can remove things immediately.
But if you want to keep the files from getting into the backup in the first place you should review your jobs filters on the “Source” step of editing a job.
Thank you for command purge). I didn’t guess that this command do that I want (I hope).
I wiil write later about my result.
Can you help me to explain how to “purge” few or list of files?
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:
purge
from the Command list--dbpath
from there--include=<filter>
. In both causes put one per line--dry-run
flag, just to make sure you are not going to accidentally delete more than you wantDuplicati.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
Thank you.
I tried to use this construction before had the qustion to you. But I see error: “Input passphrase” (on my native language, so may be in English it’s write another) and “System.InvalidOperationException: Can’t read keys when all applications don’t have console or input data was forwarded from file… Try to use Console.Read”.
If I add --passphrase parameter I see the same messages.
I add --dry-run to test it. May be problem in this.
Sorry, my mistake and incorrect D2 error message. I forgot to add to filename to excluding folder.
OK. I added filenames and there are some stranges.
1 method) в Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter) в Duplicati.CommandLine.Commands.Backup(TextWriter outwriter, Action
1 setup, List1 args, Dictionary
2 options, IFilter filter)I don’t understand what I do wrong.
Oh… I found a correct pass and “purge” works fine in GUI, but I doesn’t work in CUI. Do you know prohibited symbols in pass? Because my pass end with “” and export to command line add “” to my passphrase.
But It doesn’t work with “purge”.
I’m glad you got it working at least via the GUI.
I am not sure about the correct way to escape characters for command line calls as I’ve never needed to do it - though I would guess it varies depending on the OS involved.
Unfortenutely, I don’t understand now how it worked before. Now I can’t use GUI and have the same problem.
I check my pass with forwarding from one cmd to another and I found that I must only double “%” in my pass.
Oh… I think I have to create new backup without any special symbols (((.
If D2 see pass in CUI I will find a better solution to escaping. May be you know solution for it?
But now it’s like a looking black cat in a black house at night)).
Problem with GUI due autofill in the browser. I did it on another computer with success.
With CUI I have no success.
So big thank you for you pattience.
One way around commandline escape/encoding issues is to use --parameter-file=C:\myargs.txt
, then edit the file and make it look like this:
--passphrase=%%password$#!@
Preferably, save the file with UTF-8 encoding (include BOM), just to be sure.
You can add more options if you want, just add each option on a line by itself, and then invoke Duplicati with:
“C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe” purge “googledrive:///MyBackups/Duplicati/GoogleDrive?authid=MyAuthID” File1ToBeDeleted.txt File2ToBeDeleted.exe --parameter-file=C:\myargs.txt
Thank you!!!
And how I can delete folder with subfolders and files inside them?
I’ve not tried it myself, but according to the purge command docs you can use --include
filters with the purge command so that would likely be the easiest way to do it.
I tried many variants besides include, but without any success. And it’s strange but when I do find command with all versions I don’t see my files, that I want to delete.
But I see it in backup version 2. I don’t understand why. May be problem in this.
Thank you for wanting to help. All work find without include filters. I wrote like a “C:\Path\*” instead .
Problem in dry-run wrote only “Listing folders” without some more information about founded and deleted files.
I ran without dry-run with success.
So I hope it worked. I accidentally included a folder “c:\Disk\WD50\Games_Programme” - now I’d like to remove all this from a huge backup via purge. And I remember until now it never worked for me, error messages, it was close to impossible to remove stuff from backups.
I have recently been struggling with getting Purge to work, but eventually managed. Since this is one of the first results in Google search, I thought I’d share my finding for future code wanderers
Remove all instances backups of specific files from a Duplicati backup.
CommandLine
on the backup you wantPurge
at the top (warning, this will reset each time you come back to this page!)Commandline Arguments
enter the full path to the file(s)
/home/myuser/long/file/path/to/the/place/badfile.mp4
*
as wildcard to delete multiple. E.g: /home/myuser/long/file/path/to/the/place/*.mp4
will delete all mp4s in that folder--include [regex]
instead of the the arguments.
--dry-run
is also available but gives no feedback for a remote repo so it is essentially useless for a PurgeBest of luck all