User callback

Because Back In Time can’t be a swiss knife with all the functionalities for everyone needs, I decided to add a callback. This callback is in the folder “$XDG_CONFIG_HOME/backintime (by default $XDG_CONFIG_HOME is ~/.config).

Starting from Back In Time 1.0

The callback must be called ‘user-callback” and it can be anything your shell can execute.

If this callback exists it is called at different steps of “take snapshot” process and receive several arguments.

  1. Profile Id
  2. Profile Name
  3. Reason:
    • Backup process begins.
    • Backup process ends.
    • A new snapshot was taken. The extra arguments are snapshot ID and snapshot path.
    • There was an error. The second argument is the error code:
      • The application is not configured
      • A “take snapshot” process is already running.
      • Can’t find snapshots directory (is it on a removable drive ?).
      • A snapshot for “now” already exist.

Before Back In Time 1.0

The callback must be called ‘user.callback” and it can be anything your shell can execute.

If this callback exists it is called at different steps of “take snapshot” process and receive several arguments. The first argument is the reason:

  • 1 – Backup process begins.
  • 2 – Backup process ends.
  • 3 – A new snapshot was taken. The extra arguments are snapshot ID and snapshot path.
  • 4 – There was an error. The second argument is the error code:
    • 1 – The application is not configured
    • 2 – A “take snapshot” process is already running.
    • 3 – Can’t find snapshots directory (is it on a removable drive ?).
    • 4 – A snapshot for “now” already exist.