More Documentation

I am trying to use Duplicati as a server based backup tool without a desktop. I have managed to create backups, and restore files with just the cli command.

Am I able to manage the retention of the backups automagically with just duplicati-cli, or would I have to build my own rotation script?

Is it possible to do block or image based backups with only the duplicati-cli? I have searched the forums, and have not managed to find out how-to make snapshots with the CLI.

If anyone can provide me with some direction or documentation regarding these two features that would be amazing.

Hi @scotte, welcome to the forum!

Assuming you’re using Duplicati 2, you don’t need a custom rotation script. Depending on how you want retention to be set up you could use any of these command line parameters:

Use this option to set the timespan in which backups are kept.

Use this option to set number of versions to keep, supply -1 to keep all versions

Use this option to reduce the number of versions that are kept with increasing version age by deleting most of the old backups. The expected format is a comma seperated list of collon sperated time frame and interval pairs. For example the value “7D:0s,3M:1D,10Y:2M” means "For 7 day keep all backups, for 3 months keep one backup per day and for 10 years one backup every 2nd month

I’m not sure what you mean by “block or image based backups”. If “image based” means an image of your entire drive so you could, for example, restore it onto a whole new drive and just boot to it then the answer is “no”. Since Duplicati does file level backups it won’t store things like disk format, boot sectors, etc.

Thank you for the quick reply, and I am currently testing Duplicati 2. The actual version number is “”. The retention policy command is not under the “Advanced” section on the cli. This is the error I receive:

The supplied option --retention-policy is not supported and will be ignored.

I see the tool has a LVM snapshot utility. Does this provide a LVM image that can be restored, or is it used to grab files that are in use/locked only.

That would explain when you’re not seeing --retention-policy as it was added to the GUI in v canary (though I believe it was available as an advanced parameter a few canary versions earlier).

Until you upgrade to a newer version that includes the feature you should still be able to use the time (delete versions older than X days) or version (delete versions higher than Y) based policies.

I believe the LVM functionality is strictly for in-use / locked file access at this time.