added a backup service to back gliese 180 a to gliese 180 b

This commit is contained in:
Shoofle 2022-04-26 12:02:40 -04:00
parent 053d0bbeb0
commit 1fba535ea1
4 changed files with 22 additions and 3 deletions

8
backups.service Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Copy files from Gliese 180 a to Gliese 180 b
After=local-fs.target
[Service]
Type=oneshot
ExecStart=/usr/bin/rsync -a "/mnt/Gliese 180 a/" "/mnt/Gliese 180 b/"
User=shoofle

10
backups.timer Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=Timer for running the backup script (nightly)
[Timer]
OnCalendar=*-*-* 00:00:00
AccuracySec=1m
Persistent=true
[Install]
WantedBy=timers.target

View File

@ -6,6 +6,3 @@ Type=oneshot
WorkingDirectory = /home/shoofle/cygnus WorkingDirectory = /home/shoofle/cygnus
ExecStart=python /home/shoofle/cygnus/update_fortune.py ExecStart=python /home/shoofle/cygnus/update_fortune.py
User=shoofle User=shoofle
[Install]
WantedBy=multi-user.target

View File

@ -37,3 +37,7 @@ installed yt-dl (through apt) and then yt-dlp because yt-dl didn't work https://
symlinked the ssh tunnel service into /etc/systemd/system/ so that i get an always-on ssh tunnel!!! symlinked the ssh tunnel service into /etc/systemd/system/ so that i get an always-on ssh tunnel!!!
finally realized i never did `systemctl enable cygnus.timer --now` so the timer never started which is why my daily task hasn't been running. remedied. finally realized i never did `systemctl enable cygnus.timer --now` so the timer never started which is why my daily task hasn't been running. remedied.
installed mlocate so i can search for things
gotta make it so that it rsyncs things regularly. hrm. apparently that's `rsync -av "/so/urce" "/desti/nation"`. added a backups.service and backups.timer that should be good enough for this purpose. let's try it. gonna ln -s them into /etc/systemd/system