Dropping snapshot that was used as source for other snapshots

89 views
Skip to first unread message

ludovico...@gmail.com

unread,
Sep 10, 2017, 10:49:19 AM9/10/17
to aptly-discuss
Hi,

Let's say I have snapshot A and B. Then I create a new snapshot AB (merging A and B), and I publish AB.

If I try to drop A or B, aptly will not do that, unless I use -force.

E.g.

aptly -config aptly.conf snapshot merge snapAB snapA snapB

aptly -config aptly.conf snapshot drop snapA
Snapshot `snapA` was used as a source in following snapshots:
* [snapAB]: Merged from sources: 'snapA', 'snapA'
ERROR: won't delete snapshot that was used as source for other snapshots, use -force to override


Is there any drawback in doing that?

Thanks,
Ludo

Message has been deleted

Andrey Smirnov

unread,
Jun 5, 2018, 10:22:20 AM6/5/18
to Joost Ringoot, aptly-discuss
Ludo,

You can always drop snapshot except for the snapshots which are published. Dropping snapA & snapB won't affect snapAB. aptly tries to protect snapA & snapB, as if you drop them there's no way to re-create snapAB exactly as it was created.

In general, snapshot is taking up just small amount of space in the database, it's just a list of package IDs. So dropping source snapshots won't save a lot of disk space. Package files are refcounted and they're stored only once in the system, no matter how many times they're used in snapshots or other aptly objects.

On Tue, Jun 5, 2018 at 5:11 PM Joost Ringoot <jrin...@gmail.com> wrote:
You will destroy the snapshot snapAB as well.
I think it is good/better practice, if you drop the merged snapshots first and as last the snapshots that are created from a mirror
I see this as usefull to avoid messing up things too much when you make errors in scripts that would automagically create/merge/drop snapshots


Op zondag 10 september 2017 16:49:19 UTC+2 schreef ludovico...@gmail.com:
--
You received this message because you are subscribed to the Google Groups "aptly-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aptly-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages