Closed Seele0oO closed 1 year ago
~/Documents/bitwarden/data ❯ tree 12s 16:59:47
.
├── attachments
├── icon_cache
│ └── 1.cn.png.miss
├── rsa_key.pem
├── rsa_key.pub.pem
├── sends
└── tmp
At this point a password is stored in the database.
@Seele0oO ,
I have researched and only need to modify a small amount of code to support PostgreSQL and MariaDB/MySQL .
But I'm not good with databases and don't know how to backup and restore PostgreSQL and MariaDB/MySQL data properly.
Another problem occurs in the restore phase, sqlite can be restored by just copying the db file to the folder, but other databases need to execute sql, this is also the aspect that bothers me.
If you can provide the shell command for PostgreSQL database backup and restore, I will finish the support for PostgreSQL as soon as possible. If you can also provide commands for MariaDB/MySQL, that would be great.
Thank you for your attention,I have done some shell scripts, but I am not very skilled, so I wrote some example, hope it is useful for you.
https://github.com/Seele0oO/vaultwarden-backup/commit/b9e1c2496522fb264497b9822d810b1649a8a2c9
by the way,It's not a good idea to use mysql, I think it's too heavy. There is some example. https://github.com/Seele0oO/vaultwarden-backup/commit/42272732db698716075e841ee96825d7b8f1f728
In my view,the MariaDB/MySQL is the same in commands. So it's probably universal.
@Seele0oO ,
The PostgreSQL backend is now supported, try it on 1.16.0-beta.0
.
Please let me know if you have any questions.
I will continue to add MySQL/MariaDB support.
thanks for your work.I will test it in few days later.Take care yourself and be well. It is the time to sleeping.
1.16.0-beta.1
is support Mysql(MariaDB) and PostgreSQL backend.
1.16.0-beta.2
is support PostgreSQL 15. And earlier beta versions are no longer available.
I'm wondering if I'm missing some environment variables that specify the backup method? In my tests, the data in the datagrip-connected postgresql database changed as I made changes, but the backup program still just backed up those files.
After I added some attachments to my test account, these two folders remained empty.
Please provide environment variables.
vaultwarden:
environment:
SIGNUPS_ALLOWED: 'true'
DATABASE_URL: 'postgresql://postgres:example@db/postgres'
backup:
environment:
CRON: '*/5 * * * *'
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: example
@Seele0oO ,
Hello, is the postgresql database backup working?
It works fine on Debain 11. I can't test it with mysql because of the preformance of my password-server.
Released stable version v1.16.0.
Use this parameter.
The vault can be stored to it. Using this approach you can create distributed vaultwarden.
So does this backup function support postgresql backup function?