No description
  • Python 79.9%
  • PowerShell 20.1%
Find a file
2024-09-02 15:11:35 +00:00
conf added conf dir with client pykmip sample file 2022-09-06 20:41:47 -04:00
.gitignore added working and export directory 2022-09-13 22:25:02 -04:00
bitwardenBackup.ps1 removed shorthand command aliases 2022-06-06 20:38:52 -04:00
bitwardenBackup.py Added -l for srm as this should be enough as the OS should be running on FDE 2024-04-15 19:25:56 +00:00
README.md Updated crontab to install bw cli 2024-09-02 15:11:35 +00:00
requirements.txt removed secure_delete 2022-12-30 17:18:05 -05:00

Bitwarden Backup

This project uses bw cli, gpg, 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 encrypt the export as well, the encryption is symmetric and uses your bitwarden vault password.

Usage

usage: bitwardenBackup.py [options]

Run Bitwarden backup operation. This will produce an encrypted zip/tar with exported CSV, JSON, and attachements.

options:
  -h, --help            show this help message and exit
  -a ACCOUNTS_TO_BACKUP [ACCOUNTS_TO_BACKUP ...], --accounts ACCOUNTS_TO_BACKUP [ACCOUNTS_TO_BACKUP ...]
                        Accounts to backup instead of all accounts.
  -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.  Will backup all configured bitwarden accounts and upload to seafile
 20 2,17 * * /usr/bin/apt update; /usr/bin/apt 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 seafile: --include "*.gpg"; /sbin/shutdown -P now

Example Rclone config file

[seafile]
type = webdav
url = https://gaunt.cloud/seafdav/Bitwarden%20Backups/
vendor = other
user = bitwardenbackup@gaunt.cloud
pass = *****