dots/.bin/save-passwddb

17 lines
501 B
Plaintext
Raw Normal View History

2022-05-11 13:45:34 +02:00
#!/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