Feature request: List all backup sets with their size

I understand. I’d be willing to let Duplicati run a costly analysis to find out. In other words I’d be willing to click a button “Analyze” and wait a long time to get the results.

I’d like to implement a backup scheme where I do daily backups, keep 3 days, then 1 backup per week for 10 weeks, then 1 backup per month for 12 months, then forever every 6 month. If I want to achieve something like that I need both the ability to delete at will (seems to be available through the command line) as well as information about space usage.

I’d use retention policy for that scheme. New retention policy deletes old backups in a smart way

However, getting that info may still be useful if you want to manually clean up some more.

I will check that out.

Not exactly an answer to your question, but maybe this helps:

You can see the increase in storage size between any 2 backup versions with the compare command.

  • From the Web UI, click to expand your backup job and click Commandline under “Advanced”.
  • Choose the command compare in the drop down menu.
  • Delete the contents of the “Commandline arguments” text box, replace it with “12”, “5” and “--full-result” (each value on a separate line, omit the double quotes).
  • Click the button Run “compare” command now at the bottom of the form.

image

This will list the difference between backup version 12 and version 5. It also returns the backup size of both versions.
Option --full-result lists all added, modified and deleted files, otherwise only the first 10 files are listed.

The compare command can be useful to track down which backup uploaded a lot of data and thus allocated much storage space.
Note that deleting a backup version that added much data to your remote storage does not mean that all storage space is reclaimed, as explained by @Pectojin.

If you accidentlly backed up one or more large files or folders and want to delete them from every backup set, you can do this using the purge command.
Don’t forget to delete or move the files to a location outside the selection of your source files, otherwise they will be uploaded again the next time the backup runs.
Another option is to exclude these files from your source files selection.

You can delete a specific backup version using the --version=n option. The easiest way to do this, is invoking the Commandline form in the Web UI, just like the compare command above.

1 Like

Is it actually possible to list the backup sets from the command line?

Looking at Using Duplicati from the Command Line - Duplicati 2 User's Manual I see no way of doing it.

Also, just executing “list” from the “command line” option in the web UI returns

No files matching, looking in all versions
No files matched expression
Return code: 0

How can backup sets be listed?

Duplicati’s native Command Line exe does not integrate with the normal Web UI engine at all. For such integration I always recommend the excellent duplicati-client command-line utility.

With it you’d do something like:

.\duplicati_client.exe login
.\duplicati_client.exe list backups
.\duplicati_client.exe logout

You can also trigger backup jobs using this utility, among many other useful things…

1 Like

Thanks for pointing to that utility. This command lists the backups. How can I get the backup sets? I tried it with get and describe.

In any case the official Duplicati command line tool should be able to list backup sets, no?

By backup sets do you mean backup versions?

Yes, I’m not familiar with the proper terminology.

What is your ultimate goal with listing backup versions? Maybe it would help to understand what you are looking to accomplish. Thanks!

I want to delete some old versions. I want to achieve something like a “grandfather father son” scheme with monthly forever, a few weekly and a few daily. I want manual control over what backup versions to keep.

I’m not sure but it may not be possible to list all backup versions from the command line, but I could easily be wrong.

But you can achieve tiered retention quite easily by using a custom --retention-policy setting. Does that option not do what you’re looking for?

No, I want to manually decide what versions I still need. I will decide this by the date of the version.

Can you suggest any way I can manually delete versions? A combination of GUI and command like would be fine. All command line would be preferable.

Below is the Restore dropdown, with versions and dates:

image

Using the Command line tools from within the Graphical User Interface to find with cleared Commandline arguments and without --exclude and --include filters should also show you:

Running commandline entry
Finished!

            
Listing filesets:
0	: 1/27/2020 7:25:14 PM (4 files, 8 bytes)
1	: 1/27/2020 7:24:32 PM (4 files, 8 bytes)
2	: 1/27/2020 7:22:33 PM (4 files, 8 bytes)
3	: 1/26/2020 10:32:18 PM (2 files, 2 bytes)
4	: 1/26/2020 10:31:30 PM (2 files, 2 bytes)
5	: 1/26/2020 10:30:28 PM (2 files, 2 bytes)
6	: 1/26/2020 10:28:03 PM (2 files, 2 bytes)
7	: 1/26/2020 10:27:00 PM (2 files, 2 bytes)
8	: 1/26/2020 10:22:45 PM (2 files, 2 bytes)
9	: 1/26/2020 10:21:50 PM (1 files, 1 bytes)
10	: 1/26/2020 10:21:29 PM (1 files, 1 bytes)
11	: 1/26/2020 4:58:55 PM (1 files, 1 bytes)
12	: 1/26/2020 4:58:31 PM (3 files, 4.00 MB)
13	: 1/26/2020 4:58:04 PM (3 files, 4.00 MB)
14	: 1/26/2020 4:45:12 PM (1 files, 4.00 MB)
15	: 1/26/2020 4:44:18 PM (2 files, 8.00 MB)
16	: 1/26/2020 4:43:47 PM (2 files, 8.00 MB)
17	: 1/26/2020 4:43:43 PM (2 files, 8.00 MB)
18	: 1/26/2020 9:21:49 AM (1 files, 4.00 MB)
Return code: 0

For true command line (not the GUI one), do the same thing, starting with Export As Command-line.

Note that version 0 is the latest, so make sure a scheduled backup doesn’t run while you’re planning what to delete, because all of your numbers might shift… Actual delete will need the –version option.

EDIT: while there are sizes, these are probably not exactly the concept of size that you have in mind:

I appreciate all your help a lot! I will check this out. I couldn’t figure it out on my own.

Running find with options cleared returns:

Finished!

No files matching, looking in all versions
No files matched expression
Return code: 0

I was able to use the GUI to determine the version numbers. But how did you get the (GUI) command line to display them?

Did you also clear any filters you might have? There might also be other options that are interfering…

OK, indeed there was an exclusion set in the list of options displayed on the GUI command line page. When I remove that I get the desired output.

That filter should not have matched anything, though. Can you help me understand why it changed the find output to be empty?

Find command lists all files in backup instead of specified file is the prior report, but lacks explanation. Experimentally for me, the --exclude that I added is behaving like an --include (which works like itself).

The FIND command says what should be happening. Feel free to file an Issue for a developer to look:

--include=<string>
Reduces the list of files in a backup to those that match the provided string. This is applied before the search is executed.
--exclude=<string>
Removes matching files from the list of files in a backup. This is applied before the search is executed.

OK, I understand. It seems that it would be better to have a separate command that lists the versions. Overloading the find command with these two unrelated modes does not seem very usable.