https://github.com/bit-team/user-callback
Example user-callback scripts
https://github.com/bit-team/user-callback
Last synced: 8 months ago
JSON representation
Example user-callback scripts
- Host: GitHub
- URL: https://github.com/bit-team/user-callback
- Owner: bit-team
- Created: 2015-10-13T21:29:33.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-13T21:53:32.000Z (over 1 year ago)
- Last Synced: 2024-05-13T22:51:02.412Z (over 1 year ago)
- Language: Shell
- Size: 43.9 KB
- Stars: 13
- Watchers: 8
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deprecated
The content and functionality of this repository have been moved into the [bit-team/backintime](https://github.com/bit-team/backintime) repository. Please refer to the directory [`doc/user-callback-examples`](https://github.com/bit-team/backintime/tree/dev/doc/user-callback-examples) there. This repository will be removed in the near future.
---
Introduction
============
For further information, see the `backintime `_ repository and its `issue tracker `_.
user-callback
=============
During the backup process, `Back In Time `_ can call a user-callback script at different steps.
This user-callback script is contained in the file ``$XDG_CONFIG_HOME/backintime/user-callback``
(by default ``$XDG_CONFIG_HOME`` is ``~/.config``).
- The first argument is the profile id (1=Main Profile, ...).
- The second argument is the profile name.
- The third 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 fourth argument is the error code.
Possible error codes are:
1. The application is not configured.
2. A "take snapshot" process is already running.
3. Can't find snapshots folder (is it on a removable drive ?).
4. A snapshot for "now" already exist.
5. Error while taking a snapshot (introduced Aug. 17, 2023)
6. New snapshot taken but with errors (introduced Aug. 17, 2023)
The optional fifth argument just for errors is the error message.
5. On (graphical) App start.
6. On (graphical) App close.
7. Mount all necessary drives.
8. Unmount all drives.
For implementation details see the source code in the file ``pluginmanager.py]`` (https://github.com/bit-team/backintime/blob/dev/common/pluginmanager.py).