Auto directory backup daemon for Linux - based systems.
Makes a backup copy of any file created, modified, moved-to the --dir directory, to --bak directory (with .bak extension).
Allowed args:
-h [ --help ] show help
-v [ --version ] show version
-D [ --debug ] enable debug logging
-s [ --silent ] disable console log
-d [ --dir ] arg directory to monitor
-b [ --bak ] arg directory to create backups to
-l [ --log ] arg log file pathNote:
- Files that are inside of monitored, prior to application launch, won't be backed-up.
- Directories, hidden files (with filename
.name.ext), irregular files (links, devices) are ignored. - Files prefixed with
delete_will be deleted immediately, their corresponding file (w/o prefix) will be deleted too, as well as the backed-up file. - Files prefixed with
delete_ISODATETIME_(e.g.delete_2021-07-30T12:13:14_) will be deleted at specified time (if, of course, that time is in future).
Install the required dependencies (instructions tested on Ubuntu 18.04).
Update sources:
$ apt updateBoost libs:
$ apt install libboost-all-devBuild tools:
$ apt install build-essential cmakeClone the repo to directory of your choice:
$ git clone https://github.com/matislovas/backupd.git && cd backupdPrepare build env:
$ mkdir build && cd buildRun cmake (with some additional flags, if you like):
$ cmake [-DCMAKE_BUILD_TYPE=Debug] ..Than build:
$ makeIf you wish, you can install it in /usr/bin:
$ make installInit acutest submodule:
$ git submodule update --initRun cmake with tests enabled:
$ cd build && cmake [-DBACKUPD_TEST=ON] ..Run actual tests:
$ ../bin/backupd-test