EnglishFrenchSpanish

OnWorks favicon

expire_backups - Online in the Cloud

Run expire_backups in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command expire_backups that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


expire_backups - Intelligently expire old backups

SYNOPSIS


expire_backups [options] <age> [<age> ...]

DESCRIPTION


The expire_backups command intelligently remove old backups that are no longer needed.

To define what backups you want to keep for how long, you define a number of age ranges.
expire_backups ensures that you will have at least one backup in each age range at all
times. It will keep exactly as many backups as are required for that and delete any
backups that become redundant.

Age ranges are specified by giving a list of range boundaries in terms of backup cycles.
Every time you create a new backup, the existing backups age by one cycle.

Example: when expire_backups is called with the age range definition 1 3 7 14 31, it will
guarantee that you always have the following backups available:

1. A backup that is 0 to 1 cycles old (i.e, the most recent backup)

2. A backup that is 1 to 3 cycles old

3. A backup that is 3 to 7 cycles old

4. A backup that is 7 to 14 cycles old

5. A backup that is 14 to 31 cycles old

NOTE:
If you do backups in fixed intervals, then one cycle will be equivalent to the backup
interval. The advantage of specifying the age ranges in terms of backup cycles rather
than days or weeks is that it allows you to gracefully handle irregular backup
intervals. Imagine that for some reason you do not turn on your computer for one
month. Now all your backups are at least a month old, and if you had specified the
above backup strategy in terms of absolute ages, they would all be deleted! Specifying
age ranges in terms of backup cycles avoids these sort of problems.

expire_backups usage is simple. It requires backups to be stored in directories of the
form year-month-day_hour:minute:seconds (YYYY-MM-DD_HH:mm:ss) and works on all backups in
the current directory. So for the above backup strategy, the correct invocation would be:

expire_backups.py 1 3 7 14 31

When storing your backups on an S3QL file system, you probably want to specify the
--use-s3qlrm option as well. This tells expire_backups to use the s3qlrm command to delete
directories.

expire_backups uses a "state file" to keep track which backups are how many cycles old
(since this cannot be inferred from the dates contained in the directory names). The
standard name for this state file is .expire_backups.dat. If this file gets damaged or
deleted, expire_backups no longer knows the ages of the backups and refuses to work. In
this case you can use the --reconstruct-state option to try to reconstruct the state from
the backup dates. However, the accuracy of this reconstruction depends strongly on how
rigorous you have been with making backups (it is only completely correct if the time
between subsequent backups has always been exactly the same), so it's generally a good
idea not to tamper with the state file.

OPTIONS


The expire_backups command accepts the following options:

--quiet
be really quiet

--debug-modules <modules>
Activate debugging output from specified modules (use commas to separate
multiple modules). Debug messages will be written to the target specified by the
--log option.

--debug
Activate debugging output from all S3QL modules. Debug messages will be written
to the target specified by the --log option.

--version
just print program version and exit

--state <file>
File to save state information in (default: ".expire_backups.dat")

-n Dry run. Just show which backups would be deleted.

--reconstruct-state
Try to reconstruct a missing state file from backup dates.

--use-s3qlrm
Use s3qlrm command to delete backups.

EXIT CODES


expire_backups may terminate with the following exit codes:

0 Everything went well.

1 An unexpected error occured. This may indicate a bug in the program.

2 Invalid command line argument.

Use expire_backups online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    KDiff3
    KDiff3
    This repository is no longer maintained
    and is kept for archival purposes. See
    https://invent.kde.org/sdk/kdiff3 for
    the newest code and
    https://download.kde.o...
    Download KDiff3
  • 2
    USBLoaderGX
    USBLoaderGX
    USBLoaderGX is a GUI for
    Waninkoko's USB Loader, based on
    libwiigui. It allows listing and
    launching Wii games, Gamecube games and
    homebrew on Wii and WiiU...
    Download USBLoaderGX
  • 3
    Firebird
    Firebird
    Firebird RDBMS offers ANSI SQL features
    & runs on Linux, Windows &
    several Unix platforms. Features
    excellent concurrency & performance
    & power...
    Download Firebird
  • 4
    KompoZer
    KompoZer
    KompoZer is a wysiwyg HTML editor using
    the Mozilla Composer codebase. As
    Nvu's development has been stopped
    in 2005, KompoZer fixes many bugs and
    adds a f...
    Download KompoZer
  • 5
    Free Manga Downloader
    Free Manga Downloader
    The Free Manga Downloader (FMD) is an
    open source application written in
    Object-Pascal for managing and
    downloading manga from various websites.
    This is a mirr...
    Download Free Manga Downloader
  • 6
    UNetbootin
    UNetbootin
    UNetbootin allows you to create bootable
    Live USB drives for Ubuntu, Fedora, and
    other Linux distributions without
    burning a CD. It runs on Windows, Linux,
    and ...
    Download UNetbootin
  • More »

Linux commands

  • 1
    abc2abc
    abc2abc
    abc2abc - a simple abc
    checker/re-formatter/transposer ...
    Run abc2abc
  • 2
    abc2ly
    abc2ly
    abc2ly - manual page for abc2ly
    (LilyPond) 2.18.2 ...
    Run abc2ly
  • 3
    coqdoc
    coqdoc
    coqdoc - A documentation tool for the
    Coq proof assistant ...
    Run coqdoc
  • 4
    coqide
    coqide
    coqide - The Coq Proof Assistant
    graphical interface ...
    Run coqide
  • 5
    g.gui.vdigitgrass
    g.gui.vdigitgrass
    g.gui.vdigit - Interactive editing and
    digitization of vector maps. KEYWORDS:
    general, user interface, GUI, vector,
    editing, digitizer ...
    Run g.gui.vdigitgrass
  • 6
    g.listgrass
    g.listgrass
    g.list - Lists available GRASS data
    base files of the user-specified data
    type optionally using the search
    pattern. KEYWORDS: general, map
    management, list ...
    Run g.listgrass
  • More »

Ad