dots/.bin/save-passwddb

17 lines
501 B
Bash
Executable File

#!/usr/bin/env bash
# Save (encrypted) password database to cloud storage
#
# Can be run manually or daily by enabling the corresponding systemd user
# service and timer, i.e.
#
# `systemctl --user enable save-passwddb.service`
# `systemctl --user enable save-passwddb.timer`
if [ -f "$HOME/doc/passwd.kdbx" ]; then
rclone copy "$HOME/doc/passwd.kdbx" google-drive:
else
echo "Password database not found, use 'rclone copy google-drive:passwd.kdbx $HOME/doc/passwd.kdbx' to restore"
exit 1
fi