From 3083a0a5a0a4cbab5f1875fd5f0d153d3a048fa5 Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Fri, 6 Oct 2017 16:14:02 +0200 Subject: [PATCH] More doc --- Readme.md | 7 +++++-- simple_backup.env.sample | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index a33ca40..128e05e 100644 --- a/Readme.md +++ b/Readme.md @@ -7,7 +7,10 @@ This script is meant to be run by small buisness at closing time. ## Install +0. Clone this repo `git clone https://gitlab.tetras-libre.fr/tetras-libre/simple_backup.sh`, if required, install git before `sudo apt-get install git` 1. Install dependencies : `apt-get install zenity rsync` -2. Copy `simple_backup.env.sample` to `simple_backup.env` and edit it to your needs -3. Add a crontab entry like `0 19 * * 1-5 /path/to/simple_backup.sh` +2. Copy `simple_backup.env.sample` to `simple_backup.env` and set directories and destination +3. Add fstab entry to mount destination for instance for a NFS, add the following line to `/etc/fstab` : `//<serverip>/<directory> /media/user/backup cifs user,username=<user>,password=<password> 0 0 `, adapt every field between `<>` to your needs. +3. Add a crontab entry with command `crontab -e` like `30 18 * * * /path/to/simple_backup.sh` +4. Allow user to shutdown : `sudo visudo` and add : `user ALL=(root) NOPASSWD: /sbin/shutdown` at the end of the file, replacing 'user' by the username of the connected user. diff --git a/simple_backup.env.sample b/simple_backup.env.sample index 37e60d6..aede4ef 100644 --- a/simple_backup.env.sample +++ b/simple_backup.env.sample @@ -1,3 +1,3 @@ -export DIRECTORIES="" -export DESTINATION="" +export DIRECTORIES="/home/documents /home/bureau" +export DESTINATION="/media/user/backup/user" export TIMEOUT="30" -- GitLab