Not being able to login after doing a backup restore

Hello! I’m trying to make a copy of my Vaultwarden instance (vaultwarden/server:latest)

  • I have a Vaultwarden instance running with PostgreSQL.
  • I did a dump of my PostgreSQL database.
  • Created a new container with a new Vaultwarden instance and a new PostgreSQL database
  • I restored the dump on the new PostgreSQL instance
  • I went to the folder where the Vaultwarden files of my new container are stored and I deleted everything there.
  • I went to the folder where the Vaultwarden files are located
  • I copied the files to the Vaultwarden files location of my new container.

  • Restarted the server

But when I try to login in my new instance, I get the error

{
    "error": "",
    "errorModel": {
        "message": "Username or password is incorrect. Try again",
        "object": "error"
    },
    "error_description": "",
    "exceptionMessage": null,
    "exceptionStackTrace": null,
    "innerExceptionMessage": null,
    "message": "Username or password is incorrect. Try again",
    "object": "error",
    "validationErrors": {
        "": [
            "Username or password is incorrect. Try again"
        ]
    }
}

I’m 100% sure that my credentials are ok. Here it says Backing up your vault · dani-garcia/vaultwarden Wiki · GitHub nothing else apart the dump restore and the files replacement.

Is there anything else I’m missing?

In the Examples section it says: “You should review an example thoroughly and understand what it’s doing before using it” and the one I chose (the gitlab one) uses tar not cp -r as you did. Why re-invent the wheel…

Didn’t think it was any difference between using cp -r instead of tar to copy files. Anyways, I tried with tar and it’s now working correctly.

Thanks!

1 Like