Installation GO

Unter meinem Linux Mint Cinnamon 18.3 gibt es leider kein aktuelles Paket. Das Paket was man installieren kann ist für Restic nicht nutzbar ?

go run build.go
Go 1.6.2 detected, this program requires at least Go 1.8.0
exit status 1

Ok, das bringt so nix. Also das Paket wieder entfernt, dann müssen wir da anders ran gehen. Also müssen wir das Repository vom Entwickler benutzen.

sudo add-apt-repository ppa:longsleep/golang-backports

Nach der Eingabe erscheint folgendes:

Sie sind dabei das folgende PPA hinzuzufügen:
Golang 1.8 and 1.9 PPA for Ubuntu 16.04 Xenial
Mehr Informationen: https://launchpad.net/~longsleep/+archive/ubuntu/golang-backports
Zum Fortfahren bitte Eingabetaste drücken oder Strg+C zum Abbrechen

Danach ein

apt-get update

apt-get install golang-go

Nach der Installation eben die Version checken.

go version
go version go1.9.4 linux/amd64

Gut, damit haben wir die Grundvoraussetzung für Restic erstmal auf dem System. Nun können wir uns das aktuelle Restic halt selber bauen.

 

Installation Restic

Wir holen uns mal eben das Programm von Github.

git clone https://github.com/restic/restic

Danach ins Verzeichnis wechseln

cd restic

Und nun bauen wir

go run build.go

Nach Beendigung kopieren wir uns das Programm nach /usr/bin damit wir es von überall aufrufen können.

sudo cp restic /usr/bin

Nun bekommen wir beim Aufruf von Restic die Hilfe angezeigt.

restic

restic is a backup program which allows saving multiple revisions of files and
directories in an encrypted repository stored on different backends.

Usage:
restic [command]

Available Commands:
backup Create a new backup of files and/or directories
cat Print internal objects to stdout
check Check the repository for errors
diff Show differences between two snapshots
dump Print a backed-up file to stdout
find Find a file or directory
forget Remove snapshots from the repository
generate Generate manual pages and auto-completion files (bash, zsh)
help Help about any command
init Initialize a new repository
key Manage keys (passwords)
list List objects in the repository
ls List files in a snapshot
migrate Apply migrations
mount Mount the repository
prune Remove unneeded data from the repository
rebuild-index Build a new index file
restore Extract the data from a snapshot
snapshots List all snapshots
tag Modify tags on snapshots
unlock Remove locks other processes created
version Print version information

Flags:
--cacert stringSlice path to load root certificates from (default: use system certificates)
--cache-dir string set the cache directory
--cleanup-cache auto remove old cache directories
-h, --help help for restic
--json set output mode to JSON for commands that support it
--limit-download int limits downloads to a maximum rate in KiB/s. (default: unlimited)
--limit-upload int limits uploads to a maximum rate in KiB/s. (default: unlimited)
--no-cache do not use a local cache
--no-lock do not lock the repo, this allows some operations on read-only repos
-o, --option key=value set extended option (key=value, can be specified multiple times)
-p, --password-file string read the repository password from a file (default: $RESTIC_PASSWORD_FILE)
-q, --quiet do not output comprehensive progress report
-r, --repo string repository to backup to or restore from (default: $RESTIC_REPOSITORY)
--tls-client-cert string path to a file containing PEM encoded TLS client certificate and private key

Use "restic [command] --help" for more information about a command.

Somit können wir nun das Backup-Tool einsetzen.