steiner-gtk.de
Docs » Borg Backup - Installation und Konfiguration

Borg Backup - Installation und Konfiguration

Installation:

sudo apt-get install borgbackup

Initialisierung Repository:

sudo borg init --encryption=repokey /borg-backup/

Repokey exportieren:

sudo borg key export /borg-backup/ repokey

!!!Repokey wird bei der Datenwiederherstellung benötigt!!!

Backup-Script erstellen:

#!/bin/bash
export BORG_PASSPHRASE="xxxxxxxxxxxxxxx"
LOG="/var/log/borg/backup.log"
REPOSITORY=“/borg-backup/“
exec > >(tee -i ${LOG}.temp)
exec 2>&1
echo "#### Backup gestartet: $(date) ####"
borg create -v --stats                   \
    $REPOSITORY::'{now:%Y-%m-%d_%H-%M}'  \
    /var/www	\
echo "#### Backup beendet: $(date) ####"
cat ${LOG}.temp >> ${LOG}
rm ${LOG}.temp

Script ausführbar machen: chmod -x borgbackup.sh

Repository mounten/unmounten:

sudo borg mount /backup/borg-backup /mnt

sudo morg umont /mnt
Previous Next

steiner-gtk.de

Table of Contents

Impressum / Datenschutzerklaerung