[SAC] [OSGeo] #3022: Script to remove everyother snapshots

OSGeo trac_osgeo at osgeo.org
Mon Nov 6 10:54:58 PST 2023


#3022: Script to remove everyother snapshots
-----------------------+---------------------------------------
 Reporter:  cvvergara  |      Owner:  cvvergara
     Type:  task       |     Status:  assigned
 Priority:  normal     |  Milestone:  Sysadmin Contract 2023-II
Component:  SysAdmin   |   Keywords:
-----------------------+---------------------------------------
 Create a script to delete every other snapshot
 Example for **live** container
 {{{
 live
 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 clean.sh 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
 ---------------------------------------------
 live
 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
-- 
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/3022>
OSGeo <https://osgeo.org/>
OSGeo committee and general foundation issue tracker.


More information about the Sac mailing list