BorgBackup: Difference between revisions
Jump to navigation
Jump to search
(→Tips) |
|||
Line 52: | Line 52: | ||
<source lang="bash"> |
<source lang="bash"> |
||
borg config REPO additional_free_space 2G |
borg config REPO additional_free_space 2G |
||
</source> |
|||
=== See snapshot disk usage === |
|||
* Use this python tool [https://github.com/KrystianD/borg-ncdu-analyzer borg-ncdu-analyzer] |
|||
<source lang=bash> |
|||
export BORG_REPO=... |
|||
python3 borg_ncdu_analyzer.py ::some_snapshot --full-path |
|||
</source> |
</source> |
||
Revision as of 22:22, 12 June 2023
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
- https://borgbackup.readthedocs.io/en/stable/installation.html
- https://github.com/borgbackup/borg/releases
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:
- Issue#2756borg delete requires free disk space
- https://borgbackup.readthedocs.io/en/stable/quickstart.html#important-note-about-free-space
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
See snapshot disk usage
- Use this python tool borg-ncdu-analyzer
export BORG_REPO=...
python3 borg_ncdu_analyzer.py ::some_snapshot --full-path
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