STOREBACKUPDEL(1)

πŸ“¦
version 3.5.2 Β· 3 versions
, in ubuntu stonking

πŸ’Ύ NAME πŸ’Ύ

okay so bestie, welcome to storeBackupDel.pl β€” this program deletes backups created by storeBackup πŸ—‘οΈβœ¨ yes it's literally the little gremlin that cleans up after the backup party. it's manual section 1, in the User Contributed Perl Documentation collection, iykyk 🫢


✨ SYNOPSIS ✨

storeBackupDel.pl [-f configFile] [--print]
[-b backupDirectory] [-S series] [--doNotDelete]
[--deleteNotFinishedDirs] [-L lockFile]
[--keepAll timePeriod] [--keepWeekday entry] [--keepFirstOfYear]
[--keepLastOfYear] [--keepFirstOfMonth] [--keepLastOfMonth]
[--keepFirstOfWeek] [--keepLastOfWeek]
[--keepDuplicate] [--keepMinNumber] [--keepMaxNumber]
[-l logFile
 [--plusLogStdout] [--suppressTime] [-m maxFilelen]
 [[-n noOfOldFiles] | [--saveLogs]
 [--compressWith compressprog]]

🚨 WARNING 🚨

!!! USAGE IN PARALLEL WITH storeBackup.pl CAN DESTROY YOUR BACKUPS !!!

no like fr fr. run this at the same time as storeBackup.pl and your backups can get destroyed πŸ’€ that's not a vibe, that's a tragedy. don't do it.


πŸŽ€ OPTIONS πŸŽ€

  • --file, -f β€” the configuration file, used instead of parameters. so instead of yelling all your flags at it, you hand it a file.
  • --print β€” prints the configuration it read from the configuration file, then stops. like "here's what you told me bestie, k bye" πŸ–¨οΈ
  • --backupDir, -b β€” the top level directory of all backups. and heads up, it must exist already, okay? it will not create it for you.
  • --series, -S β€” directory of the backup series. same parameter as in storeBackup, and it's a relative path from backupDir. default is 'default' ✨
  • --lockFile, -L β€” lock file. if it exists, new instances will finish if an old one is already running. default is $lockFile.
okay real talk, this type of lock file does not work across multiple servers, and it is not designed to separate storeBackup.pl and storeBackupUpdateBackup.pl or any other storeBackup process in a separate PID space.

default lock file location for root is in /var/lock, for others it's in $HOME.

  • --doNotDelete β€” test only bestie, it does not delete any backup. a little dress rehearsal πŸ’…
  • --deleteNotFinishedDirs β€” delete old backups which were not finished. this will not happen if doNotDelete is set.
  • --keepAll β€” keep backups which are not older than the specified amount of time. this is like a default value for all days in --keepWeekday. begins deleting at the end of the script. the time range has to be specified in the format 'dhms', e.g. 10d4h means 10 days and 4 hours. default = $keepAll;
  • --keepWeekday β€” keep backups for the specified days for the specified amount of time. overwrites the default values chosen in --keepAll. 'Mon,Wed:40d Sat:60d10m' means:
    • keep backups of Mon and Wed 40days + 5mins
    • keep backups of Sat 60days + 10mins
    • keep backups of the rest of the days like spcified in --keepAll (default $keepAll)

if you also use the 'archive flag' it means to not delete the affected directories via --keepMaxNumber: a10d4h means 10 days and 4 hours and 'archive flag'. e.g. 'Mon,Wed:a40d Sat:60d10m' means:

  • keep backups of Mon and Wed 40days + 5mins + 'archive'
  • keep backups of Sat 60days + 10mins
  • keep backups of the rest of the days like specified in --keepAll (default $keepAll)
  • --keepFirstOfYear β€” do not delete the first backup of a year. format is timePeriod with possible 'archive flag'.
  • --keepLastOfYear β€” do not delete the last backup of a year. format is timePeriod with possible 'archive flag'.
  • --keepFirstOfMonth β€” do not delete the first backup of a month. format is timePeriod with possible 'archive flag'.
  • --keepLastOfMonth β€” do not delete the last backup of a month. format is timePeriod with possible 'archive flag'.
  • --firstDayOfWeek β€” default: 'Sun'. this value is used for calculating --keepFirstOfWeek and --keepLastOfWeek. little setting, big consequences 🌞
  • --keepFirstOfWeek β€” do not delete the first backup of a week. format is timePeriod with possible 'archive flag'.
  • --keepLastOfWeek β€” do not delete the last backup of a week. format is timePeriod with possible 'archive flag'.
  • --keepDuplicate β€” keep multiple backups of one day up to timePeriod. format is timePeriod, 'archive flag' is not possible here. default = $keepDuplicate;
  • --keepMinNumber β€” keep that miminum of backups. multiple backups of one day are counted as one backup. default is 10.
  • --keepMaxNumber β€” try to keep only that maximum of backups. if you have more backups, the following sequence of deleting will happen:
    • delete all duplicates of a day, beginning with the old once, except the oldest of every day
    • if this is not enough, delete the rest of the backups beginning with the oldest, but never a backup with the 'archive flag' or the last backup
  • --keepRelative, -R β€” alternative deletion scheme. if you use this option, all other keep options are ignored. preserves backups depending on their relative age. example:

-R '1d 7d 61d 92d'

will (try to) ensure that there is always:

  • One backup between 1 day and 7 days old
  • One backup between 5 days and 2 months old
  • One backup between 2 months and 3 months old

if there is no backup for a specified timespan (e.g. because the last backup was done more than 2 weeks ago) the next older backup will be used for this timespan.

  • --logFile, -l β€” log file. default is STDOUT.
  • --plusLogStdout β€” if you specify a log file with --logFile you can additionally print the output to STDOUT with this flag. why not both, honestly πŸ“
  • --suppressTime β€” suppress output of time in logfile.
  • --maxFilelen, -m β€” maximal length of file, default = 1e6.
  • --noOfOldFiles, -n β€” number of old log files, default = 5.
  • --saveLogs β€” save log files with date and time instead of deleting the old ones (with [-noOfOldFiles]).
  • --compressWith β€” compress saved log files (e.g. with 'gzip -9'). default is 'bzip2'.

Copyright (c) 2003-2022 by Heinz-Josef Claes (see README). Published under the GNU General Public License v3 or any later version. iconic licensing behavior honestly πŸ‘‘


and that's the whole page, bestie πŸ¦‹ this one came from perl v5.40.1, dated 2026-05-23 β€” go forth and delete responsibly, and never next to storeBackup.pl πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from