This documentation is not finished yet!

1. Features

  • command line tool

  • creates differential backups using dar

  • backups are encrypted using gnupg

  • automatically deletes old backups so that further back in time there is a lower temporal density (see details below) and storage use is limited

2. Requirements

As stated in the above section you need dar and gpg. The script itself needs python. So, for a debian based linux distribution you need to install packages python, dar and gnupg.

3. Details

3.1. Create

Lets assume that you create a backup every day (but it works just the same in case you only do it occasionally).

A full backup (lets call it level one) is created when a series is started. Every n days (can be configured, lets say n=30) a new differential backup against this full backup is created (lets call it level two). In between those level two backups, a number of level three backups are created, which depend on the level one and two and all level three backups since the most current level two backup.

To start a new series (create a new level one backup) tbkp has to be called with the option --full.

3.2. Delete

Backups are automatically deleted as explained below.

You’ll always have every backup created since the most recent two level two backups, which means at least latest n days, at most 2*n days.

Level two backups are deleted according to the following scheme in which every hash marks are level two backup and every line marks the creation of a new level two backup. So the one on the right is the most current one.

# 0
#  # 1
#  #  # 2
#     #  # 3, delete 1
#     #  #  # 4
#     #     #  # 5, delete 3
#           #  #  # 6, delete 2
#           #     #  # 7, delete 5
#           #     #  #  # 8
#           #     #     #  # 9, delete 7
#           #           #  #  # 10, delete 6
#           #           #     #  # 11, delete 9
#                       #     #  #  # 12, delete 4
#                       #     #     #  # 13, delete 11
#                       #           #  #  # 14, delete 10
#                       #           #     #  # 15, delete 13
                        #           #     #  #  # 16, delete 0
                        #           #     #     #  # 17, delete 15
....and so on...

It shows that when number 3 had been created, number 1 was deleted and so on. You can see that backup density is higher for recent backups than for times longer ago. The oldest level 2 backup has an age of at least eight periods, but up to sixteen periods.

In this implemention however, something is deleted a call later than shown above.

3.3. Configuration files

Sample configuration files are included in the download.

4. Download


Letzte Änderung: 24.02.2021 07:59
Jens W. Wulf

Impressum
Datenschutzerklärung