# Restore backup for bitwadenrs/server

**URL:** <https://vaultwarden.discourse.group/t/restore-backup-for-bitwadenrs-server/70>\
**Category:** Help\
**Created:** [April 13, 2020, 2:38pm UTC](https://vaultwarden.discourse.group/t/restore-backup-for-bitwadenrs-server/70 "2020-04-13T14:38:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpopesc](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/gpopesc/32/36_2.png) [@gpopesc](https://vaultwarden.discourse.group/u/gpopesc)\
**Post date:** [April 13, 2020, 2:38pm UTC](https://vaultwarden.discourse.group/t/restore-backup-for-bitwadenrs-server/70/1 "2020-04-13T14:38:02Z")

</div>

I have been using from more than a year bitwardenrs/server (with internal sqllite) from docker without any problems.  
I have data folder with database (also several backups), config.json.  
I want to be on the safe side and I want to test a recovery from backup. This process is not touched anywhere in the documentation. I tried to run another instance of docker with same (copied data) without any luck. I can access admin panel , but it isn’t any user defined inside.  
Also I tried to convert the database into mysql format and use the bitwardenrs/mysql-server. No luck, the database it is restored, but I cannot access it from bitwarden interface.

Does anybody have any ideas?

---

<div class="post-metadata">

**Author:** ![WpJ](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@WpJ](https://vaultwarden.discourse.group/u/WpJ)\
**Post date:** [April 13, 2020, 5:55pm UTC](https://vaultwarden.discourse.group/t/restore-backup-for-bitwadenrs-server/70/2 "2020-04-13T17:55:43Z")

</div>

Thank you for that question, I backup BW (together with a SQL dump of the database) but somehow never tried to recover it.

> [@gpopesc](#):
>
> I tried to run another instance of docker with same (copied data)

The fact that another instance with a copy of the data does not work is worrisome indeed.

Have you tried to dump the database on the “production” BW instance (`sqlite3 db.sqlite3 ".backup sqlite3.db.backup"`) and import it in the “recovery” instance?

---

<div class="post-metadata">

**Author:** ![jjlin](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@jjlin](https://vaultwarden.discourse.group/u/jjlin)\
**Post date:** [April 13, 2020, 6:27pm UTC](https://vaultwarden.discourse.group/t/restore-backup-for-bitwadenrs-server/70/3 "2020-04-13T18:27:36Z")

</div>

It’s not called out prominently, but [Backing up your vault · dani-garcia/vaultwarden Wiki · GitHub](https://github.com/dani-garcia/bitwarden_rs/wiki/Backing-up-your-vault) does say:

> To restore simply overwrite `db.sqlite3` with `backup.sqlite3` (while bitwarden\_rs is stopped).

This should work fine if you’re reverting an existing instance’s database to a previous version. If you’re restoring to a completely separate instance, you’ll want to restore `config.json`, the attachments directory and its contents, and the key files to that instance’s data folder as well.

---

<div class="post-metadata">

**Author:** ![gpopesc](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/gpopesc/32/36_2.png) [@gpopesc](https://vaultwarden.discourse.group/u/gpopesc)\
**Post date:** [April 13, 2020, 9:10pm UTC](https://vaultwarden.discourse.group/t/restore-backup-for-bitwadenrs-server/70/4 "2020-04-13T21:10:30Z")

</div>

Thank you very much both.  
It works, (with or without restoring the database). I was mapping wrong path on the server side, that’s why didn’t work in the first time.

Here it is the docker compose file which I am using in my Synology:

version: ‘3’  
services:  
bitwarden:  
image: bitwardenrs/server  
container\_name: bitwarden\_second  
ports:  
- “3012:3012”  
- “3333:80”  
environment:  
ADMIN\_TOKEN: “your\_admin\_pass”  
SMTP\_HOST: "[mail.server.com](http://mail.server.com)  
SMTP\_PORT: 587  
SMTP\_FROM: “your\_email”  
SMTP\_FROM\_NAME: “Bitwarden\_RS”  
SMTP\_USERNAME : “email\_username”  
SMTP\_PASSWORD: “email\_pass”  
volumes:  
- /volume1/docker/bitwarden:/data  
network\_mode: bridge
