summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2024-12-06 19:06:30 -0500
committerAnthony Wang2024-12-06 19:06:30 -0500
commit8c96e4985b9a0fbe820e5ce1e475e48194339010 (patch)
tree5abf4ffb63ea7d747dad61ffa521d850b0489c65
parent0489207e944ae56038e5ae803ead5fd405c1bb2a (diff)
Switch to rclone for backing up laptop data
-rw-r--r--fish/functions/backup.fish11
-rw-r--r--systemd/user/backup.service8
-rw-r--r--systemd/user/rclone.service8
-rw-r--r--systemd/user/rclone.timer8
4 files changed, 16 insertions, 19 deletions
diff --git a/fish/functions/backup.fish b/fish/functions/backup.fish
deleted file mode 100644
index ec42b1e..0000000
--- a/fish/functions/backup.fish
+++ /dev/null
@@ -1,11 +0,0 @@
-function backup
- if not set -q HOSTNAME
- set HOSTNAME (hostnamectl hostname)
- end
-
- cd ~/Documents/Backups/$HOSTNAME
- cp ~/.local/share/fish/fish_history .
- cp ~/.mozilla/firefox/*.default-release/places.sqlite .
- cp ~/.thunderbird/*.default-release/Mail/Feeds/feeds.json .
- cd -
-end
diff --git a/systemd/user/backup.service b/systemd/user/backup.service
deleted file mode 100644
index 3a3e5b3..0000000
--- a/systemd/user/backup.service
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Back up important files
-
-[Service]
-ExecStart=fish -c backup
-
-[Install]
-WantedBy=default.target
diff --git a/systemd/user/rclone.service b/systemd/user/rclone.service
new file mode 100644
index 0000000..7e5adc5
--- /dev/null
+++ b/systemd/user/rclone.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=rclone
+
+[Service]
+ExecStart=rclone sync ~ crypt: --transfers 32 --include "Documents/**" --include "Music/**" --include "Pictures/**" --include "Videos/**" --include ".local/share/fish/fish_history" --include ".mozilla/firefox/*.default-release/places.sqlite" --include ".ssh/**"
+
+[Install]
+WantedBy=default.target
diff --git a/systemd/user/rclone.timer b/systemd/user/rclone.timer
new file mode 100644
index 0000000..3dd449a
--- /dev/null
+++ b/systemd/user/rclone.timer
@@ -0,0 +1,8 @@
+[Unit]
+Description=rclone daily timer
+
+[Timer]
+OnCalendar=00:00 UTC
+
+[Install]
+WantedBy=timers.target