Automate KeepassXC database backup
This commit is contained in:
11
.bin/save-passwddb
Executable file
11
.bin/save-passwddb
Executable 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:
|
||||
11
.config/systemd/user/save-passwddb.service
Normal file
11
.config/systemd/user/save-passwddb.service
Normal 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
|
||||
10
.config/systemd/user/save-passwddb.timer
Normal file
10
.config/systemd/user/save-passwddb.timer
Normal 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
|
||||
Reference in New Issue
Block a user