Ammammata
2021-02-10 11:35:28 UTC
there's a backup scheduled daily for many different files
the related filenames are unique, i.e.
RSP_backup_2021_02_09_200005_8336305.bak
RSP_backup_2021_02_08_200007_8776502.bak
RSP_backup_2021_02_07_200005_8652391.bak
RSP_backup_2021_02_06_200005_4658428.bak
RSP_backup_2021_02_05_200005_1944601.bak
RSP_backup_2021_02_04_200005_6798320.bak
RSP_backup_2021_02_03_200005_4282408.bak
RSP_backup_2021_02_02_200005_0172624.bak
RSP_backup_2021_02_01_200005_9353583.bak
RSP_backup_2021_01_31_200006_2371866.bak
RSP_backup_2020_12_31_200003_2429004.bak
RSP_backup_2020_10_24_200004_0066296.bak
I'd like to delete, about every 3-4 months, all the backups except the
lates of every single month, tipically those with date 31/10/20 30/11/20
31/12/20 31/01/21 etc
in the above list you can see I kept current month (feb) and left the
latest of each previous one (jan, dec, oct)
I do this manually, right now it's not a huge tast, using a file manager,
but I wonder whether there is an automated solution since the different
backups will grow
TIA
the related filenames are unique, i.e.
RSP_backup_2021_02_09_200005_8336305.bak
RSP_backup_2021_02_08_200007_8776502.bak
RSP_backup_2021_02_07_200005_8652391.bak
RSP_backup_2021_02_06_200005_4658428.bak
RSP_backup_2021_02_05_200005_1944601.bak
RSP_backup_2021_02_04_200005_6798320.bak
RSP_backup_2021_02_03_200005_4282408.bak
RSP_backup_2021_02_02_200005_0172624.bak
RSP_backup_2021_02_01_200005_9353583.bak
RSP_backup_2021_01_31_200006_2371866.bak
RSP_backup_2020_12_31_200003_2429004.bak
RSP_backup_2020_10_24_200004_0066296.bak
I'd like to delete, about every 3-4 months, all the backups except the
lates of every single month, tipically those with date 31/10/20 30/11/20
31/12/20 31/01/21 etc
in the above list you can see I kept current month (feb) and left the
latest of each previous one (jan, dec, oct)
I do this manually, right now it's not a huge tast, using a file manager,
but I wonder whether there is an automated solution since the different
backups will grow
TIA
--
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
........... [ al lavoro ] ...........
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
........... [ al lavoro ] ...........