No description
- Python 81.9%
- PowerShell 18.1%
| conf | ||
| .gitignore | ||
| bitwardenBackup.ps1 | ||
| bitwardenBackup.py | ||
| README.md | ||
| requirements.txt | ||
Bitwarden Backup
This project uses bw cli, gpg/age, and sdelete/srm. It will export the vault and any organizations to both json and csv files. It also downloads all attachments into folders. You can zip the export together or gpg/age encrypt the export as well, the encryption is symmetric and uses your bitwarden vault password.
Usage
usage: bitwardenBackup.py [options]
Run Bitwarden backup opteration. This will produce an encrypted zip/tar with exported CSV, JSON, and attachements.
options:
-h, --help show this help message and exit
-a, --accounts ACCOUNTS_TO_BACKUP [ACCOUNTS_TO_BACKUP ...]
Accounts to backup instead of all accounts.
--age Use AGE instead of GPG encryption.
-c, --config Edit Bitwarden account configuration.
-t, --test Test Bitwarden account login and unlock.
-v, --verbose Output debug/verbose info to the console for troubleshooting.
--no-encryption Will only zip up export and will NOT encrypt anything
Example crontab
# Command to run everything at 22:00 (10PM) on the 2nd and 17th of the month.
# This will update the system, install the latest bw cli and rclone
# After the backup, the encrypted files are moved to my cloud storage.
# If using AGE encryption, you will want to update the --include to *.age
20 2,17 * * /usr/bin/apt-get update; /usr/bin/apt-get upgrade -y; /usr/bin/wget -O /tmp/bw.zip "https://vault.bitwarden.com/download/?app=cli&platform=linux"; /usr/bin/unzip -o -d /tmp/ /tmp/bw.zip; /usr/bin/chmod +x /tmp/bw; /usr/bin/mv /tmp/bw /usr/bin/bw; /usr/bin/python3 /opt/bitwardenbackup/bitwardenBackup.py; /usr/bin/curl https://rclone.org/install.sh | bash; /usr/bin/rclone move /opt/bitwardenbackup/exports cloud: --include "*.gpg"; /sbin/shutdown -P now
Example Rclone config file
[cloud]
type = webdav
url = https://test.cloud/Bitwarden%20Backups/
vendor = other
user = bitwardenbackup@test.cloud
pass = *****