Shooting a Cloudron Server right in the brain - I deleted appsdata and boxdata by accident
-
Lets update Cloudron to experimental - 7.1.X - What can go wrong?
a lot when something fails and you try to debug the/home/yellowtent/box/box.js
and use the environment variables from the systemd service and then don't realize you also set the HOME variable and then docd
and see confused that in the root folder has theappsdata
andboxdata
folder.
You think:
Did I execute box.js as root and now the folders are in root? Better delete them
Hmm why is my mail not working, why is nothing working correctly? Only the box.service did not work
OhNo.jpgImage Description: Two panes, left and right. Spongebob grinning into the camera very close up with normal big eyes in the left pane. In the right pane just the eyes shrink into a very small version, like oh no what have I done
pwd /home/yellowtent
fml I just delete all app data and boxdata
Time to restore cloudron from the pre-update backup.
I run a Hetzner Storage box as backup space.
ps: I know the backup id is wrong and I fixed that
And now for the first time, I get an error when trying to restore.
Looking into the
/home/yellowtent/platformdata/logs/box.log
HttpError: Cannot access 'error' before initialization at Function.BoxError.toHttpError (/home/yellowtent/box/src/boxerror.js:107:16) at restore (/home/yellowtent/box/src/routes/provision.js:121:37) at processTicksAndRejections (internal/process/task_queues.js:95:5) { status: 500, internalError: ReferenceError: Cannot access 'error' before initialization at Object.restore (/home/yellowtent/box/src/provision.js:210:19) at processTicksAndRejections (internal/process/task_queues.js:95:5), details: null } Box POST /api/v1/cloudron/restore 500 Internal Server Error Cannot access 'error' before initialization 2.663 ms - 99
What? Lets look up this error in the forum.
Ok linked to this:
https://forum.cloudron.io/topic/6494/restore-error-cannot-access-error-before-initialization/4?_=1645411808982Since I am restoring from 7.0.4 I am still affected by this issue.
So what to do? Wait for support? No I can't, I need my mails up and running!I need to apply the commits done to fix this issue:
https://git.cloudron.io/cloudron/box/-/commit/04b7c14fd71e65072f43ed008d9e8b598dd946ab
https://git.cloudron.io/cloudron/box/-/commit/8b9d821905b55c624084cb7665d8fbdb621a56e4
https://git.cloudron.io/cloudron/box/-/commit/a786fad3eed59e9ed141c7a3344466b61e280891if you put a
.diff
to the url you will get the diff file which then can get applied viagit apply
.
So I got into/home/yellowtent/box
andwget
the diffs.wget https://git.cloudron.io/cloudron/box/-/commit/04b7c14fd71e65072f43ed008d9e8b598dd946ab.diff wget https://git.cloudron.io/cloudron/box/-/commit/8b9d821905b55c624084cb7665d8fbdb621a56e4.diff wget https://git.cloudron.io/cloudron/box/-/commit/a786fad3eed59e9ed141c7a3344466b61e280891.diff # now I apply the diffs aka patches git apply 04b7c14fd71e65072f43ed008d9e8b598dd946ab.diff git apply 8b9d821905b55c624084cb7665d8fbdb621a56e4.diff git apply a786fad3eed59e9ed141c7a3344466b61e280891.diff # a box restart systemctl restart box.service
File not found: /mnt/cloudronbackup/2022-02-21-003521-723/box_v7.0.4.tar.gz
Next error..
ls -lah /mnt/cloudronbackup/cloudron-backup/2022-02-21-003521-723/box_v7.0.4.tar.gz
The path is wrong in the error?
tail -f /home/yellowtent/platformdata/logs/box.log 2022-02-21T03:09:00.625Z box:provision setProgress: restore - Downloading box backup 2022-02-21T03:09:00.625Z box:backuptask download: Downloading 2022-02-21-003521-723/box_v7.0.4 of format tgz to {"localRoot":"/home/yellowtent/boxdata/box","layout":[]} 2022-02-21T03:09:00.625Z box:provision setProgress: restore - Downloading backup 2022-02-21-003521-723/box_v7.0.4 2022-02-21T03:09:00.625Z box:storage/filesystem download: /mnt/cloudronbackup/2022-02-21-003521-723/box_v7.0.4.tar.gz 2022-02-21T03:09:20.695Z box:provision setProgress: restore - Downloading backup 2022-02-21-003521-723/box_v7.0.4 2022-02-21T03:09:20.695Z box:storage/filesystem download: /mnt/cloudronbackup/2022-02-21-003521-723/box_v7.0.4.tar.gz 2022-02-21T03:09:40.762Z box:provision setProgress: restore - Downloading backup 2022-02-21-003521-723/box_v7.0.4 2022-02-21T03:09:40.762Z box:storage/filesystem download: /mnt/cloudronbackup/2022-02-21-003521-723/box_v7.0.4.tar.gz 2022-02-21T03:10:00.831Z box:provision setProgress: restore - Downloading backup 2022-02-21-003521-723/box_v7.0.4 2022-02-21T03:10:00.831Z box:storage/filesystem download: /mnt/cloudronbackup/2022-02-21-003521-723/box_v7.0.4.tar.gz 2022-02-21T03:10:20.904Z box:provision setProgress: restore - Downloading backup 2022-02-21-003521-723/box_v7.0.4 2022-02-21T03:10:20.904Z box:storage/filesystem download: /mnt/cloudronbackup/2022-02-21-003521-723/box_v7.0.4.tar.gz
Hmmm...
OH! The backup remote directory is wrong it should be/backup/cloudron-backup
then!And now it works!
Now I am looking at a dashboard that is restoring my apps. -
@BrutalBirdie That must have been intense !!
-
@rmdes
Not so much intense, more annoyed by my own mistake.
I'm pretty confident in the cloudron backup system since I destroyed my cloudron multiple times like this with installing other software, tinkering with code yada yada.But having the restore error on me made my heart race a little I must admit.
Knowing this error seems cryptic and off I knew something must be wrong.
I even tried coping the whole backup into the system and restoring that (Filesystem Mountpoint) with the same error.
So I knew something was up.I am glad I run into this issue so I can provide this experience and a more newbie user does not have to stress themself out with this.
-
-
-
-