Restic

Rest-server

Mettre à jour les dépots APT

apt update

Installer go make & git

apt-get install golang-go git make apache2-utils -y

Télécharger le dépot du rest-server

git clone https://github.com/restic/rest-server

Entrer dans le dossier, compiler et déployer l'installation

cd rest-server/ make make install

Adapter les droits du dossier de destination

mkdir -p /mnt/backup/restic touch /mnt/backup/restic/.htpasswd chown -R www-data:www-data /mnt/backup/restic

Editer le fichier systemctl rest-server

nano examples/systemd/rest-server.service

Et modifier ExecStart=/usr/local/bin/rest-server –path /mnt/backup/restic –private-repos –append-only

Copier le fichier de démarrage systemctl

cp examples/systemd/rest-server.service /etc/systemd/system/

Générer un utilisateur

htpasswd -B /mnt/backup/restic/.htpasswd **utilisateur**

Activer et lancer le service rest-server

systemctl enable restic-server.service systemctl start restic-server.service systemctl status restic-server.service

Sources

https://www.kloppenborg.net/blog/2019/06/12/restic-backup-server

https://restic.readthedocs.io/en/latest/060_forget.html#removing-snapshots-according-to-a-policy

https://golb.hplar.ch/2020/04/backup-restic.html

https://www.hostwinds.com/guide/creating-mysql-backups-restic/