Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#3022 closed task (fixed)

Script to remove everyother snapshots

Reported by: cvvergara Owned by: cvvergara
Priority: normal Milestone: Sysadmin Contract 2023-II
Component: SysAdmin Keywords:


Create a script to delete every other snapshot Example for live container

osgeo7/containers/live  392G  191G  201G  49% /
- snaps:       snap673 snap674 snap675 snap676 snap677 snap678 snap679 snap680 snap681 snap682 snap683 snap684 snap685 snap686 snap687 snap688 snap689 snap690 snap691 snap692 snap693 snap694 snap695 snap696 snap697 snap698 snap699 snap700 snap701 snap702
- snaps to rm: snap674 snap676 snap678 snap680 snap682 snap684 snap686 snap688 snap690 snap692 snap694 snap696 snap698 snap700 snap702
---- command to remove evey other snap --
bash live run
Executing lxc rm live/snap674
Executing lxc rm live/snap676
Executing lxc rm live/snap678
Executing lxc rm live/snap680
Executing lxc rm live/snap682
Executing lxc rm live/snap684
Executing lxc rm live/snap686
Executing lxc rm live/snap688
Executing lxc rm live/snap690
Executing lxc rm live/snap692
Executing lxc rm live/snap694
Executing lxc rm live/snap696
Executing lxc rm live/snap698
Executing lxc rm live/snap700
Executing lxc rm live/snap702
osgeo7/containers/live  394G  191G  203G  49% /
- snaps:       snap673 snap675 snap677 snap679 snap681 snap683 snap685 snap687 snap689 snap691 snap693 snap695 snap697 snap699 snap701
- snaps to rm: snap675 snap679 snap683 snap687 snap691 snap695 snap699

Only removes the snap# automatically generated does not consider other kinds of snapshots

Change History (2)

comment:1 by cvvergara, 7 months ago

Resolution: fixed
Status: assignedclosed

Script name:

instructions of use

  • To get running containers information
    bash info
    bash container
  • To clean a container
    bash container run

TODO add into ansible and propagate into other machines (on different ticket)

comment:2 by cvvergara, 7 months ago

TODO on #3023

Note: See TracTickets for help on using tickets.