mirror of
https://github.com/xzeldon/vwdump.git
synced 2025-06-28 02:28:14 +03:00

**README** - Overhaul; changed docs to be better aligned to the new `backup.sh`. - Add example `docker-compose`. **Dockerfile** - Install `zip`. - Remove installation of `sqlite`. - Remove unnecessary variables. **backup.sh** - Overhaul; now zips all required and recommended files and directories stated at [vaultwarden docs](https://github.com/dani-garcia/vaultwarden/wiki/Backing-up-your-vault). - Removed deleting old backups; will be added later on in a separate script. **entrypoint.sh** - Removed creating folders.
15 lines
481 B
Bash
15 lines
481 B
Bash
#!/bin/sh
|
|
|
|
# Create variable for new backup zip.
|
|
BACKUP_ZIP=/backups/$(date "+%F_%H.%M.%S").zip
|
|
|
|
# Create variables for the files and directories to be zipped.
|
|
BACKUP_DB=db.sqlite3 # file
|
|
BACKUP_RSA=rsa_key* # files
|
|
BACKUP_CONFIG=config.json # file
|
|
BACKUP_ATTACHMENTS=attachments # directory
|
|
BACKUP_SENDS=sends # directory
|
|
|
|
# Create a zip of the files and directories.
|
|
cd /data && zip -r $BACKUP_ZIP $BACKUP_DB $BACKUP_RSA $BACKUP_CONFIG $BACKUP_ATTACHMENTS $BACKUP_SENDS && cd ..
|