Select Git revision
.env.sample
-
David Beniamine authoredDavid Beniamine authored
.env.sample 1.07 KiB
host="CHANGEME"
user="CHANGEME"
ftppass="CHANGEME"
encpass='CHANGEME'
bckplist="/root /etc /srv /var/www /usr /lib /opt /var/opt /var/lib/docker/volumes/ /home"
remotedir="bckp_`hostname`"
verbosity="info"
# Set an arcihve directory, subdir of /root/.cache/duplicity
archive_dir=""
log_file=/var/log/bckp.log
timeout=60
BK_FULL_FREQ="3W" # create a new full backup every...
BK_FULL_LIFE="2M" # delete any backup older than this
BK_KEEP_FULL="2" # How many full+inc cycle to keep
pre_actions(){
if [ ! -z "$(which mysql)" ]; then
mysqldump --events --single-transaction --flush-logs --all-databases --default-character-set=utf8 \
| gzip > /root/db.sql.gz
exit_on_fail $? "Backup mysql databses"
fi
if [ ! -z "$(which gitlab-ctl)" ]; then
/usr/bin/gitlab-rake gitlab:backup:create
backup_path=`grep "'backup_path'" /etc/gitlab/gitlab.rb | sed 's/^.*= "\(.*\)"$/\1/'`
exit_on_fail $? "Backup gitlab"
if [ -d "$backup_path" ]; then
/bin/ls -dt $backup_path/* | tail -n +11 | xargs rm -rf
fi
fi
}