timonier/borg

By timonier

Updated over 5 years ago

Deduplicating archiver with compression and authenticated encryption

Image
0

182

README

Deduplicating archiver with compression and authenticated encryption

⚠️ This project is no longer maintained. ⚠️

Installation

# Define installation folder

export INSTALL_DIRECTORY=/usr/bin

# Use local installation

sudo bin/installer install

# Use remote installation

curl --location "https://gitlab.com/timonier/restic/raw/master/bin/installer" | sudo sh -s -- install

Note 1: If you do not define INSTALL_DIRECTORY, installer will use in /usr/local/bin.

Note 2: docker-for-mac users have to configure native NFS server.

Usage

borg

Run the command borg:

# See all borg options

borg --help

# Initialize a repository

export BORG_PASSPHRASE=my-super-password
borg init --encryption repokey /path/of/repository
# By default repositories initialized with this version will produce security
#errors if written to with an older version (up to and including Borg 1.0.8).
#
# If you want to use these older versions, you can disable the check by running:
#borg upgrade --disable-tam /srv
#
# See https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability for details about the security implications.
#
# IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!
# Use "borg key export" to export the key, optionally in printable format.
# Write down the passphrase. Store both at safe place(s).

borg create -v /path/of/repository::{hostname}_{now:%d.%m.%Y} /path/to/backup
# Creating archive at "/srv::{hostname}_{now:%d.%m.%Y}"
borgmatic

Run the command borgmatic:

# See all borg options

borgmatic --help

# Create configuration

mkdir -p "${HOME}/.config/borgmatic"
cat > "${HOME}/.config/borgmatic/config.yaml" <<"EOF"
location:
    source_directories:
        - /path/to/backup

    repositories:
        - /path/of/repository

retention:
    keep_daily: 7
    keep_weekly: 4
    keep_monthly: 6

consistency:
    checks:
        - repository
        - archives
EOF

# Run borgmatic

borgmatic create --verbosity 1
# /path/of/repository: Creating archive
# Creating archive at "/path/of/repository::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}"

Links

Docker Pull Command

docker pull timonier/borg