Closed o0mba0o closed 1 year ago
You run vaultwarden/server
with the -v /vw-data/:/data/
parameter to mount the local /vw-data/
directory in the /data/
directory of the container.
But you restored the files to the /vw-data/
directory of the vaultwarden
volume during the restore, you should change the --mount type=volume,source="vaultwarden",target=/vw-data/
in the restore command to --mount type=bind,source="/vw-data/", target=/data/
, which is equivalent to -v /vw-data/:/data/
.
I have two questions.
/share/trash/
when restoring? I think so, otherwise the restore won't work.vaultwarden
volume, and you start the vaultwarden container still using the -v /vw-data/:/data/
, that just doesn't apply the restored files, why would the account password be wrong?thanks for the folder reference.
if i change:
docker run --rm -it \
--mount type=volume,source="vaultwarden",target=/vw-data/ \
--mount type=bind,source=$(pwd),target=/bitwarden/restore/ \
-e DATA_DIR="/data" \
ttionya/vaultwarden-backup:latest restore --zip-file /share/trash/backup.20221225.7z
to:
docker run --rm -it \
--mount type=bind,source="/vw-data/", target=/data/ \
--mount type=bind,source=$(pwd),target=/bitwarden/restore/ \
-e DATA_DIR="/data" \
ttionya/vaultwarden-backup:latest restore --zip-file /share/trash/backup.20221225.7z
I get the following error message:
invalid argument "type=bind,source=/vw-data/," for "--mount" flag: invalid field '' must be a key=value pair
See 'docker run --help'.
Username or password is incorrect. Try again
) came up.
invalid argument "type=bind,source=/vw-data/," for "--mount" flag: invalid field '' must be a key=value pair See 'docker run --help'
I didn't test it, maybe I added the space by mistake.
--mount type=bind,source="/vw-data/",target="/data/"
How stupid of me not to realize that. I thank you. restore worked
Hi, I want to copy my running vaultwarden docker instance to a new server.
The existing instance was started with:
docker run -d --name vaultwarden -v /vw-data/:/data/ -p 8899:80 vaultwarden/server:latest
The backups are created as follows:
I used the same vaultwarden start command and stopped vaultwarden before the restore. This is my restore command:
...this is the output:
After starting the vaulwarden container, I am not able to log into my account.
Username or password is incorrect. Try again
what am I doing wrong?