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`
|
|
|
|
|
2023-06-12 00:26:40 +02:00
|
|
|
if [ -f "$HOME/doc/passwd.kdbx" ]; then
|
2023-06-12 00:25:20 +02:00
|
|
|
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
|