This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Concat borg segments to larger segments and reset their numbers | |
# | |
# As usecase I concatenated my 5MB segments to 128MB segments | |
# | |
# Each borg semenent is a list of entry logs prefixed by "BORG_SEG" magic | |
# header. They can be concatenated by removing the magic header but the first | |
# original segment. The segments must preserve their original natural order. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$BORG_REPO" ]; then | |
echo "BORG_REPO not set. Export variable like:" | |
echo "export BORG_REPO=/mnt/borg" | |
exit 1 | |
fi | |
BORG_REPO=$(readlink -f "$BORG_REPO") | |
if [ ! -e "$BORG_REPO/config" ]; then | |
echo "Invalid BORG_REPO dir: $BORG_REPO" |