Backup Manager: Примеры использования

Здесь приведены примеры использования Backup Manager.

DokuWiki

Это пример резервного копирования DokuWiki.

  • Частота создания полного архив 5 дней
  • Используется список папок для копирования
  • Используется чёрный список

Файл backup-manager-dokuwiki.conf

Файл backup-manager-dokuwiki.conf

backup-manager-dokuwiki.conf
export BM_REPOSITORY_ROOT="/mnt/backup/dokuwiki"
export BM_TEMP_DIR="/tmp"
 
export BM_REPOSITORY_SECURE="true"
export BM_REPOSITORY_USER="root"
export BM_REPOSITORY_GROUP="root"
export BM_REPOSITORY_CHMOD="770"
 
export BM_ARCHIVE_CHMOD="660"
export BM_ARCHIVE_TTL="5"
export BM_REPOSITORY_RECURSIVEPURGE="false"
export BM_ARCHIVE_PURGEDUPS="true"
export BM_ARCHIVE_PREFIX="$HOSTNAME"
export BM_ARCHIVE_STRICTPURGE="true"
export BM_ARCHIVE_NICE_LEVEL="10"
export BM_ARCHIVE_METHOD="tarball-incremental"
 
export BM_ENCRYPTION_METHOD="false"
export BM_ENCRYPTION_RECIPIENT=""
 
export BM_TARBALL_NAMEFORMAT="long"
export BM_TARBALL_FILETYPE="tar.gz"
export BM_TARBALL_OVER_SSH="false"
export BM_TARBALL_DUMPSYMLINKS="false"
export BM_TARBALL_DIRECTORIES="/etc /var/lib/dokuwiki /usr/share/dokuwiki"
 
export BM_TARBALL_BLACKLIST="/mnt/backup/dokuwiki /var/lib/dokuwiki/data/cache/?/* /var/lib/dokuwiki/data/cache/purgefile /var/lib/dokuwiki/data/locks /var/lib/dokuwiki/data/tmp"
export BM_TARBALL_SLICESIZE="1000M"
export BM_TARBALL_EXTRA_OPTIONS=""
 
export BM_TARBALLINC_MASTERDATETYPE="weekly"
export BM_TARBALLINC_MASTERDATEVALUE="1"
 
export BM_MYSQL_DATABASES="__ALL__"
export BM_MYSQL_SAFEDUMPS="true"
export BM_MYSQL_ADMINLOGIN="root"
export BM_MYSQL_ADMINPASS=""
export BM_MYSQL_HOST="localhost"
export BM_MYSQL_PORT="3306"
export BM_MYSQL_FILETYPE="gzip"
export BM_MYSQL_EXTRA_OPTIONS=""
 
export BM_PGSQL_DATABASES="__ALL__"
export BM_PGSQL_ADMINLOGIN="root"
export BM_PGSQL_ADMINPASS=""
export BM_PGSQL_HOST="localhost"
export BM_PGSQL_PORT="5432"
export BM_PGSQL_FILETYPE="bzip2"
export BM_PGSQL_EXTRA_OPTIONS=""
 
export BM_SVN_REPOSITORIES=""
export BM_SVN_COMPRESSWITH="bzip2"
 
declare -a BM_PIPE_COMMAND
declare -a BM_PIPE_NAME
declare -a BM_PIPE_FILETYPE
declare -a BM_PIPE_COMPRESS
export BM_PIPE_COMMAND
export BM_PIPE_NAME
export BM_PIPE_FILETYPE
export BM_PIPE_COMPRESS
 
export BM_UPLOAD_METHOD="ftp"
export BM_UPLOAD_HOSTS=""
export BM_UPLOAD_DESTINATION="/var/archives/uploads"
 
export BM_UPLOAD_SSH_USER="bmngr"
export BM_UPLOAD_SSH_KEY=""
export BM_UPLOAD_SSH_HOSTS=""
export BM_UPLOAD_SSH_PORT=""
export BM_UPLOAD_SSH_DESTINATION=""
export BM_UPLOAD_SSH_PURGE="true"
export BM_UPLOAD_SSH_TTL=""
 
export BM_UPLOAD_SSHGPG_RECIPIENT=""
 
export BM_UPLOAD_FTP_SECURE="false"
export BM_UPLOAD_FTP_PASSIVE="true"
export BM_UPLOAD_FTP_TEST="false"
export BM_UPLOAD_FTP_USER="wiki"
export BM_UPLOAD_FTP_PASSWORD="PASSWORD"
export BM_UPLOAD_FTP_HOSTS="ftp.domain.ru"
export BM_UPLOAD_FTP_PURGE="true"
export BM_UPLOAD_FTP_TTL="30"
 
export BM_UPLOAD_FTP_DESTINATION="/dokuwiki"
export BM_UPLOAD_FTP_TIMEOUT="30"
 
export BM_UPLOAD_S3_DESTINATION=""
export BM_UPLOAD_S3_ACCESS_KEY=""
export BM_UPLOAD_S3_SECRET_KEY=""
export BM_UPLOAD_S3_PURGE="false"
 
export BM_UPLOAD_RSYNC_DIRECTORIES=""
export BM_UPLOAD_RSYNC_DESTINATION=""
export BM_UPLOAD_RSYNC_HOSTS=""
export BM_UPLOAD_RSYNC_DUMPSYMLINKS="false"
 
export BM_BURNING_METHOD="none"
export BM_BURNING_CHKMD5="false"
export BM_BURNING_DEVICE="/dev/cdrom"
export BM_BURNING_DEVFORCED=""
export BM_BURNING_ISO_FLAGS="-R -J"
export BM_BURNING_MAXSIZE="650"
 
 
export BM_LOGGER="true"
export BM_LOGGER_LEVEL="warning"
export BM_LOGGER_FACILITY="user"
 
export BM_PRE_BACKUP_COMMAND="mount -U 99b54aee-107f-4594-bd68-f0596f0189ea /mnt/backup"
export BM_POST_BACKUP_COMMAND="umount /mnt/backup"

Строка для запуска:

/usr/sbin/backup-manager -c /usr/local/etc/backup-manager-dokuwiki.conf

Пример сроки для Cron:

0 1   * * * /usr/sbin/backup-manager -c /usr/local/etc/backup-manager-dokuwiki.conf

Папки пользователей (UsersHome)

  • Частота создания полного архив 7 дней
  • Каждая папка пользователя сохраняется в виде отдельного архива ( указывается корневая папка и маска: /srv/users/*)
  • Используется чёрный список

Файл backup-manager-Users.conf

Файл backup-manager-Users.conf

backup-manager-Users.conf
export BM_REPOSITORY_ROOT="/root/Backup/backup01/Users"
export BM_TEMP_DIR="/tmp"
export BM_REPOSITORY_SECURE="true"
export BM_REPOSITORY_USER="root"
export BM_REPOSITORY_GROUP="root"
export BM_REPOSITORY_CHMOD="770"
 
export BM_ARCHIVE_CHMOD="660"
export BM_ARCHIVE_TTL="7"
export BM_REPOSITORY_RECURSIVEPURGE="false"
export BM_ARCHIVE_PURGEDUPS="true"
export BM_ARCHIVE_PREFIX="$HOSTNAME"
export BM_ARCHIVE_STRICTPURGE="true"
export BM_ARCHIVE_NICE_LEVEL="10"
export BM_ARCHIVE_METHOD="tarball-incremental"
 
export BM_ENCRYPTION_METHOD="false"
export BM_ENCRYPTION_RECIPIENT=""
 
export BM_TARBALL_NAMEFORMAT="long"
export BM_TARBALL_FILETYPE="tar.gz"
export BM_TARBALL_OVER_SSH="false"
export BM_TARBALL_DUMPSYMLINKS="false"
export BM_TARBALL_DIRECTORIES="/srv/users/*"
# declare -a BM_TARBALL_TARGETS
# export BM_TARBALL_TARGETS
export BM_TARBALL_BLACKLIST="/var/archives /root/Backup /srv/users/*/.1cv8* /srv/users/*/.local/share/xorg /srv/users/*/.local /share/Trash /srv/users* .cache /srv/users/*/.dbus"
export BM_TARBALL_SLICESIZE="1000M"
export BM_TARBALL_EXTRA_OPTIONS=""
export BM_TARBALLINC_MASTERDATETYPE="weekly"
export BM_TARBALLINC_MASTERDATEVALUE="1"
 
export BM_MYSQL_DATABASES="__ALL__"
export BM_MYSQL_SAFEDUMPS="true"
export BM_MYSQL_ADMINLOGIN="root"
export BM_MYSQL_ADMINPASS=""
export BM_MYSQL_HOST="localhost"
export BM_MYSQL_PORT="3306"
export BM_MYSQL_FILETYPE="bzip2"
export BM_MYSQL_EXTRA_OPTIONS=""
 
export BM_PGSQL_DATABASES="__ALL__"
export BM_PGSQL_ADMINLOGIN="root"
export BM_PGSQL_ADMINPASS=""
export BM_PGSQL_HOST="localhost"
export BM_PGSQL_PORT="5432"
export BM_PGSQL_FILETYPE="bzip2"
export BM_PGSQL_EXTRA_OPTIONS=""
export BM_SVN_REPOSITORIES=""
export BM_SVN_COMPRESSWITH="bzip2"
 
declare -a BM_PIPE_COMMAND
declare -a BM_PIPE_NAME
declare -a BM_PIPE_FILETYPE
declare -a BM_PIPE_COMPRESS
export BM_PIPE_COMMAND
export BM_PIPE_NAME
export BM_PIPE_FILETYPE
export BM_PIPE_COMPRESS
 
export BM_UPLOAD_METHOD="none"
export BM_UPLOAD_HOSTS=""
export BM_UPLOAD_DESTINATION="/var/archives/uploads"
 
# Uncomment the 'export ...' line below to activate the uploaded archives
#export BM_UPLOADED_ARCHIVES=${BM_REPOSITORY_ROOT}/${BM_ARCHIVE_PREFIX}-uploaded.list
export BM_UPLOAD_SSH_USER="bmngr"
export BM_UPLOAD_SSH_KEY=""
export BM_UPLOAD_SSH_HOSTS=""
export BM_UPLOAD_SSH_PORT=""
export BM_UPLOAD_SSH_DESTINATION=""
export BM_UPLOAD_SSH_PURGE="true"
export BM_UPLOAD_SSH_TTL=""
export BM_UPLOAD_SSHGPG_RECIPIENT=""
 
export BM_UPLOAD_FTP_SECURE="false"
export BM_UPLOAD_FTP_PASSIVE="true"
export BM_UPLOAD_FTP_TEST="false"
export BM_UPLOAD_FTP_USER=""
export BM_UPLOAD_FTP_PASSWORD=""
export BM_UPLOAD_FTP_HOSTS=""
export BM_UPLOAD_FTP_PURGE="true"
export BM_UPLOAD_FTP_TTL=""
export BM_UPLOAD_FTP_DESTINATION=""
 
export BM_UPLOAD_S3_DESTINATION=""
export BM_UPLOAD_S3_ACCESS_KEY=""
export BM_UPLOAD_S3_SECRET_KEY=""
export BM_UPLOAD_S3_PURGE="false"
 
export BM_UPLOAD_RSYNC_DIRECTORIES=""
export BM_UPLOAD_RSYNC_DESTINATION=""
export BM_UPLOAD_RSYNC_HOSTS=""
export BM_UPLOAD_RSYNC_DUMPSYMLINKS="false"
 
export BM_BURNING_METHOD="none"
 
export BM_LOGGER="true"
export BM_LOGGER_LEVEL="warning"
export BM_LOGGER_FACILITY="user"
 
export BM_PRE_BACKUP_COMMAND=""
export BM_POST_BACKUP_COMMAND=""

Система

Резервное копирование типовых системных файлов с настройками.

  • Частота создания полного архив 5 дней
  • Каждая папка из списка сохраняется в виде отдельного архива
  • Используется список папок для копирования

Файл backup-manager-System.conf

Файл backup-manager-System.conf

backup-manager-System.conf
export BM_REPOSITORY_ROOT="/root/Backup/backup01/System"
export BM_TEMP_DIR="/tmp"
export BM_REPOSITORY_SECURE="true"
export BM_REPOSITORY_USER="root"
export BM_REPOSITORY_GROUP="root"
export BM_REPOSITORY_CHMOD="770"
 
export BM_ARCHIVE_CHMOD="660"
export BM_ARCHIVE_TTL="5"
export BM_REPOSITORY_RECURSIVEPURGE="false"
export BM_ARCHIVE_PURGEDUPS="true"
export BM_ARCHIVE_PREFIX="$HOSTNAME"
export BM_ARCHIVE_STRICTPURGE="true"
export BM_ARCHIVE_NICE_LEVEL="10"
export BM_ARCHIVE_METHOD="tarball-incremental mysql"
 
export BM_ENCRYPTION_METHOD="false"
export BM_ENCRYPTION_RECIPIENT=""
 
export BM_TARBALL_NAMEFORMAT="long"
export BM_TARBALL_FILETYPE="tar.gz"
export BM_TARBALL_OVER_SSH="false"
export BM_TARBALL_DUMPSYMLINKS="false"
export BM_TARBALL_DIRECTORIES="/etc /usr/local /usr/share/icewm /var/cache/samba /var/lib/samba /var/spool/samba /var/spool/cron/crontabs   /usr/lib/doublecmd /opt/roundcube /opt/glpi /opt/phpldapadmin /var/lib/amavis/virusmails /var/lib/spamassassin /var/lib/amavis/.spamassassin /var/lib/ldap"
 
export BM_TARBALL_BLACKLIST="/var/archives /root/Backup"
export BM_TARBALL_SLICESIZE="1000M"
export BM_TARBALL_EXTRA_OPTIONS=""
export BM_TARBALLINC_MASTERDATETYPE="weekly"
export BM_TARBALLINC_MASTERDATEVALUE="1"
 
export BM_MYSQL_DATABASES="mysql roundcube glpi"
export BM_MYSQL_SAFEDUMPS="true"
export BM_MYSQL_ADMINLOGIN="root"
export BM_MYSQL_ADMINPASS="PASSWORD"
export BM_MYSQL_HOST="localhost"
export BM_MYSQL_PORT="3306"
export BM_MYSQL_FILETYPE="bzip2"
export BM_MYSQL_EXTRA_OPTIONS=""
 
export BM_PGSQL_DATABASES="__ALL__"
export BM_PGSQL_ADMINLOGIN="root"
export BM_PGSQL_ADMINPASS=""
export BM_PGSQL_HOST="localhost"
export BM_PGSQL_PORT="5432"
export BM_PGSQL_FILETYPE="bzip2"
export BM_PGSQL_EXTRA_OPTIONS=""
export BM_SVN_REPOSITORIES=""
export BM_SVN_COMPRESSWITH="bzip2"
 
declare -a BM_PIPE_COMMAND
declare -a BM_PIPE_NAME
declare -a BM_PIPE_FILETYPE
declare -a BM_PIPE_COMPRESS
export BM_PIPE_COMMAND
export BM_PIPE_NAME
export BM_PIPE_FILETYPE
export BM_PIPE_COMPRESS
 
export BM_UPLOAD_METHOD="none"
export BM_UPLOAD_HOSTS=""
export BM_UPLOAD_DESTINATION="/var/archives/uploads"
 
# Uncomment the 'export ...' line below to activate the uploaded archives
#export BM_UPLOADED_ARCHIVES=${BM_REPOSITORY_ROOT}/${BM_ARCHIVE_PREFIX}-uploaded.list
export BM_UPLOAD_SSH_USER="bmngr"
export BM_UPLOAD_SSH_KEY=""
export BM_UPLOAD_SSH_HOSTS=""
export BM_UPLOAD_SSH_PORT=""
export BM_UPLOAD_SSH_DESTINATION=""
export BM_UPLOAD_SSH_PURGE="true"
export BM_UPLOAD_SSH_TTL=""
export BM_UPLOAD_SSHGPG_RECIPIENT=""
 
export BM_UPLOAD_FTP_SECURE="false"
export BM_UPLOAD_FTP_PASSIVE="true"
export BM_UPLOAD_FTP_TEST="false"
export BM_UPLOAD_FTP_USER=""
export BM_UPLOAD_FTP_PASSWORD=""
export BM_UPLOAD_FTP_HOSTS=""
export BM_UPLOAD_FTP_PURGE="true"
export BM_UPLOAD_FTP_TTL=""
export BM_UPLOAD_FTP_DESTINATION=""
 
export BM_UPLOAD_S3_DESTINATION=""
export BM_UPLOAD_S3_ACCESS_KEY=""
export BM_UPLOAD_S3_SECRET_KEY=""
export BM_UPLOAD_S3_PURGE="false"
 
export BM_UPLOAD_RSYNC_DIRECTORIES=""
export BM_UPLOAD_RSYNC_DESTINATION=""
export BM_UPLOAD_RSYNC_HOSTS=""
export BM_UPLOAD_RSYNC_DUMPSYMLINKS="false"
 
export BM_BURNING_METHOD="none"
 
export BM_LOGGER="true"
export BM_LOGGER_LEVEL="warning"
export BM_LOGGER_FACILITY="user"
 
export BM_PRE_BACKUP_COMMAND="/usr/sbin/slapcat -l /etc/ldap/Backup.ldif"

1C

Файл backup-manager-1C.conf

Файл backup-manager-1C.conf

backup-manager-1C.conf
export BM_REPOSITORY_ROOT="/root/Backup/backup01/1C"
export BM_TEMP_DIR="/tmp"
export BM_REPOSITORY_SECURE="true"
export BM_REPOSITORY_USER="root"
export BM_REPOSITORY_GROUP="root"
export BM_REPOSITORY_CHMOD="770"
 
export BM_ARCHIVE_CHMOD="660"
export BM_ARCHIVE_TTL="7"
export BM_REPOSITORY_RECURSIVEPURGE="false"
export BM_ARCHIVE_PURGEDUPS="true"
export BM_ARCHIVE_PREFIX="$HOSTNAME"
export BM_ARCHIVE_STRICTPURGE="true"
export BM_ARCHIVE_NICE_LEVEL="10"
export BM_ARCHIVE_METHOD="tarball-incremental"
 
export BM_ENCRYPTION_METHOD="false"
export BM_ENCRYPTION_RECIPIENT=""
 
export BM_TARBALL_NAMEFORMAT="long"
export BM_TARBALL_FILETYPE="tar.gz"
export BM_TARBALL_OVER_SSH="false"
export BM_TARBALL_DUMPSYMLINKS="false"
export BM_TARBALL_DIRECTORIES="/opt/1C /srv/1c/Account /srv/1c/HRM"
# declare -a BM_TARBALL_TARGETS
# export BM_TARBALL_TARGETS
export BM_TARBALL_BLACKLIST="/var/archives /root/Backup"
export BM_TARBALL_SLICESIZE="1000M"
export BM_TARBALL_EXTRA_OPTIONS=""
export BM_TARBALLINC_MASTERDATETYPE="weekly"
export BM_TARBALLINC_MASTERDATEVALUE="1"
 
export BM_MYSQL_DATABASES="__ALL__"
export BM_MYSQL_SAFEDUMPS="true"
export BM_MYSQL_ADMINLOGIN="root"
export BM_MYSQL_ADMINPASS=""
export BM_MYSQL_HOST="localhost"
export BM_MYSQL_PORT="3306"
export BM_MYSQL_FILETYPE="bzip2"
export BM_MYSQL_EXTRA_OPTIONS=""
 
export BM_PGSQL_DATABASES="__ALL__"
export BM_PGSQL_ADMINLOGIN="root"
export BM_PGSQL_ADMINPASS=""
export BM_PGSQL_HOST="localhost"
export BM_PGSQL_PORT="5432"
export BM_PGSQL_FILETYPE="bzip2"
export BM_PGSQL_EXTRA_OPTIONS=""
export BM_SVN_REPOSITORIES=""    Используется чёрный список
export BM_SVN_COMPRESSWITH="bzip2"
 
declare -a BM_PIPE_COMMAND
declare -a BM_PIPE_NAME
declare -a BM_PIPE_FILETYPE
declare -a BM_PIPE_COMPRESS
export BM_PIPE_COMMAND
export BM_PIPE_NAME
export BM_PIPE_FILETYPE
export BM_PIPE_COMPRESS
 
export BM_UPLOAD_METHOD="none"
export BM_UPLOAD_HOSTS=""
export BM_UPLOAD_DESTINATION="/var/archives/uploads"
 
# Uncomment the 'export ...' line below to activate the uploaded archives
#export BM_UPLOADED_ARCHIVES=${BM_REPOSITORY_ROOT}/${BM_ARCHIVE_PREFIX}-uploaded.list
export BM_UPLOAD_SSH_USER="bmngr"
export BM_UPLOAD_SSH_KEY=""
export BM_UPLOAD_SSH_HOSTS=""
export BM_UPLOAD_SSH_PORT=""
export BM_UPLOAD_SSH_DESTINATION=""
export BM_UPLOAD_SSH_PURGE="true"
export BM_UPLOAD_SSH_TTL=""
export BM_UPLOAD_SSHGPG_RECIPIENT=""
 
export BM_UPLOAD_FTP_SECURE="false"
export BM_UPLOAD_FTP_PASSIVE="true"
export BM_UPLOAD_FTP_TEST="false"
export BM_UPLOAD_FTP_USER=""
export BM_UPLOAD_FTP_PASSWORD=""
export BM_UPLOAD_FTP_HOSTS=""
export BM_UPLOAD_FTP_PURGE="true"
export BM_UPLOAD_FTP_TTL=""
export BM_UPLOAD_FTP_DESTINATION=""
 
export BM_UPLOAD_S3_DESTINATION=""
export BM_UPLOAD_S3_ACCESS_KEY=""
export BM_UPLOAD_S3_SECRET_KEY=""
export BM_UPLOAD_S3_PURGE="false"
 
export BM_UPLOAD_RSYNC_DIRECTORIES=""
export BM_UPLOAD_RSYNC_DESTINATION=""
export BM_UPLOAD_RSYNC_HOSTS=""
export BM_UPLOAD_RSYNC_DUMPSYMLINKS="false"
 
export BM_BURNING_METHOD="none"
 
export BM_LOGGER="true"
export BM_LOGGER_LEVEL="warning"
export BM_LOGGER_FACILITY="user"
 
export BM_PRE_BACKUP_COMMAND=""
export BM_POST_BACKUP_COMMAND=""
backup-manager/examples.txt · Последние изменения: 2018-08-10 19:10 — GreyWolf
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki