From d531c74dee66314854149be5f2fe2641ad50b7d7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 Mar 2023 04:02:52 +0000 Subject: (SystemD)+very simple backup service Timer which runs weekly, copying my directory completely. Very naive, I'm thinking compression should be my first effort. --- SystemD/.config/systemd/user/backup.service | 6 ++++++ SystemD/.config/systemd/user/backup.timer | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 SystemD/.config/systemd/user/backup.service create mode 100644 SystemD/.config/systemd/user/backup.timer (limited to 'SystemD/.config/systemd/user') diff --git a/SystemD/.config/systemd/user/backup.service b/SystemD/.config/systemd/user/backup.service new file mode 100644 index 0000000..d3bb8ed --- /dev/null +++ b/SystemD/.config/systemd/user/backup.service @@ -0,0 +1,6 @@ +[Unit] +Description=Taking backup + +[Service] +Type=simple +ExecStart=/usr/bin/rsync -a --delete --quiet /home/oreo /media/hdd/backup diff --git a/SystemD/.config/systemd/user/backup.timer b/SystemD/.config/systemd/user/backup.timer new file mode 100644 index 0000000..2ddee9d --- /dev/null +++ b/SystemD/.config/systemd/user/backup.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run backup weekly + +[Timer] +OnBootSec=15min +OnUnitActiveSec=1w + +[Install] +WantedBy=timers.target -- cgit v1.2.3-13-gbd6f