diff options
Diffstat (limited to 'examples/backup.conf.s3')
-rw-r--r-- | examples/backup.conf.s3 | 143 |
1 files changed, 0 insertions, 143 deletions
diff --git a/examples/backup.conf.s3 b/examples/backup.conf.s3 deleted file mode 100644 index 668a383..0000000 --- a/examples/backup.conf.s3 +++ /dev/null @@ -1,143 +0,0 @@ -# -*- shell-script -*- -# This is an example configuration for backing up to an s3 mount. -# It uses s3backer to mount the s3 bucket. -# -# Search for strings matching @.*@ and follow the comments to replace -# them with your actual values. -# -# For a detailed information about backup.conf format, see backup.conf(5) -# To debug the configuration, run "backup --dry-run" and "restore --dry-run". -# For a detailed descriptions of these commands, see backup(1). - -# Set your s3 bucket name here -backup_bucket_name=@YOUR-BUCKET-NAME@ - -# Raw bucket is mounted to /mnt/s3backer -mp_s3backer=/mnt/s3backer -# The actual file system is mountet to /mnt/s3 -mp_s3=/mnt/s3 - -# Make sure both mountpoints exist -test -d $mp_s3backer || mkdir mp_s3backer -test -d $mp_s3 || mkdir mp_s3backer - -# This variable is populated by prologue and is used by epilogue to unmount -# s3-backed file system. -umount_list="" - -# Prologue function is responsible for mounting the s3-backed fs. -prologue() { - local cleanup=1 - -# Sample mount output, split into several lines: -# http://finox-backup-fs.s3.amazonaws.com/ on /mnt/s3backer type fuse.s3backer -# (rw,nosuid,nodev,allow_other,default_permissions) - set -- $(mount -tfuse.s3backer | - awk '/https?:\/\/'$backup_bucket_name'/ { print $3 }') - if test -z "$1"; then - $dry_run s3backer --accessFile=/root/.s3backer_passwd --vhost \ - $backup_bucket_name $mp_s3backer || - abend 1 "unable to mount $backup_bucket_name" - umount_list="$mp_s3backer" - else - mp_s3backer=$1 - fi - set -- $(mount | grep "^${mp_s3backer}/file" | awk '{ print $3 }') - if test -z "$1"; then - case $(basename $0) in - restore) mountopt=",ro";; - backup) mountopt=",rw,data=writeback";; - s3mount) cleanup=0;; - *) error "called as $0: assuming default mount options" - esac - # NOTE: For ext4 add the journal_async_commit option. - $dry_run mount -oloop$mountopt $mp_s3backer/file $mp_s3 || - abend 1 "unable to mount $mp_s3backer/file" - umount_list="$mp_s3 $umount_list" - else - mp_s3=$1 - fi - if test $cleanup -eq 1; then - backup-cleanup --verbose --suffix .tar.bz2 $mp_s3 - backup-cleanup --verbose --suffix .db $backup_snapshot_dir - fi -} - -# Epilogue function unmounts all fs mounted so far. -epilogue() { - for mp in $umount_list - do - $dry_run umount $mp - done -} - -# Initialize hooks. -prologue_hook=prologue -epilogue_hook=epilogue - -########################################################################## -# Tar setup. -# -# Tar setup variables configure invocation of tar. -# -########################################################################## - -# Any additional options to pass to tar. Do not place tar operation -# switches (as -c, -t, etc.) here! These will be added automatically -# by appropriate scripts, depending on the operation being performed. -# -# By default this variable is empty (no additional options). -# -# In this example it is used to request bzip2 compression: -backup_tar_options="-b1000 -j" - -# Suffix for archive files. -# Default is "tar" -# -backup_suffix="tar.bz2" - -# Directory where archive files are to be located. It's OK to specify -# a remote directory here, e.g. 10.10.0.1:/export/backup -# -# This variable must be set. Whatever directory it points to must already -# exist, the backup script won't create it. -backup_archive_dir=$mp_s3 - -# Directory where to store snapshot files. The files will be named as -# their archive counterparts, with the suffix ".db". -# -# This variable must be set -backup_snapshot_dir=@YOUR-SNAPSHOT-DIR@ - -# Set this variable to a non-empty value if you wish backup procedures to -# be verbose. -backup_verbose= - -########################################################################## -# Backup items. -# -# Backup items are symbolic names that identify abstract objects that -# need to be backed up (or restored). These must be valid shell variable -# names. For each backup item <name>, this configuration file defines a -# set of variables which determine what files to backup and what methods -# to use for that. Each such variable is named <name>_<variable>, where -# <name> is the item name, and <variable> is the variable name. The set -# of variables needed depends on the type of each particular item. -# -########################################################################## - -backup_items="dbdump index repo" - -dbdump_type=postgres -dbdump_database="alfresco" - -index_type=fs -index_dir="/export/data/alfresco" -index_files="backup-lucene-indexes" - -repo_type=fs -repo_dir="/export/data/alfresco" -repo_files="contentstore oouser contentstore.deleted" - - - |