The command: sqlite db.sqlite3 ".backup 'backup/backup.sqlite3'" exit with an error:
Unable to open database "db.sqlite3": file is encrypted or is not a database
Is there a different way to backup the database?
Originally created by @luciano-fiandesio on GitHub (Sep 9, 2019).
I'm trying to follow the wiki for vault backup:
https://github.com/dani-garcia/bitwarden_rs/wiki/Backing-up-your-vault
The command: `sqlite db.sqlite3 ".backup 'backup/backup.sqlite3'"` exit with an error:
`Unable to open database "db.sqlite3": file is encrypted or is not a database`
Is there a different way to backup the database?
Remove the apostrophes around 'backup/backup.sqlite3', they are not needed.
Here is the script I cobbled together and run once a day via cron to backup my database and remove backups older than 30 days... adjust to your setup if you'd like. :) Hope it helps!
@Ayitaka commented on GitHub (Sep 9, 2019):
Remove the apostrophes around `'backup/backup.sqlite3'`, they are not needed.
Here is the script I cobbled together and run once a day via cron to backup my database and remove backups older than 30 days... adjust to your setup if you'd like. :) Hope it helps!
```
#!/bin/sh
DB_FILE="/home/bitwarden/bw-data/db.sqlite3"
BACKUP_DIR="/home/bitwarden/backup"
BACKUP_FILE="${BACKUP_DIR}/backup.sqlite3.$(date "+%F-%H%M%S")"
mkdir -p $BACKUP_DIR
sqlite3 $DB_FILE ".backup ${BACKUP_FILE}" >/dev/null
# Remove backups older than 30 days.
find $BACKUP_DIR -type f -name 'backup.sqlite3.*' -mtime +30 -exec rm {} \;
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @luciano-fiandesio on GitHub (Sep 9, 2019).
I'm trying to follow the wiki for vault backup:
https://github.com/dani-garcia/bitwarden_rs/wiki/Backing-up-your-vault
The command:
sqlite db.sqlite3 ".backup 'backup/backup.sqlite3'"exit with an error:Unable to open database "db.sqlite3": file is encrypted or is not a databaseIs there a different way to backup the database?
@Ayitaka commented on GitHub (Sep 9, 2019):
Remove the apostrophes around
'backup/backup.sqlite3', they are not needed.Here is the script I cobbled together and run once a day via cron to backup my database and remove backups older than 30 days... adjust to your setup if you'd like. :) Hope it helps!