Unable to restore from backup (column "stopwatch" doesn't exist) #297

Closed
opened 2026-02-04 18:26:15 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @james-smith-za on GitHub (Mar 8, 2023).

Hi there! Great project, have loved using it for the last few days.

Tried to migrate from running on my desktop to a more permanent home on a VPS. I did this by doing a backup / restore.

Everything seems to be running, I can log in and see my boards etc. but when I open a project / board, then it gets stuck with a spinning circle where the lists / cards should be.

image

If I do docker logs planka_planka_1, then I get this:

2023-03-08 07:42:40 [E] Sending 500 ("Server Error") response: 
 Unexpected error from database adapter: column "stopwatch" does not exist

I've reached the limits of my knowledge now. How would one go about debugging this?

Originally created by @james-smith-za on GitHub (Mar 8, 2023). Hi there! Great project, have loved using it for the last few days. Tried to migrate from running on my desktop to a more permanent home on a VPS. I did this by doing a backup / restore. Everything seems to be running, I can log in and see my boards etc. but when I open a project / board, then it gets stuck with a spinning circle where the lists / cards should be. ![image](https://user-images.githubusercontent.com/10864691/223652345-8728066d-cc73-43a0-9edb-04ad007176df.png) If I do `docker logs planka_planka_1`, then I get this: ``` 2023-03-08 07:42:40 [E] Sending 500 ("Server Error") response: Unexpected error from database adapter: column "stopwatch" does not exist ``` I've reached the limits of my knowledge now. How would one go about debugging this?
Author
Owner

@meltyshev commented on GitHub (Mar 8, 2023):

Hi! Hmm, I think I figured out what the problem might be. A newer version of Planka was installed on the new server, where there was a small change in the database, but the data in the backup didn't have these changes. But when Planka starts up, it should migrate the database automatically...

Please try to run this command:
docker exec --user postgres -t planka-postgres-1 psql -d planka -c "SELECT * FROM migration"

At the bottom there should be a line 20230227170557_rename_timer_to_stopwatch.js.

If it's there, delete it:
docker exec --user postgres -t planka-postgres-1 psql -d planka -c "DELETE FROM migration WHERE name = '20230227170557_rename_timer_to_stopwatch.js'"

Then start the migration again (even if that line wasn't there):
docker exec -t planka-planka-1 npm run db:migrate

Then restart the container.

Note: do not forget to replace the name of the container in the commands.

@meltyshev commented on GitHub (Mar 8, 2023): Hi! Hmm, I think I figured out what the problem might be. A newer version of Planka was installed on the new server, where there was a small change in the database, but the data in the backup didn't have these changes. But when Planka starts up, it should migrate the database automatically... Please try to run this command: `docker exec --user postgres -t planka-postgres-1 psql -d planka -c "SELECT * FROM migration"` At the bottom there should be a line `20230227170557_rename_timer_to_stopwatch.js`. If it's there, delete it: `docker exec --user postgres -t planka-postgres-1 psql -d planka -c "DELETE FROM migration WHERE name = '20230227170557_rename_timer_to_stopwatch.js'"` Then start the migration again (even if that line wasn't there): `docker exec -t planka-planka-1 npm run db:migrate` Then restart the container. _Note: do not forget to replace the name of the container in the commands._
Author
Owner

@james-smith-za commented on GitHub (Mar 8, 2023):

Thanks @meltyshev, working perfectly now! My sincerest gratitude.
I did wonder if there may have been a version update causing issues, but I wasn't quite sure how to check.

The line 20230227170557_rename_timer_to_stopwatch.js wasn't in the output, but the migration that you suggested did the trick.

@james-smith-za commented on GitHub (Mar 8, 2023): Thanks @meltyshev, working perfectly now! My sincerest gratitude. I did wonder if there may have been a version update causing issues, but I wasn't quite sure how to check. The line `20230227170557_rename_timer_to_stopwatch.js` wasn't in the output, but the migration that you suggested did the trick.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#297