From 0e865ab7ec42078024ead1332d08b6b2942fa8f1 Mon Sep 17 00:00:00 2001 From: Timur Demin Date: Tue, 4 Jun 2019 02:31:49 +0500 Subject: [PATCH] Add a README --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e06a06d --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +## backup.sh + +As the name suggests, this is a simple backup script written in bash. + +This script came up as a result of rewriting a few backup scripts that +did their job yet shared like 90% of their code. The original scripts +were very hasty, so I tried to remade them into something a little more +presentable. + +At this time this script is capable of dealing with backing up regular +files/directories and PostgreSQL databases. It has a separate Docker +volume backup option, but it's been mainly made to separate those from +configuration files. + +This script is meant to be periodically run with cron/systemd timers. +It comes with example systemd units/timers made to do just that. + +##### Usage + + backup.sh: a simple backup script. + + Usage: + backup.sh [flags] + + Options: + -a | --all: run the default set of backups (configs and Docker as of now) + -p | --postgres: run the backups on PostgreSQL databases + -d | --docker: run the backups on Docker volumes + -c | --configs: run the backups on the files specified in /etc/backups.conf + +##### Configuration options + +The configuration file is located at `/etc/backups.conf`. It has to be a +valid bash script, as it's sourced at the program start. + +For the available options see [the example config file](backups.conf.example).