/Linux-shadow-copies

Shadow copies script for linux

Primary LanguageShellMIT LicenseMIT

Shadow copies scripts and service for Linux

03.08.2017

Requirements

inotify-tools
Optionally: 7Zip, Zip

Installation

Step 1: Get and install files

$ git clone --depth 1 https://github.com/CAI79/Linux-shadow-copies.git
$ cd Linux-shadow-copies
$ cp sc_handler /usr/local/sbin/
$ cp shadow_copies.service /usr/lib/systemd/system/
# if You want to contol more then 1 directory:
$ cp sc_group /usr/local/sbin/

Step 2: Configure service

To control only one directory:

$ nano /usr/lib/systemd/system/shadow_copies.service
  1. Comment "ExecStart=/usr/local/sbin/sc_group" line.
  2. Uncomment next 6 lines and set correct options.

To control more then one directories:

$ nano /usr/local/sbin/sc_group

Add sc_handler commands for all directories You want to be monitored.
Execute following command to view full list of available options:

/usr/local/sbin/sc_handler --help

Step 3: Enable service

$ systemctl enable shadow_copies.service

Step 4: Start service

$ systemctl start shadow_copies.service