-
-
Save kayodelycaon/1d3f2d5c62e33a6cecdbb814f0c84951 to your computer and use it in GitHub Desktop.
reMarkable Backup Script. All files expect to be in /home/root/backup/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Rsync documents to basement server. | |
Wants=backup.timer | |
[Service] | |
Type=oneshot | |
ExecStart=/home/root/backup/backup.sh | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SSID=`iwgetid -r` | |
if [ "$SSID" = "Aardvark 51" ]; then | |
/opt/bin/rsync --quiet --recursive --times --rsh=ssh --delete --partial "/home/root/.local/share/remarkable/xochitl" "ac@10.0.1.23:Dropbox/Projects/reMarkable/document_backups/" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Descriptions=Backs up files every hour. | |
Requires=backup.service | |
[Timer] | |
Unit=backup.service | |
# Wait for network to be available. | |
ExecStartPre=/bin/sleep 30 | |
OnBootSec=5min | |
OnUnitActiveSec=30min | |
[Install] | |
WantedBy=timers.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
opkg install rsync | |
chmod +x /home/root/backup/backup.sh | |
ln -s /home/root/backup/backup.service /etc/systemd/system/backup.service | |
ln -s /home/root/backup/backup.timer /etc/systemd/system/backup.timer | |
systemctl enable backup.timer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment