Skip to content
Snippets Groups Projects
Verified Commit 3083a0a5 authored by David Beniamine's avatar David Beniamine
Browse files

More doc

parent c9081d6d
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,10 @@ This script is meant to be run by small buisness at closing time. ...@@ -7,7 +7,10 @@ This script is meant to be run by small buisness at closing time.
## Install ## 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` 1. Install dependencies : `apt-get install zenity rsync`
2. Copy `simple_backup.env.sample` to `simple_backup.env` and edit it to your needs 2. Copy `simple_backup.env.sample` to `simple_backup.env` and set directories and destination
3. Add a crontab entry like `0 19 * * 1-5 /path/to/simple_backup.sh` 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.
export DIRECTORIES="" export DIRECTORIES="/home/documents /home/bureau"
export DESTINATION="" export DESTINATION="/media/user/backup/user"
export TIMEOUT="30" export TIMEOUT="30"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment