aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/rbup/rbup.conf72
-rw-r--r--etc/rbup/rbup.conf.2017-05-21.0138
-rw-r--r--etc/rbup/storage1.conf31
3 files changed, 85 insertions, 56 deletions
diff --git a/etc/rbup/rbup.conf b/etc/rbup/rbup.conf
index 157c9f9..fd34bb0 100644
--- a/etc/rbup/rbup.conf
+++ b/etc/rbup/rbup.conf
@@ -1,31 +1,67 @@
# File: /etc/rbup/rbup.conf
-# Hierarchy of precedence, and the last defined option being used.
-# conffile (default is /etc/rbup/rbup.conf)
-# command line environment
-# flags given to rbup.sh
+# Author:
+# Startdate: 2017-05-20
+# Title: Rbup conf file
+# Purpose: To define the default backup job
+# History:
+# Usage: /usr/bin/rbup -c /etc/rbup/rbup.conf
+# Hierarchy of precendence, with first item being the one used for a variable:
+# 1. Flags given on the command line
+# 2. Command line environment
+# 3. Config file passed via -c /etc/rbup/example.conf
+# 4. Default config: /etc/rbup/rbup.conf
+# Reference:
+# Improve:
+# Document: Below this line
+
+# RBUP_NOW: used only by the log file definition later on.
RBUP_NOW="$( date "+%Y-%m-%dT%H%M%S" )"
+
+# RBUP_SYNC_CMD: what executable to use
RBUP_SYNC_CMD=/bin/rsync
+
+# RBUP_SYNC_OPTS: main flags passed to the executabe.
RBUP_SYNC_OPTS="-rlptgoDEA"
+
+# RBUP_SYNC_OPT_VERBOSE: and RBUP_SYNC_OPT_NOT_VERBOSE: which flags to pass when RBUP_VERBOSE or not
RBUP_SYNC_OPT_VERBOSE="-v"
RBUP_SYNC_OPT_NOT_VERBOSE=""
+
+# RBUP_SYNC_OPT_APPLY: and RBUP_SYNC_OPT_NOT_APPLY: which flags to pass when RBUP_ENABLED or not
RBUP_SYNC_OPT_APPLY=""
RBUP_SYNC_OPT_NOT_APPLY="-n"
-RBUP_DEST_MOUNT_CMD="mount jonathan:/volume1/sword /mnt/jonathan/"
-RBUP_DEST_UMOUNT_CMD="umount -l /mnt/jonathan/"
-RBUP_DEST=/mnt/jonathan
+
+# RBUP_LOG_DIR: where to store logs. Is auto-generated in case it does not exist.
RBUP_LOG_DIR=/var/log/rbup
-# RBUP_ENABLED value determines if the actual operation occurs.
-#if true, will use the SYNC_OPT_NOT_APPLY option
+# RBUP_ENABLED: toggles RBUP_SYNC_OPT_APPLY and RBUP_SYNC_OPT_NOT_APPLY
RBUP_ENABLED=yes
-RBUP_VERBOSE=yes # can be overridden by the -v/-q flag or by the job options
+# RBUP_VERBOSE: toggles RBUP_SYNC_OPT_VERBOSE and RBUP_SYNC_OPT_NOT_VERBOSE
+RBUP_VERBOSE=yes
+
+## JOB SPECIFIC VALUES
+# RBUP_DEST_MOUNT_CMD: and RBUP_DEST_UMOUNT_CMD: the commands to mount the destinationat the start and to dismount when done. If blank, will be ignored.
+#RBUP_DEST_MOUNT_CMD="mount nas1:/volume1/share /mnt/nas1/"
+#RBUP_DEST_UMOUNT_CMD="umount -l /mnt/nas1/"
+
+# RBUP_DEST: destination of the sync
+#RBUP_DEST=/mnt/nas1/
+
+# RBUP_JOB_NAME: used only for RBUP_LOG_FILE
+#RBUP_JOB_NAME="example"
+
+# RBUP_SOURCE: source of the sync
+#RBUP_SOURCE=/var/storage1/shares
+
+# RBUP_CHECKSUM_COUNT: how many files to checksum before mounting destination
+#RBUP_CHECKSUM_COUNT=1
+
+# RBUP_CHECKSUM_1_FILE: path to check
+#RBUP_CHECKSUM_1_FILE="/var/storage1/shares/public/Age Of Empires/Installing-AoFE-on-Linux 2016-01-29.odt"
+
+# RBUP_CHECKSUM_1_SHA256SUM: the output of $( sha256sum /path/ | awk '{print $1}' )
+#RBUP_CHECKSUM_1_SHA256SUM=407ad21ce6b6ddb9a7f6a907134155431306a6b0450fedc3981d65311ff91c06
-# JOB SPECIFIC VALUES
-RBUP_JOB_NAME="mainbackup"
-RBUP_SOURCE=/var/storage1/shares
-RBUP_CHECKSUM_COUNT=1
-RBUP_CHECKSUM_1_FILE="/var/storage1/shares/public/Age Of Empires/Installing-AoFE-on-Linux 2016-01-29.odt"
-RBUP_CHECKSUM_1_SHA256SUM=407ad21ce6b6ddb9a7f6a907134155431306a6b0450fedc3981d65311ff91c06
-RBUP_LOG_FILE=${RBUP_LOG_DIR}/${RBUP_JOB_NAME}.${RBUP_NOW}.log
-#RBUP_LOG_FILE=/dev/null
+# RBUP_LOG_FILE: where to store logs
+#RBUP_LOG_FILE=${RBUP_LOG_DIR}/${RBUP_JOB_NAME}.${RBUP_NOW}.log
diff --git a/etc/rbup/rbup.conf.2017-05-21.01 b/etc/rbup/rbup.conf.2017-05-21.01
deleted file mode 100644
index 810d43b..0000000
--- a/etc/rbup/rbup.conf.2017-05-21.01
+++ /dev/null
@@ -1,38 +0,0 @@
-# File: /etc/rbup/rbup.conf
-# Hierarchy of precedence, and the last defined option being used.
-# /etc/rbup/rbup.conf [rbup:default]
-# /etc/rbup/rbup.conf [rbup:job]
-# file from flag -c /etc/other-file.conf
-# command line environment
-# other flags
-[rbup:default]
-RBUP_SYNC_CMD=/bin/rsync
-RBUP_SYNC_OPTS="-rlptgODwhatever"
-RBUP_SYNC_OPT_VERBOSE="-v"
-RBUP_SYNC_OPT_APPLY="-n"
-RBUP_DEST_MOUNT_CMD="mount -v jonathan:/volume1/sword /mnt/jonathan/"
-RBUP_DEST_UMOUNT_CMD="umount -l /mnt/jonathan/"
-RBUP_DEST=/mnt/jonathan
-RBUP_LOG_DIR=/var/log/rbup/
-RBUP_LOG_FILE=${RBUP_LOG_DIR}/${RBUP_JOB_NAME}.${NOW}.log
-
-RBUP_VERBOSE=yes # can be overridden by the -v/-q flag or by the job options
-
-[rbup:main]
-RBUP_JOB_NAME="mainbackup"
-RBUP_JOB_DESCRIPTION="Any extra notes can go here."
-RBUP_SOURCE=/var/storage1/shares
-#RBUP_JOB_DEST=${RBUP_DEST_DEFAULT}/backups/shares # in case you want to override it
-RBUP_CHECKSUM_COUNT=1
-RBUP_CHECKSUM_1_FILE="/var/storage1/shares/public/Age Of Empires/Installing-AoFE-on-Linux 2016-01-29.odt"
-RBUP_CHECKSUM_1_SHA256SUM=407ad21ce6b6ddb9a7f6a907134155431306a6b0450fedc3981d65311ff91c06
-
-[rbup:test]
-RBUP_JOB_NAME="testjob5"
-RBUP_JOB_DESCRIPTION="test job"
-RBUP_SOURCE=/var/storage1/shares/public
-#RBUP_JOB_DEST=${RBUP_DEST_DEFAULT}/backups/shares # in case you want to override it
-RBUP_CHECKSUM_COUNT=1
-RBUP_CHECKSUM_1_FILE="/var/storage1/shares/public/Age Of Empires/Installing-AoFE-on-Linux 2016-01-29.odt"
-RBUP_CHECKSUM_1_SHA256SUM=407ad21ce6b6ddb9a7f6a907134155431306a6b0450fedc3981d65311ff91c06
-RBUP_DEST=/mnt/foo
diff --git a/etc/rbup/storage1.conf b/etc/rbup/storage1.conf
new file mode 100644
index 0000000..157c9f9
--- /dev/null
+++ b/etc/rbup/storage1.conf
@@ -0,0 +1,31 @@
+# File: /etc/rbup/rbup.conf
+# Hierarchy of precedence, and the last defined option being used.
+# conffile (default is /etc/rbup/rbup.conf)
+# command line environment
+# flags given to rbup.sh
+RBUP_NOW="$( date "+%Y-%m-%dT%H%M%S" )"
+RBUP_SYNC_CMD=/bin/rsync
+RBUP_SYNC_OPTS="-rlptgoDEA"
+RBUP_SYNC_OPT_VERBOSE="-v"
+RBUP_SYNC_OPT_NOT_VERBOSE=""
+RBUP_SYNC_OPT_APPLY=""
+RBUP_SYNC_OPT_NOT_APPLY="-n"
+RBUP_DEST_MOUNT_CMD="mount jonathan:/volume1/sword /mnt/jonathan/"
+RBUP_DEST_UMOUNT_CMD="umount -l /mnt/jonathan/"
+RBUP_DEST=/mnt/jonathan
+RBUP_LOG_DIR=/var/log/rbup
+
+# RBUP_ENABLED value determines if the actual operation occurs.
+#if true, will use the SYNC_OPT_NOT_APPLY option
+RBUP_ENABLED=yes
+
+RBUP_VERBOSE=yes # can be overridden by the -v/-q flag or by the job options
+
+# JOB SPECIFIC VALUES
+RBUP_JOB_NAME="mainbackup"
+RBUP_SOURCE=/var/storage1/shares
+RBUP_CHECKSUM_COUNT=1
+RBUP_CHECKSUM_1_FILE="/var/storage1/shares/public/Age Of Empires/Installing-AoFE-on-Linux 2016-01-29.odt"
+RBUP_CHECKSUM_1_SHA256SUM=407ad21ce6b6ddb9a7f6a907134155431306a6b0450fedc3981d65311ff91c06
+RBUP_LOG_FILE=${RBUP_LOG_DIR}/${RBUP_JOB_NAME}.${RBUP_NOW}.log
+#RBUP_LOG_FILE=/dev/null
bgstack15