My main freedombox works ok but I want to make sure I am able to restore it, so I decided to try on another Pioneer box (actually, it also has an SSD).
I went with a fresh install microSD card:
- waited until plinth on the Pioneer with the new microSD card says it is ready to setup
- configured the admin user
- entered the options to say the freedombox is behind a routeur and that I will setup forwarding rules for each app
- waited for the software upgrades to be complete (I did not do anything else, i.e. I was offered to install apps and to do network settings, I did neither)
- tried adding the existing remote backup location.
Unfortunately, I cannot remember and I did not write down how I exactly entered the configuration for the backup location and whether I have put encryption or not. What I see:
- on the freedombox: my backup location is user@host:/data/
- my password manager has an entry that says “backup key for freedombox” which might be a passphrase for encryption
I tried adding the remote backup location as user@host:/data/ on the newly installed freedombox, with the password of user on host (I tested with sftp in command line from another machine, it works), and first tried without encryption, it failed, then with encryption, it also failed.
Am I doing something wrong to use the remote backup location to restore?
How to find out whether encryption was used for the backup or not?
Here is what journalctl says for the attempt without encryption:
janv. 29 15:17:02 freedombox /usr/share/plinth/actions/actions[22415]: Error executing action: Command '['borg', 'init', '--encryption', 'none', '/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a']' returned non-zero exit statu> Traceback (most recent call last): File "/usr/share/plinth/actions/actions", line 92, in _call return_values = func(*arguments['args'], **arguments['kwargs']) File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 127, in init _init_repository(path, encryption, encryption_passphrase) File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 120, in _init_repository _run(cmd, encryption_passphrase) File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 350, in _run return subprocess.run(cmd, check=check, env=env, **kwargs) File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['borg', 'init', '--encryption', 'none', '/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a']' returned non-zero exi> janv. 29 15:17:02 freedombox sudo[22413]: pam_unix(sudo:session): session closed for user root janv. 29 15:17:02 freedombox /usr/bin/plinth[21898]: Error running action backups..init(*('/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a', 'none', None), **{}): Command '['borg', 'init', '--encryption', 'none', '/media/d27a> janv. 29 15:17:02 freedombox /usr/bin/plinth[21898]: # backups..info(…) janv. 29 15:17:03 freedombox sudo[22423]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions backups info --write-fd 16 janv. 29 15:17:03 freedombox sudo[22423]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115) janv. 29 15:17:11 freedombox /usr/share/plinth/actions/actions[22425]: Error executing action: Command '['borg', 'info', '--json', '/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a']' returned non-zero exit status 2. Traceback (most recent call last): File "/usr/share/plinth/actions/actions", line 92, in _call return_values = func(*arguments['args'], **arguments['kwargs']) File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 133, in info process = _run(['borg', 'info', '--json', path], encryption_passphrase, File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 350, in _run return subprocess.run(cmd, check=check, env=env, **kwargs) File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['borg', 'info', '--json', '/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a']' returned non-zero exit status 2. janv. 29 15:17:11 freedombox sudo[22423]: pam_unix(sudo:session): session closed for user root janv. 29 15:17:11 freedombox /usr/bin/plinth[21898]: Error running action backups..info(*('/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a', None), **{}): Command '['borg', 'info', '--json', '/media/d27a0b90-9fe7-11ed-9fed-02> janv. 29 15:17:11 freedombox /usr/bin/plinth[21898]: Error adding repository: Command '['borg', 'info', '--json', '/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a']' returned non-zero exit status 2. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/plinth/modules/backups/views.py", line 417, in _save_repository repository.initialize() File "/usr/lib/python3/dist-packages/plinth/modules/backups/repository.py", line 432, in initialize super().initialize() File "/usr/lib/python3/dist-packages/plinth/modules/backups/repository.py", line 208, in initialize self.get_info() # If password is incorrect raise an error early. File "/usr/lib/python3/dist-packages/plinth/modules/backups/repository.py", line 139, in get_info output = privileged.info(self.borg_path, File "/usr/lib/python3/dist-packages/plinth/actions.py", line 57, in wrapper return _run_privileged_method_as_process(module_name, action_name, File "/usr/lib/python3/dist-packages/plinth/actions.py", line 116, in _run_privileged_method_as_process return _wait_for_return(*wait_args) File "/usr/lib/python3/dist-packages/plinth/actions.py", line 154, in _wait_for_return raise exception subprocess.CalledProcessError: Command '['borg', 'info', '--json', '/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a']' returned non-zero exit status 2. janv. 29 15:17:11 freedombox /usr/bin/plinth[21898]: # backups..is_mounted(…) janv. 29 15:17:12 freedombox sudo[22431]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions backups is_mounted --write-fd 16 janv. 29 15:17:12 freedombox sudo[22431]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115) janv. 29 15:17:16 freedombox sudo[22431]: pam_unix(sudo:session): session closed for user root janv. 29 15:17:16 freedombox /usr/bin/plinth[21898]: # backups..umount(…) janv. 29 15:17:17 freedombox sudo[22436]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions backups umount --write-fd 16 janv. 29 15:17:17 freedombox sudo[22436]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115) janv. 29 15:17:21 freedombox systemd[1]: media-d27a0b90\x2d9fe7\x2d11ed\x2d9fed\x2d02990b41e22a.mount: Succeeded. janv. 29 15:17:21 freedombox sudo[22436]: pam_unix(sudo:session): session closed for user root janv. 29 15:17:22 freedombox /usr/bin/plinth[21898]: # backups..is_mounted(…) janv. 29 15:17:22 freedombox sudo[22442]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions backups is_mounted --write-fd 16 janv. 29 15:17:22 freedombox sudo[22442]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115) janv. 29 15:17:26 freedombox sudo[22442]: pam_unix(sudo:session): session closed for user root janv. 29 15:17:27 freedombox /usr/bin/plinth[21898]: [Errno 13] Permission denied: '/media/d27a0b90-9fe7-11ed-9fed-02990b41e22a' janv. 29 15:17:27 freedombox apache-access[21788]: 127.0.1.1:443 192.168.1.51 - - [29/Jan/2023:15:16:42 +0000] "POST /plinth/sys/backups/repositories/d27a0b90-9fe7-11ed-9fed-02990b41e22a/ssh-verify/ HTTP/2.0" 302 1318 "ht> janv. 29 15:17:27 freedombox apache-access[21788]: 127.0.1.1:443 192.168.1.51 - - [29/Jan/2023:15:17:27 +0000] "GET /plinth/sys/backups/repositories/add-remote/ HTTP/2.0" 200 5627 "https://192.168.1.69/plinth/sys/backups/>
Here is what the attempt with encryption gave:
janv. 29 16:44:17 freedombox /usr/share/plinth/actions/actions[22713]: Error executing action: Command '['borg', 'init', '--encryption', 'repokey', '/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a']' returned non-zero exit st> Traceback (most recent call last): File "/usr/share/plinth/actions/actions", line 92, in _call return_values = func(*arguments['args'], **arguments['kwargs']) File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 127, in init _init_repository(path, encryption, encryption_passphrase) File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 120, in _init_repository _run(cmd, encryption_passphrase) File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 350, in _run return subprocess.run(cmd, check=check, env=env, **kwargs) File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['borg', 'init', '--encryption', 'repokey', '/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a']' returned non-zero > janv. 29 16:44:18 freedombox sudo[22711]: pam_unix(sudo:session): session closed for user root janv. 29 16:44:18 freedombox /usr/bin/plinth[21898]: Error running action backups..init(*('/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a', 'repokey', '3^e#:5}I-[HXlBOL\\_:Xz$% janv. 29 16:44:18 freedombox /usr/bin/plinth[21898]: # backups..info(…) janv. 29 16:44:18 freedombox sudo[22717]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions backups info --write-fd 13 janv. 29 16:44:18 freedombox sudo[22717]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115) janv. 29 16:44:26 freedombox /usr/share/plinth/actions/actions[22719]: Error executing action: Command '['borg', 'info', '--json', '/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a']' returned non-zero exit status 2. Traceback (most recent call last): File "/usr/share/plinth/actions/actions", line 92, in _call return_values = func(*arguments['args'], **arguments['kwargs']) File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 133, in info process = _run(['borg', 'info', '--json', path], encryption_passphrase, File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 350, in _run return subprocess.run(cmd, check=check, env=env, **kwargs) File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['borg', 'info', '--json', '/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a']' returned non-zero exit status 2. janv. 29 16:44:27 freedombox sudo[22717]: pam_unix(sudo:session): session closed for user root janv. 29 16:44:27 freedombox /usr/bin/plinth[21898]: Error running action backups..info(*('/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a', '3^e#:5}I-[HXlBOL\\_:Xz$% janv. 29 16:44:27 freedombox /usr/bin/plinth[21898]: Error adding repository: Command '['borg', 'info', '--json', '/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a']' returned non-zero exit status 2. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/plinth/modules/backups/views.py", line 417, in _save_repository repository.initialize() File "/usr/lib/python3/dist-packages/plinth/modules/backups/repository.py", line 432, in initialize super().initialize() File "/usr/lib/python3/dist-packages/plinth/modules/backups/repository.py", line 208, in initialize self.get_info() # If password is incorrect raise an error early. File "/usr/lib/python3/dist-packages/plinth/modules/backups/repository.py", line 139, in get_info output = privileged.info(self.borg_path, File "/usr/lib/python3/dist-packages/plinth/actions.py", line 57, in wrapper return _run_privileged_method_as_process(module_name, action_name, File "/usr/lib/python3/dist-packages/plinth/actions.py", line 116, in _run_privileged_method_as_process return _wait_for_return(*wait_args) File "/usr/lib/python3/dist-packages/plinth/actions.py", line 154, in _wait_for_return raise exception subprocess.CalledProcessError: Command '['borg', 'info', '--json', '/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a']' returned non-zero exit status 2. janv. 29 16:44:27 freedombox /usr/bin/plinth[21898]: # backups..is_mounted(…) janv. 29 16:44:27 freedombox sudo[22724]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions backups is_mounted --write-fd 13 janv. 29 16:44:27 freedombox sudo[22724]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115) janv. 29 16:44:32 freedombox sudo[22724]: pam_unix(sudo:session): session closed for user root janv. 29 16:44:32 freedombox /usr/bin/plinth[21898]: # backups..umount(…) janv. 29 16:44:32 freedombox sudo[22729]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions backups umount --write-fd 13 janv. 29 16:44:32 freedombox sudo[22729]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115) janv. 29 16:44:36 freedombox systemd[1]: media-20a2f032\x2d9ff4\x2d11ed\x2d9e9e\x2d02990b41e22a.mount: Succeeded. janv. 29 16:44:37 freedombox sudo[22729]: pam_unix(sudo:session): session closed for user root janv. 29 16:44:37 freedombox /usr/bin/plinth[21898]: # backups..is_mounted(…) janv. 29 16:44:37 freedombox sudo[22735]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions backups is_mounted --write-fd 13 janv. 29 16:44:37 freedombox sudo[22735]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115) janv. 29 16:44:42 freedombox sudo[22735]: pam_unix(sudo:session): session closed for user root janv. 29 16:44:42 freedombox /usr/bin/plinth[21898]: [Errno 13] Permission denied: '/media/20a2f032-9ff4-11ed-9e9e-02990b41e22a' janv. 29 16:44:42 freedombox apache-access[21788]: 127.0.1.1:443 192.168.1.51 - - [29/Jan/2023:16:43:58 +0000] "GET /plinth/sys/backups/repositories/20a2f032-9ff4-11ed-9e9e-02990b41e22a/ssh-verify/ HTTP/2.0" 302 1427 "htt> janv. 29 16:44:43 freedombox apache-access[21788]: 127.0.1.1:443 192.168.1.51 - - [29/Jan/2023:16:44:42 +0000] "GET /plinth/sys/backups/repositories/add-remote/ HTTP/2.0" 200 5648 "https://192.168.1.69/plinth/sys/backups/>