Description
β Have you read and understood the above guidelines?
yes
π What is the name of the script you are using?
Actualbudget
π What was the exact command used to execute the script?
"update"
π Provide a clear and concise description of the issue.
the "update" command on an Actualbudget version 25.1.0 LXC container fails
βοΈ What settings are you using?
- Default Settings
- Advanced Settings
π₯οΈ Which Linux distribution are you using?
Debian 12
π Steps to reproduce the issue.
run the "update" command in an Actualbudget 25.1.0 LXC container (its possible this may only affect containers built with the original helper scripts)
β Paste the full error output (if available).
β ¦mv: cannot stat '/opt/actualbudget_bak/.env': No such file or directory
πΌοΈ Additional context (optional).
Apologies in advance for the long post here
I had an issue attempting to run the "update" command in my Actualbudget 25.1.0 LXC container
my container was created with the original helper scripts, i ran a command to switch it over to the new repo's scripts a while back (i did that with multiple other containers when the switch first happened with no issues)
during the attempted update i got an error that cancelled the update and put my actualbudget instance into a broken state:
β ¦mv: cannot stat '/opt/actualbudget_bak/.env': No such file or directory
i have backups and can always restore to a working version on 25.1.0
per the hover text on the green "updateable" badge at the following page (https://community-scripts.github.io/ProxmoxVE/scripts?id=actualbudget)
i ran the install script on my proxmox host thinking it would forcibly update my actualbudget LXC container, but instead it created a new one (thus the hover text is not accurate)
anyways, now that ive got a fresh container to compare with i noticed the contents of my "prod" instances /opt/ directory looks like this:
/opt/actualbudget/
while the new containers /opt/ directory looks like this:
/opt/actualbudget/
/opt/actualbudget-data/
/opt/actualbudget_version.txt
i have backups of my actualbudget container going back to 9-22-2024, ive checked the backup from that date and my container still had the same /opt/ file structure back then as well
additionally, the /opt/actualbudget/.env file also does not exist in any of my backups
the oldest backup from 9-22-2024 is running Actualbudget 24.9.0 and when connecting to its console its greeter says:
"Actual Budget LXC provided by https://helper-scripts.com/"
so, this container had been switched to the new repo before that point
being that im running version 25.1.0 and backups as far back as 9-22-2024 have the same /opt/ structure and missing .env file im assuming (with very high confidence) i updated this container via the "update" command to version 25.1.0 successfully without issue since then, and it appears those differences only now break the update process and did not previously
anyways, in my attempt to fix my problems myself i went ahead and created the missing folder (/opt/actualbudget-data/), an appropriate version text file (/opt/actualbudget_version.txt) with my actual version, as well as created a /opt/actualbudget/.env file with the following contents (as per the file from the latest container):
ACTUAL_UPLOAD_DIR=/opt/actualbudget/server-files
ACTUAL_DATA_DIR=/opt/actualbudget-data
ACTUAL_SERVER_FILES_DIR=/opt/actualbudget/server-files
PORT=5006
after making those changes i ran the "update" command and it completed successfully
now that my actualbudget instance has been updated to the latest version 25.2.1 with the help of your script (and some manual intervention) - when i use the "sync" button on my account within Actualbudget i get an error:
"We had problems syncing your changes. Please report this as a bug by opening a GitHub issue."
journalctl output shows an error:
Feb 19 05:30:51 actualbudget yarn[307]: Rejection: TypeError: Cannot open database because the directory does not exist
in my /opt/actualbudget/ directory i have a folder "server-files" that contains "account.sqlite"
in the new container it appears the same file exists at /opt/actualbudget-data/server-files/account.sqlite
in my prod container, if i copy that file from /opt/actualbudget/server-files/account.sqlite to /opt/actualbudget-data/server-files/account.sqlite i still get the same error within actualbudget as well as journalctl, permissions on both files are the same:
root@actualbudget:~# ls -al /opt/actualbudget-data/server-files/
total 68
drwxr-xr-x 2 root root 4096 Feb 19 06:09 .
drwxr-xr-x 3 root root 4096 Feb 19 06:09 ..
-rw-r--r-- 1 root root 61440 Feb 19 06:09 account.sqlite
root@actualbudget:~# ls -al /opt/actualbudget/server-files/
total 68
drwxr-xr-x 2 root root 4096 Dec 20 05:41 .
drwxrwxr-x 10 root root 4096 Feb 19 04:47 ..
-rw-r--r-- 1 root root 61440 Dec 20 05:41 account.sqlite
direct questions:
-
was there a change made to the sqlite db's location?
-
are there multiple locations the db could reside at that are not being taken account for by the update script?
-
is there proper validation happening to ensure that /opt/actualbudget/.env exists and has the right contents since its required to update?
-
with the manual changes i made to successfully update, what could still be missing that is preventing Actualbudget from functioning properly at version 25.2.1?
thank you in advance