wesbarnett / snap-pac

Pacman hooks that use snapper to create pre/post btrfs snapshots like openSUSE's YaST
GNU General Public License v2.0
183 stars 14 forks source link

Provide way to do automated housekeeping? #31

Closed etiago closed 4 years ago

etiago commented 4 years ago

Hi Wes,

Thanks for your great work with this!

I'm using snap-pac and I noticed it just carries on creating snapshots for every pacman command that I issue... but as far as I can tell, it doesn't seem to housekeep any of the older snapshots.

Unless my understanding is wrong, if left untouched, it's just a matter of time before the storage gets completely full by snapshots as I keep installing, uninstalling and updating packages.

Do you think it'd be possible to have some form of automated housekeeping built into this package? Or do you have an alternative suggestion for this?

wesbarnett commented 4 years ago

Hi Tiago, by default the snapshots are set to cleanup via snapper's cleanup service using the "number" option (when a certain number of snapshots with that setting are reached, the oldest snapshots are removed). Ensure that you have snapper-cleanup.timer enabled (with Arch it is set to cleanup daily be default) and that NUMBER_CLEANUP is set to yes in the snapper configuration. See man 5 snapper-configs for more settings related to it.

etiago commented 4 years ago

Hi Wes, many thanks for your reply - I was unaware that snap-pac was using the number strategy. Hopefully this will be useful for others in the future :smile: thanks again for this plugin - very useful!

wesbarnett commented 4 years ago

Not a problem. 😃 I failed to mention that the user can change the cleanup algorithm used. See ‘man snap-pac’ for how to do that.

Sent from my iPhone

On Nov 4, 2019, at 3:45 AM, Tiago Espinha notifications@github.com wrote:

 Hi Wes, many thanks for your reply - I was unaware that snap-pac was using the number strategy. Hopefully this will be useful for others in the future 😄 thanks again for this plugin - very useful!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.