root@bpi-iot-jsho-borg-02:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:qEVnZhnHaQSSZw60HpegRqTUqd/LZp/hu4MzQDz2ohM root@bpi-iot-jsho-borg-02
The key’s randomart image is:
+—[RSA 3072]—-+
| .ooo+.o+o. |
| . oo.o+o=+ |
| .oo +=O. |
| ..=o O. |
| + ++ S |
| E +oo |
| o.+ o. |
| o O..o |
| . o +*+ |
+—-[SHA256]—–+
root@bpi-iot-jsho-borg-02:~#
root@bpi-iot-jsho-borg-02:~# ssh-copy-id -f root@bpi-iot-jsho-rslsync-01
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: „/root/.ssh/id_rsa.pub“
root@bpi-iot-jsho-rslsync-01’s password:
Number of key(s) added: 1
Now try logging into the machine, with: „ssh ‚root@bpi-iot-jsho-rslsync-01′“
and check to make sure that only the key(s) you wanted were added.
root@bpi-iot-jsho-borg-02:~#
root@bpi-iot-jsho-borg-02:~# service ssh restart
root@bpi-iot-jsho-borg-02:~#
root@bpi-iot-jsho-borg-02:~# ssh bpi-iot-jsho-rslsync-01 uname -a
Linux bpi-iot-jsho-rslsync-01 5.15.48-sunxi #22.05.3 SMP Wed Jun 22 07:35:10 UTC 2022 armv7l armv7l armv7l GNU/Linux
root@bpi-iot-jsho-borg-02:~#
root@bpi-iot-jsho-borg-02:/# apt-get install sshfs
root@bpi-iot-jsho-borg-02:~#
root@bpi-iot-jsho-borg-02:~# sshfs root@bpi-iot-jsho-rslsync-01:/resilio-sync.data /mnt/sshfs
root@bpi-iot-jsho-borg-02:~#
root@bpi-iot-jsho-borg-02:~# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 99044 4528 94516 5% /run
/dev/mmcblk0p1 117933592 7218400 109436900 7% /
tmpfs 495212 0 495212 0% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 495212 4 495208 1% /tmp
/dev/zram1 47960 9116 35260 21% /var/log
tmpfs 99040 68 98972 1% /run/user/110
tmpfs 99040 60 98980 1% /run/user/0
root@bpi-iot-jsho-rslsync-01:/resilio-sync.data 60172896 6733472 52752824 12% /mnt/sshfs
root@bpi-iot-jsho-borg-02:~#
root@bpi-iot-jsho-borg-02:/# borg init –encryption=repokey /borgbackup.data2
Enter new passphrase: <password>
Enter same passphrase again: <password>
Do you want your passphrase to be displayed for verification? [yN]: n
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 /borgbackup.data2
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!
If you used a repokey mode, the key is stored in the repo, but you should back it up separately.
Use „borg key export“ to export the key, optionally in printable format.
Write down the passphrase. Store both at safe place(s).
root@bpi-iot-jsho-borg-02:/#
root@bpi-iot-jsho-borg-02:~# borg create –compression lz4 –stats /borgbackup.data2::`date „+Backup-%Y-%m-%d-%H:%M:%S“` /mnt/sshfs
Enter passphrase for key /borgbackup.data2: <password>
——————————————————————————
Repository: /borgbackup.data2
Archive name: Backup-2022-13-13-13:35:03
Archive fingerprint: adcc8f6a6c8ab36341c9b055a07d0734264c34a5b6c58f5277d2de9d327b30f7
Time (start): Wed, 2022-07-13 13:35:14
Time (end): Wed, 2022-07-13 13:45:11
Duration: 9 minutes 56.65 seconds
Number of files: 2467
Utilization of max. archive size: 0%
——————————————————————————
Original size Compressed size Deduplicated size
This archive: 2.10 GB 1.29 GB 1.28 GB
All archives: 2.10 GB 1.29 GB 1.28 GB
Unique chunks Total chunks
Chunk index: 2740 3051
——————————————————————————
root@bpi-iot-jsho-borg-02:~#
root@bpi-iot-jsho-borg-02:~# borg create –compression lz4 –stats /borgbackup.data2::`date „+Backup-%Y-%d-%d-%H:%M:%S“` /mnt/sshfs
Enter passphrase for key /borgbackup.data2: <password>
——————————————————————————
Repository: /borgbackup.data2
Archive name: Backup-2022-13-13-14:14:26
Archive fingerprint: 3aee10863931c82a62355561a59f33b3f26c92621933993b19fdf31d7a2a6afa
Time (start): Wed, 2022-07-13 14:14:39
Time (end): Wed, 2022-07-13 14:15:09
Duration: 29.87 seconds
Number of files: 2467
Utilization of max. archive size: 0%
——————————————————————————
Original size Compressed size Deduplicated size
This archive: 2.10 GB 1.29 GB 719 B
All archives: 4.20 GB 2.58 GB 1.28 GB
Unique chunks Total chunks
Chunk index: 2741 6102
——————————————————————————
root@bpi-iot-jsho-borg-02:~#