Note: update/upgrade: untested
ns8-joplinserver v1.0.3
Test Case 1 - Synchronization
𐄂 Test Case 2 - Backup Restore
In-place Restore / Restore to new instance: both failed in the same way (new empty instance created alongside the original one and same errors on logs):
restic dump latest state/environment
Assertion failed
File "/var/lib/nethserver/cluster/actions/restore-module/50restore_module", line 93, in <module>
agent.assert_exp(restore_task_result['exit_code'] == 0)
<7>dump_env() is deprecated and implemented as a no-op
restic restore latest --target . --exclude state/environment
Trying to pull ghcr.io/nethserver/restic:2.5.5...
Getting image source signatures
Copying blob sha256:ccd15ec35a55c72323b554c3bde65171991ba9bb19a7175aba75f96714761a4b
Copying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf
Copying config sha256:fd6e01af38514f98c338ef39a62c22388754a95fd7c9a14291123e16c696c08e
Writing manifest to image destination
restoring <Snapshot 6fc22c67 of [/srv/volumes/postgres-data /srv/state/database.env /srv/state/environment] at 2024-03-22 20:15:43.448719877 +0000 UTC by root@test1> to .
mkdir: created directory 'restore'
/home/joplin2/.config/actions/restore-module/40restore-postgres.sh: line 23: joplin.pg_dump: No such file or directory
2024-03-22T21:19:19+01:00 [1:joplin2:agent@joplin2] mkdir: created directory 'restore'
2024-03-22T21:19:19+01:00 [1:joplin2:agent@joplin2] /home/joplin2/.config/actions/restore-module/40restore-postgres.sh: line 23: joplin.pg_dump: No such file or directory
2024-03-22T21:19:19+01:00 [1:joplin2:agent@joplin2] task/module/joplin2/6f7970dc-415f-40e1-9254-36acfc6bc414: action "restore-module" status is "aborted" (1) at step 40restore-postgres.sh
𐄂 Test Case 3 - Clone Module: Failed (new “empty” instance created alongside the original):
cluster/clone-module
Task module/joplin5/clone-module run failed: {'output': '', 'error': '<7>podman-pull-missing ghcr.io/nethserver/rsync:2.5.5\nTrying to pull ghcr.io/nethserver/rsync:2.5.5...\nGetting image source signatures\nCopying blob sha256:12d5f4ef1f93597dd37040f3fb0e0ccb751db7afa0bda1b507f5a9586c05b17c\nCopying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf\nCopying config sha256:046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a\nWriting manifest to image destination\n046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a\n<7>podman volume create restic-cache\nrestic-cache\n<7>podman volume create postgres-data\npostgres-data\n<7>podman run --rm --privileged --network=host --workdir=/srv --env=RSYNCD_NETWORK=10.5.4.0/24 --env=RSYNCD_ADDRESS=cluster-localnode --env=RSYNCD_PORT=20030 --env=RSYNCD_USER=joplin4 --env=RSYNCD_PASSWORD=10486f8dbcdaa-87f9-471d-8602-171229ecb245 --env=RSYNCD_SYSLOG_TAG=joplin5 --volume=/dev/log:/dev/log --volume=/home/joplin5/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5\nImporting APP_BASE_URL from source instance\nImporting APP_PORT from source instance\nImporting TRAEFIK_HOST from source instance\nImporting TRAEFIK_HTTP2HTTPS from source instance\nImporting TRAEFIK_LETS_ENCRYPT from source instance\nTraceback (most recent call last):\n File "/home/joplin5/.config/actions/clone-module/50traefik", line 14, in <module>\n renv = request[\'environment\']\n ~~~~~~~^^^^^^^^^^^^^^^\nKeyError: \'environment\'\n', 'exit_code': 1}
Task module/joplin4/transfer-state run failed: {'output': '', 'error': '<7>podman-pull-missing ghcr.io/nethserver/rsync:2.5.5\nTrying to pull ghcr.io/nethserver/rsync:2.5.5...\nGetting image source signatures\nCopying blob sha256:12d5f4ef1f93597dd37040f3fb0e0ccb751db7afa0bda1b507f5a9586c05b17c\nCopying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf\nCopying config sha256:046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a\nWriting manifest to image destination\n046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a\nDialling 10.5.4.1:20030...\n<7>[Errno 111] Connection refused\nConnection with 10.5.4.1:20030 established: the server is ready.\n<7>cp -v environment environment.clone-module\n\'environment\' -> \'environment.clone-module\'\n<7>systemctl --user show default.target -p Wants --value\n<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-payload --env=RSYNC_PASSWORD --volume=/home/joplin4/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5 rsync -a --info=progress2 --exclude=/state/agent.env --exclude=/state/environment --exclude=/state/apitoken.cache ./ rsync://joplin4@10.5.4.1:20030/data/\n<7>systemctl --user isolate transfer-state.target\n<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-send --env=RSYNC_PASSWORD --volume=/home/joplin4/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5 rsync -a --info=progress2 --delete-after --exclude=/state/agent.env --exclude=/state/environment --exclude=/state/apitoken.cache ./ rsync://joplin4@10.5.4.1:20030/data/\nfile has vanished: "/srv/volumes/postgres-data/postmaster.pid"\nrsync warning: some files vanished before they could be transferred (code 24) at main.c(1336) [sender=3.2.7]\n<3>[ERROR] rsync transfer error 24\n<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-send --env=RSYNC_PASSWORD ghcr.io/nethserver/rsync:2.5.5 rsync -q rsync://joplin4@10.5.4.1:20030/terminate\n<7>systemctl --user isolate default.target\n', 'exit_code': 1}
cluster/clone-module
<7>podman-pull-missing ghcr.io/nethserver/rsync:2.5.5
Trying to pull ghcr.io/nethserver/rsync:2.5.5...
Getting image source signatures
Copying blob sha256:12d5f4ef1f93597dd37040f3fb0e0ccb751db7afa0bda1b507f5a9586c05b17c
Copying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf
Copying config sha256:046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a
Writing manifest to image destination
046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a
<7>podman volume create restic-cache
restic-cache
<7>podman volume create postgres-data
postgres-data
<7>podman run --rm --privileged --network=host --workdir=/srv --env=RSYNCD_NETWORK=10.5.4.0/24 --env=RSYNCD_ADDRESS=cluster-localnode --env=RSYNCD_PORT=20030 --env=RSYNCD_USER=joplin4 --env=RSYNCD_PASSWORD=10486f8dbcdaa-87f9-471d-8602-171229ecb245 --env=RSYNCD_SYSLOG_TAG=joplin5 --volume=/dev/log:/dev/log --volume=/home/joplin5/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5
Importing APP_BASE_URL from source instance
Importing APP_PORT from source instance
Importing TRAEFIK_HOST from source instance
Importing TRAEFIK_HTTP2HTTPS from source instance
Importing TRAEFIK_LETS_ENCRYPT from source instance
Traceback (most recent call last):
File "/home/joplin5/.config/actions/clone-module/50traefik", line 14, in <module>
renv = request['environment']
~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'environment'
cluster/transfer-state
<7>podman-pull-missing ghcr.io/nethserver/rsync:2.5.5
Trying to pull ghcr.io/nethserver/rsync:2.5.5...
Getting image source signatures
Copying blob sha256:12d5f4ef1f93597dd37040f3fb0e0ccb751db7afa0bda1b507f5a9586c05b17c
Copying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf
Copying config sha256:046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a
Writing manifest to image destination
046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a
Dialling 10.5.4.1:20030...
<7>[Errno 111] Connection refused
Connection with 10.5.4.1:20030 established: the server is ready.
<7>cp -v environment environment.clone-module
'environment' -> 'environment.clone-module'
<7>systemctl --user show default.target -p Wants --value
<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-payload --env=RSYNC_PASSWORD --volume=/home/joplin4/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5 rsync -a --info=progress2 --exclude=/state/agent.env --exclude=/state/environment --exclude=/state/apitoken.cache ./ rsync://joplin4@10.5.4.1:20030/data/
<7>systemctl --user isolate transfer-state.target
<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-send --env=RSYNC_PASSWORD --volume=/home/joplin4/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5 rsync -a --info=progress2 --delete-after --exclude=/state/agent.env --exclude=/state/environment --exclude=/state/apitoken.cache ./ rsync://joplin4@10.5.4.1:20030/data/
file has vanished: "/srv/volumes/postgres-data/postmaster.pid"
rsync warning: some files vanished before they could be transferred (code 24) at main.c(1336) [sender=3.2.7]
<3>[ERROR] rsync transfer error 24
<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-send --env=RSYNC_PASSWORD ghcr.io/nethserver/rsync:2.5.5 rsync -q rsync://joplin4@10.5.4.1:20030/terminate
<7>systemctl --user isolate default.target
Confirmation that notes and uploaded files are stored:
Sharing works: