# I can't make a backup

**URL:** <https://vaultwarden.discourse.group/t/i-cant-make-a-backup/1802>\
**Category:** Help\
**Created:** [August 9, 2022, 1:05pm UTC](https://vaultwarden.discourse.group/t/i-cant-make-a-backup/1802 "2022-08-09T13:05:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shprd95](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/shprd95/32/728_2.png) [@shprd95](https://vaultwarden.discourse.group/u/shprd95)\
**Post date:** [August 9, 2022, 1:05pm UTC](https://vaultwarden.discourse.group/t/i-cant-make-a-backup/1802/1 "2022-08-09T13:05:20Z")

</div>

Hello everyone! I have an issue with creating a backup. By following the [official guide](https://github.com/dani-garcia/vaultwarden/wiki/Backing-up-your-vault) it says to enter this command:

```auto
sqlite3 data/db.sqlite3 ".backup '/path/to/backups/db-$(date '+%Y%m%d-%H%M').sqlite3'"

```

By entering this command I’m getting **Error: cannot open “/home/ubuntu/vw-backup/db-20220809-1220.sqlite3”**

* * *

here’s the command I’m using:

```auto
sqlite3 /opt/vaultwarden/vw-data/db.sqlite3 ".backup '/home/ubuntu/vw_backup/db-$(date '+%Y%m%d-%H%M').sqlite3'"

```

where, **/opt/vaultwarden/vw-data** is the location of my files, and **/home/ubuntu/vw\_backup/** a place to store the backups

* * *

P.S. vw-data is mentioned in volumes docker-compose

```auto
volumes:
      - ./vw-data:/data

```

and the folder vw\_backup exist!

```auto
ubuntu@vaultwarden:~/vw_backup$ pwd
/home/ubuntu/vw_backup

```

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [August 9, 2022, 2:34pm UTC](https://vaultwarden.discourse.group/t/i-cant-make-a-backup/1802/2 "2022-08-09T14:34:54Z")

</div>

Does the user who executes that command have the correct rights to both locations?  
Also, does that folder have the correct chmod rights?

If that is not valid, then the sqlite3 utility can’t access or create a file there, and will cause this specific error message

---

<div class="post-metadata">

**Author:** ![shprd95](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/shprd95/32/728_2.png) [@shprd95](https://vaultwarden.discourse.group/u/shprd95)\
**Post date:** [August 9, 2022, 2:53pm UTC](https://vaultwarden.discourse.group/t/i-cant-make-a-backup/1802/3 "2022-08-09T14:53:30Z")

</div>

i’ve tried with sudo and still no luck

---

<div class="post-metadata">

**Author:** ![kaizerslawten](https://avatars.discourse-cdn.com/v4/letter/k/a88e4f/32.png) [@kaizerslawten](https://vaultwarden.discourse.group/u/kaizerslawten)\
**Post date:** [August 18, 2022, 9:41am UTC](https://vaultwarden.discourse.group/t/i-cant-make-a-backup/1802/4 "2022-08-18T09:41:49Z")

</div>

> [@BlackDex](#):
>
> access

To me works, follow command line below:

`sqlite3 data/db.sqlite3 ".backup $(date '+%Y%m%d-%H%M').sqlite3"`
