How can I import vikunja dump zip file

First of all, vikunja suddenly deleted my account(?) and I couldn’t log in. There is nothing on the logs, just “Wrong username or password”, but no, it’s not wrong. The proof is that I was connected in the desktop app and when I tried to create another task it appeared “Invalid or expired jwt”. By luck I was able to do backups with vikunja dump. But I’m not able to import the data. When I try to import it appears “Internal server error” and in the logs “no data file provided.”

Vikunja restore did not work too. Restore, restart container and it didn’t log. Tried creating the same account, with the same password, retore, restart the container and didin’t work either, this way bugs everything, even freezes firefox.

What dump are you trying to import where? The dump from the vikunja dump command can only be imported with the vikunja restore command.

Did you confirm the dump import?

Yes, of course. Also what’s the correct way to do the restore? “Restore, restart container and it didn’t log. Tried creating the same account, with the same password, retore, restart the container and didin’t work either, this way bugs everything, even freezes firefox.”.

Anyway, I think I’ve done all possible ways.

What did you do? Can you provide the exact steps you did, including the commands you executed etc?

And what do you mean by “it didn’t log”?

It means that I can’t log in to the account.
Restore, restart container and it didn’t log.
vikunja restore from vikunja dump. Confirm and try to log in the webui
Tried creating the same account, with the same password, retore, restart the container and didin’t work either, this way bugs everything, even freezes firefox.
vikunja restore from vikunja dump. Confirm and create an account with the same passoword etc.

Anything in the logs after importing the dump? Was the dump imported successfully?

Can you verify the dump you’re importing actually has data? (Open the zip and look at the content of the json files, users.json contains all users for example)

What Vkkunja version are you using?

I just checked the backup files, and all json files are empty. But I was able to create tasks and manage my account earlier, so must there was a problem with vikunja dump. I just tried to create another account and do the vikunja dump, every json was empty. Seeing other posts seems vikunja dump to have had some problems over the past year related to empty folders and stuff.

What’s in the logs when you create the dump?

Vikunja 20.2

2023/02/25 13:39:16 No config file found, using default or config from environment variables.
2023-02-25T13:39:16.221780411Z: INFO	▶ migration/Migrate 04e Ran all migrations successfully.
2023-02-25T13:39:16.222774554Z: INFO	▶ models/RegisterReminderCron 04f Mailer is disabled, not sending reminders per mail
2023-02-25T13:39:16.223371162Z: INFO	▶ models/RegisterOverdueReminderCron 050 Mailer is disabled, not sending overdue per mail
2023-02-25T13:39:16.224855024Z: INFO	▶ dump/Dump 051 Start dumping config file...
2023-02-25T13:39:16.225325281Z: WARNING	▶ dump/Dump 052 No config file found, not including one in the dump. This usually happens when environment variables are used for configuration.
2023-02-25T13:39:16.225707316Z: INFO	▶ dump/Dump 053 Dumped config file
2023-02-25T13:39:16.229325351Z: INFO	▶ [EVENTS] 058 Adding handler, handler_name=poison.logger, topic=poison
2023-02-25T13:39:16.229191519Z: INFO	▶ dump/Dump 057 Dumped .env file
2023-02-25T13:39:16.229553665Z: INFO	▶ dump/Dump 059 Start dumping version file...
2023-02-25T13:39:16.22961835Z: INFO	▶ [EVENTS] 05b Adding handler, handler_name=list.created.list.counter.increase, topic=list.created
2023-02-25T13:39:16.232685278Z: INFO	▶ [EVENTS] 05c Adding handler, handler_name=list.created.send.list.created.notification, topic=list.created
2023-02-25T13:39:16.232971665Z: INFO	▶ [EVENTS] 05d Adding handler, topic=task.created, handler_name=task.created.task.counter.increase
2023-02-25T13:39:16.233316719Z: INFO	▶ [EVENTS] 05e Adding handler, handler_name=task.created.task.created.mentions, topic=task.created
2023-02-25T13:39:16.233584513Z: INFO	▶ [EVENTS] 05f Adding handler, topic=team.created, handler_name=team.created.team.counter.increase
2023-02-25T13:39:16.233797827Z: INFO	▶ [EVENTS] 060 Adding handler, handler_name=task.comment.created.task.comment.notification.send, topic=task.comment.created
2023-02-25T13:39:16.234068029Z: INFO	▶ [EVENTS] 061 Adding handler, handler_name=task.updated.task.updated.mentions, topic=task.updated
2023-02-25T13:39:16.234371991Z: INFO	▶ [EVENTS] 062 Adding handler, handler_name=namespace.deleted.namespace.counter.decrease, topic=namespace.deleted
2023-02-25T13:39:16.234706378Z: INFO	▶ [EVENTS] 063 Adding handler, handler_name=team.deleted.team.counter.decrease, topic=team.deleted
2023-02-25T13:39:16.234969598Z: INFO	▶ [EVENTS] 064 Adding handler, handler_name=user.export.requested.handle.user.data.export, topic=user.export.requested
2023-02-25T13:39:16.235348707Z: INFO	▶ [EVENTS] 065 Adding handler, topic=user.created, handler_name=user.created.increase.user.counter
2023-02-25T13:39:16.235612984Z: INFO	▶ [EVENTS] 066 Adding handler, handler_name=list.deleted.list.counter.decrease, topic=list.deleted
2023-02-25T13:39:16.235927649Z: INFO	▶ [EVENTS] 067 Adding handler, handler_name=namespace.created.namespace.counter.increase, topic=namespace.created
2023-02-25T13:39:16.236068037Z: INFO	▶ [EVENTS] 068 Adding handler, topic=task.deleted, handler_name=task.deleted.task.counter.decrease
2023-02-25T13:39:16.236201221Z: INFO	▶ [EVENTS] 06a Adding handler, handler_name=task.deleted.task.deleted.notification.send, topic=task.deleted
2023-02-25T13:39:16.236335406Z: INFO	▶ [EVENTS] 06b Adding handler, handler_name=team.member.added.team.member.added.notification, topic=team.member.added
2023-02-25T13:39:16.236516349Z: INFO	▶ [EVENTS] 06c Adding handler, handler_name=task.comment.edited.handle.task.comment.edit.mentions, topic=task.comment.edited
2023-02-25T13:39:16.236108777Z: INFO	▶ dump/Dump 069 Dumped version
2023-02-25T13:39:16.236855051Z: INFO	▶ dump/Dump 06e Start dumping database...
2023-02-25T13:39:16.236684497Z: INFO	▶ [EVENTS] 06d Adding handler, handler_name=task.assignee.created.task.assigned.notification.send, topic=task.assignee.created
2023-02-25T13:39:16.237811583Z: INFO	▶ [EVENTS] 06f Adding handler, handler_name=task.assignee.created.task.assignee.subscribe, topic=task.assignee.created
2023-02-25T13:39:16.242031838Z: INFO	▶ [EVENTS] 08c Starting handler, subscriber_name=task.deleted.task.counter.decrease, topic=task.deleted
2023-02-25T13:39:16.242195429Z: INFO	▶ [EVENTS] 08f Starting handler, subscriber_name=list.created.send.list.created.notification, topic=list.created
2023-02-25T13:39:16.242312818Z: INFO	▶ [EVENTS] 091 Starting handler, topic=team.deleted, subscriber_name=team.deleted.team.counter.decrease
2023-02-25T13:39:16.242601501Z: INFO	▶ [EVENTS] 092 Starting handler, subscriber_name=user.export.requested.handle.user.data.export, topic=user.export.requested
2023-02-25T13:39:16.242817037Z: INFO	▶ [EVENTS] 094 Starting handler, subscriber_name=namespace.deleted.namespace.counter.decrease, topic=namespace.deleted
2023-02-25T13:39:16.242979999Z: INFO	▶ [EVENTS] 095 Starting handler, subscriber_name=list.deleted.list.counter.decrease, topic=list.deleted
2023-02-25T13:39:16.243156239Z: INFO	▶ [EVENTS] 096 Starting handler, topic=namespace.created, subscriber_name=namespace.created.namespace.counter.increase
2023-02-25T13:39:16.243556515Z: INFO	▶ [EVENTS] 098 Starting handler, subscriber_name=task.assignee.created.task.assigned.notification.send, topic=task.assignee.created
2023-02-25T13:39:16.243885013Z: INFO	▶ [EVENTS] 09a Starting handler, subscriber_name=poison.logger, topic=poison
2023-02-25T13:39:16.24398342Z: INFO	▶ [EVENTS] 09b Starting handler, subscriber_name=task.created.task.created.mentions, topic=task.created
2023-02-25T13:39:16.244080975Z: INFO	▶ [EVENTS] 09c Starting handler, subscriber_name=team.created.team.counter.increase, topic=team.created
2023-02-25T13:39:16.242274207Z: INFO	▶ [EVENTS] 090 Starting handler, subscriber_name=task.updated.task.updated.mentions, topic=task.updated
2023-02-25T13:39:16.244510306Z: INFO	▶ [EVENTS] 0a1 Starting handler, subscriber_name=task.comment.created.task.comment.notification.send, topic=task.comment.created
2023-02-25T13:39:16.242137522Z: INFO	▶ [EVENTS] 08e Starting handler, subscriber_name=team.member.added.team.member.added.notification, topic=team.member.added
2023-02-25T13:39:16.245053784Z: INFO	▶ [EVENTS] 0a3 Starting handler, subscriber_name=task.assignee.created.task.assignee.subscribe, topic=task.assignee.created
2023-02-25T13:39:16.24440101Z: INFO	▶ [EVENTS] 09f Starting handler, subscriber_name=task.comment.edited.handle.task.comment.edit.mentions, topic=task.comment.edited
2023-02-25T13:39:16.244253585Z: INFO	▶ [EVENTS] 09e Starting handler, subscriber_name=user.created.increase.user.counter, topic=user.created
2023-02-25T13:39:16.244449065Z: INFO	▶ [EVENTS] 0a0 Starting handler, subscriber_name=list.created.list.counter.increase, topic=list.created
2023-02-25T13:39:16.245749743Z: INFO	▶ [EVENTS] 0a7 Starting handler, subscriber_name=task.deleted.task.deleted.notification.send, topic=task.deleted
2023-02-25T13:39:16.245500097Z: INFO	▶ [EVENTS] 0a5 Starting handler, topic=task.created, subscriber_name=task.created.task.counter.increase
2023-02-25T13:39:16.273651221Z: INFO	▶ dump/Dump 0f2 Dumped database
2023-02-25T13:39:16.273782331Z: INFO	▶ dump/Dump 0f3 Start dumping files...
2023-02-25T13:39:16.274454142Z: INFO	▶ dump/Dump 0f5 Dumped files
2023-02-25T13:39:16.274572642Z: INFO	▶ dump/Dump 0f6 Done creating dump
2023-02-25T13:39:16.27465766Z: INFO	▶ dump/Dump 0f7 Dump file saved at vikunja-dump_2023-02-25_13-01-16.zip

I seems to have had the issue over “user does not exist” after update. Anyway, I just want to have the opportunity to do a backup if it’s possible.

How did you run the vikunja dump command?

1 Like

Inside docker container using the vikunja file for the command.

Can you share the exact command?

./vikunja dump files/backup/

And how did you get inside that docker container?

docker exec -ti vikunja /bin/sh

Are you using a config file or env variables only? In the latter case, can you check (with the env command) if the variables are populated properly?

Env variables(default). What’s the env command?