From 2aed415947605fd5b069d52816f6d026ed316372 Mon Sep 17 00:00:00 2001 From: Anton Bracke Date: Wed, 19 Sep 2018 08:47:16 +0000 Subject: [PATCH] =?UTF-8?q?'README.md'=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f51ffc6 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# Borg backup script +## Installation +``` +git clone ... +cp config.exp config +nano config + +``` +* Now set your config +``` +ssh-keygen -t rsa -b 4096 -f id_backup + +``` +* Copy content of id_backup to your backup server. (~/.ssh/authorized_keys) IMPORTANT: use correct user (exp. "borg")! +``` +crontab -e + +``` +> 0 3 * * * /opt/backup/run.sh > /dev/null 2>&1 + + +## Config +### Add folders to backup +``` +nano run.sh + +``` +Add your folders to "borg create" and don't forget "\" on each, but the last line. + +### Set backup pruning +``` +nano run.sh +``` +> borg prune \ +> --list \ +> --prefix '{hostname}-' \ +> --show-rc \ +> --keep-daily 7 \ +> --keep-weekly 4 \ +> --keep-monthly 6