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 path
Note:
- 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 update
Boost libs:
$ apt install libboost-all-dev
Build tools:
$ apt install build-essential cmake
Clone the repo to directory of your choice:
$ git clone https://github.com/matislovas/backupd.git && cd backupd
Prepare build env:
$ mkdir build && cd build
Run cmake (with some additional flags, if you like):
$ cmake [-DCMAKE_BUILD_TYPE=Debug] ..
Than build:
$ make
If you wish, you can install it in /usr/bin
:
$ make install
Init acutest
submodule:
$ git submodule update --init
Run cmake with tests enabled:
$ cd build && cmake [-DBACKUPD_TEST=ON] ..
Run actual tests:
$ ../bin/backupd-test