From d4f902803db697f54b952f48c6268553e9fc79a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Sun, 24 Jul 2016 20:34:35 +0200 Subject: Update README (new features available) --- README | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/README b/README index 464ff47..396cf2f 100644 --- a/README +++ b/README @@ -1,10 +1,14 @@ +Backup script +------------- + Backup script consists of 3 parts. 1) Source backuper.sh 2) Backup definition 3) Run command "backup" -Backup is defined by these parameters: +Available commands for backup definition +---------------------------------------- name - mandatory parametr; one word name of backup @@ -24,9 +28,23 @@ store_file - the result of backup should be stored in file store - specify command that stores backup +after - run command after successful backup (hook) + +result_file - get full path to file with backup + +file_type - (optionally) specify file type of backup; only with command backup (e.g. .sql for DB dumps) + +Configuration +------------- + +Backuper expects configuration file in $HOME/.backuper.sh.conf + +In configuration file is possible to specify there variables: -Example of backup script: +MBUFFER_SIZE - the size of each buffer (mbuffer utility) +GPG_RECIPIENTS - the list of GPG recipients of encrypted backup +Backup script example: ------------------------ #!/bin/sh @@ -36,16 +54,18 @@ Example of backup script: name "postgres" remote "ssh srv" generate "sudo -u postgres" +file_type "sql" # Optional cmd "pg_dumpall" store_file "/mnt/data/backups" backup ------------------------- +----- End of example script ----- -Examples of different backup definitions: +Examples of different backup definitions +---------------------------------------- -(without "name" parameter and "backup" command) +(Without "name" parameter and "backup" command.) 1) Backup all files from srv; exclude /proc, /sys/ and /dev and store it in file in /mnt/data folder: @@ -72,3 +92,9 @@ places "/" exclude "/proc" "/sys" "/dev" run "dpkg --get-selections > /tmp/list_of_packages" store_file "/mnt/data" + +5) Run hook after successful backup + +places "/etc /home /root" +store_file "/mnt/data" +after "cp $(result_file) /mnt/nas/backups/." -- cgit v1.2.3