Restic 0.19.1 – allows you to easily create remote secure deduplicated backups via the command line and SFTP

In order to backup data via SFTP you must first set up a server with SSH and let it know your public key

 


root@rpi-iot-jsho-rslsync-01:~# ssh-keygen -t ed25519

Generating public/private ed25519 key pair.
Enter file in which to save the key (/root/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_ed25519
Your public key has been saved in /root/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:… root@rpi-iot-jsho-rslsync-01
The key’s randomart image is:
+–[ED25519 256]–+
…
+—-[SHA256]—–+
root@rpi-iot-jsho-rslsync-01:~#
root@rpi-iot-jsho-rslsync-01:~# ssh-copy-id -f root@192.168.1.139
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: „/root/.ssh/id_ed25519.pub“
root@192.168.1.139’s password:
Number of key(s) added: 1
Now try logging into the machine, with: „ssh ‚root@192.168.1.139′“
and check to make sure that only the key(s) you wanted were added.
root@rpi-iot-jsho-rslsync-01:~#
root@rpi-iot-jsho-rslsync-01:~# restic -r sftp:root@192.168.1.139:/mnt/restic.SFTP init
enter password for new repository:
enter password again:
created restic repository 0019da8010 at sftp:root@192.168.1.139:/mnt/restic.SFTP
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
root@rpi-iot-jsho-rslsync-01:~#
root@rpi-iot-jsho-rslsync-01:~# restic -r sftp:root@192.168.1.139:/mnt/restic.SFTP backup /resilio-sync.data/USB-Stick
enter password for repository:
repository 0019da80 opened (version 2, compression level auto)
using parent snapshot 8054b3f7
[0:03] 100.00% 19 / 19 index files loaded
Files: 0 new, 0 changed, 20840 unmodified
Dirs: 0 new, 9 changed, 692 unmodified
Added to the repository: 109.729 KiB (21.324 KiB stored)
processed 20840 files, 7.382 GiB in 1:18
snapshot a16e4d8a saved
root@rpi-iot-jsho-rslsync-01:~#

Leave a Reply

You must be logged in to post a comment.