Bareos

Материал из darklurker wiki
Перейти к: навигация, поиск

Установка

yum remove bacula-storage bacula-libs bacula-libs-sql bacula-common bacula-client


Bareos 15.2

F21

cd /etc/yum.repos.d
wget http://download.bareos.org/bareos/release/15.2/Fedora_21/bareos.repo

F22

cd /etc/yum.repos.d
wget http://download.bareos.org/bareos/release/15.2/Fedora_22/bareos.repo


Bareos 16.2

F23

cd /etc/yum.repos.d
wget http://download.bareos.org/bareos/release/latest/Fedora_23/bareos.repo

F24

cd /etc/yum.repos.d
rm -Rf bareos.repo
wget http://download.bareos.org/bareos/release/16.2/Fedora_24/bareos.repo
cd ~; dnf update bareos*
systemctl restart bareos-sd; systemctl restart bareos-fd

Установка

dnf install bareos-client
dnf install bareos-storage

либо

yum install bareos-client
yum install bareos-storage


Windows

Windows x64
Windows x32
Windows Server 2003 x32

Дамп всех баз 1с

backup.before:

#/bin/sh
/usr/bin/psql -l -t -A --username=postgres | awk -F \| {' print $1 '} | grep -v -E '(=|template)' > /tmp/bases
while read -r line
do
bases[c]=$line
c=$((c+1))
done < /tmp/bases

[ -e /var/lib/pgsql/9.4 ] && backup_folder=/var/lib/pgsql/9.4/backup
[ -e /var/lib/pgsql/9.2 ] && backup_folder=/var/lib/pgsql/9.2/backup
[ -e /var/lib/pgsql/9.1 ] && backup_folder=/var/lib/pgsql/9.1/backup

[[ "$backup_folder" == "" ]] && exit 1

[ ! -e $backup_folder ] && mkdir $backup_folder
rm -Rf $backup_folder/*.dump
for i in "${bases[@]}"
do
 echo "Dumping database: $i"
 /usr/bin/pg_dump -Fc -U postgres $i > $backup_folder/$i.dump
done

Бекап контроллера домена

/etc/backup.before

/usr/sbin/slapcat > /etc/openldap/ldap.dump.diff


Задание в bareos:

Job {
        Name = " PDC LDAP"
        Type = Backup
        Level = Full
        Client =   
        FileSet = "Linux PDC LDAP"
        Storage = stronghold.domain.ru
        Pool = StrongholdPool
        Messages = Standard
        Schedule = "WeeklyDiff"
        ClientRunBeforeJob = "/etc/backup.before"
}