Automate KeepassXC database backup

master
Hektor Misplon 2022-05-11 13:45:34 +02:00
parent 5957aa3ed4
commit 1c6f0776e1
3 changed files with 32 additions and 0 deletions

11
.bin/save-passwddb Executable file
View File

@ -0,0 +1,11 @@
#!/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`
rclone copy "$HOME/doc/passwd.kdbx" google-drive:

View File

@ -0,0 +1,11 @@
[Unit]
Description=Save KeypassXC password database to cloud
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
ExecStart=/home/h/.bin/save-passwddb
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,10 @@
[Unit]
Description=Save Keepass password database to cloud daily
[Timer]
OnCalendar=daily
RandomizedDelaySec=12h
Persistent=true
[Install]
WantedBy=timers.target