aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robin Obůrka <r.oburka@gmail.com> 2016-07-24 20:34:35 +0200
committerGravatar Robin Obůrka <r.oburka@gmail.com> 2016-07-24 20:44:33 +0200
commitd4f902803db697f54b952f48c6268553e9fc79a8 (patch)
tree4f2a8143acfa9468d52bff6e4541a1efed3db62a
parentMake file name sensitive to backup content (diff)
downloadbackuper-d4f902803db697f54b952f48c6268553e9fc79a8.tar.xz
Update README (new features available)
-rw-r--r--README36
1 files 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/."