Prune with multiple -ignore options

I’m attempting a Prune job on one storage, which contains four snapshot IDs, and I want to avoid pruning two of the IDs. I’m using the following options:

-exclusive -keep 0:90 -keep 7:30 -keep 1:3 -ignore clonezilla -ignore scyllams_part

The results are that nothing gets pruned in the storage, and I suspect I’m using the “-ignore” option incorrectly.

Any guidance on how to achieve what I’m after would be appreciated.

You seem to have specified what to ignore but not what to prune.

If you don’t specify what to prune, the default id gets pruned. If default id is one of the ignored ones — then nothing is pruned.

Since you want to prune all ids except a few, you need to specify -all and a bunch of -ignore.

You are missing the -all flag..

Edit. See this comment below: Prune with multiple -ignore options - #5 by Droolio about —ignore flag, which is not at all what it seems.

Weeeell… I made the change per your recommendation. Options were updated to:

-exclusive -all -ignore clonezilla -ignore scyllams_part -keep 0:90 -keep 7:30 -keep 1:3

Results - the Prune job removed ALL the revisions for both “clonezilla” and “scyllams_part” from the storage despite the “-ignore” options. Both ID’s were intended to be archives, not subject to pruning.

So that didn’t go as planned! Thoughts?

(note: I’ve got these ID’s on multiple storages, so I’m not freaking out)

I don’t think the -ignore flag does what you think it does…

Ignore revisions with the specified snapshot ID when deciding if fossils can be deleted.

Emphasis added.

This doesn’t exclude those IDs from pruning. For that, you need to specify all other IDs and not use -all.

I believe -ignore is akin to allowing a backup ID to age 7 days since the last backup, which in turn is a safety cut-off point to prevent fossils getting removed prematurely. You can force this with -ignore (if the last backup <7 days).

This is about fossils - not snapshots. All snapshot IDs under the -keep criteria should get removed in the first stage of a prune operation, if so specified by -all or -id.

1 Like

That makes sense, and I did note the specific reference to fossils.

So, what’s the cleanest method if I have four snapshot IDs and wish to leave two alone and prune the other two? Two separate Prune jobs? Or can you specify multiple IDs in the Prune command? I didn’t think that was valid/supported.

(note to self: start using the -dry-run switch when testing)

I think you’re correct.

Couldn’t remember if it did or not, since I simply use -all, but did a little search and this has been discussed before (and, coincidentally, the -ignore flag is mentioned too).

It’d certainly be nice if Duplicacy had better selectors in various commands’ parameters. (For me, specifically, the copy command should allow multiple id:rev’s, and a -latest.)

In the meantime, I’d honestly suggest keeping a separate storage for archival. You’ll lose duplication but, at the same time, can optimise your compression ratios and/or erasure coding. Otherwise, I believe several runs of -collect-only on each ID might be slightly more efficient (as per linked thread).

Sorry for that. I’m the doofus here who can’t read documentation. Thank you @Droolio for pointing this out. I’ve edited my misguided comment. (Note to self — don’t hang out on forums past midnight)

Eh, no worries. I should have done a dry run test before allowing the prune to remove the archives. But they’ve been restored now.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.