BorgBackup

From miki
Revision as of 22:20, 12 June 2023 by Mip (talk | contribs) (→‎Tips)
Jump to navigation Jump to search

References

Mentionning bup and restic as possible alternatives, or Bacula for extreme reliability at very high backups size.

To Do

Benchmarks:

  • DONE - Client/server zavcvl0005, storage on lacie-cloudbox via CIFS.
  • DONE - Client zavcxl0005, server griffin, storage on lacie-cloudbox via CIFS.
  • Client zavcxl0005, server lacie-cloudbox, local storage.
  • Client zavcxl0005, server raspberry-pi, storage on lacie-cloudbox via CIFS.

Config:

  • How best configure Borg for multiple clients backing up to same repo (see ticket #2313).
  • How sync. backup time on multiple client? Triggered by server? or triggered by client? How prevent concurrent session?
  • Collect stats on client and server. Report these stats via email or such.

To Do:

  • Install borg on lacie-cloudbox, collect bench and stats.

Install on Ubuntu 16.04

sudo apt install python3 python3-dev python3-pip python-virtualenv libssl-dev openssl libacl1-dev libacl1 liblz4-dev liblz4-1 build-essential
sudo apt install libfuse-dev fuse pkg-config    # optional, for FUSE support
sudo pip3 install "borgbackup==1.1.0b5"

Since Ubuntu 18.04 Bionic:

sudo apt install borgbackup        # v1.1.5-1 on Bionic

Tips

Multiple client

Implements #916, and Borgception.

Foresee disk full

Reference:

BorgBackup doesn't always handle disk full scenarios. To overcome this:

  • Create a dummy file on the repo volume that can be deleted when necessary (to run purge commands, etc).
dd if=/dev/zero of=DELETE_ME_IF_DISK_FULL bs=1M count=512
  • Tell borg to leave some free space
borg config REPO additional_free_space 2G

Troubleshoot

Fix Corrupted segment reference count

We have this error:

AssertionError: Corrupted segment reference count - corrupted index or hints

This may be due to an old version bug [1]. To fix:

# On all clients and all repos, delete the cache
borg delete --cache-only REPO

# For all repos:
borg check --repair REPO