https://github.com/alisianoi/borg-systemd
Automate borg via systemd
https://github.com/alisianoi/borg-systemd
Last synced: 7 months ago
JSON representation
Automate borg via systemd
- Host: GitHub
- URL: https://github.com/alisianoi/borg-systemd
- Owner: alisianoi
- Created: 2018-06-26T19:42:09.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2020-10-10T14:25:56.000Z (about 5 years ago)
- Last Synced: 2025-01-24T09:41:38.587Z (9 months ago)
- Homepage:
- Size: 16.6 KB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Borg systemd scripts
====================These are some systemd .service and .timer scripts that I use for
personal backups. Here is how to set them up and monitor them.How to add new backup repo
--------------------------1. Initialize a borg repo:
.. code-block:: bash
borg init --encryption none ~/Backup/borg/host-user-repo
2. Use a custom `borg-backup-topic.{service,timer}` pair of scripts to
set up *what* to back up and *how* often. Copy both to user's systemd
scripts and then enable/start timers:.. code-block:: bash
sudo cp borg-backup-topic.service /etc/systemd/user
sudo cp borg-backup-topic.timer /etc/systemd/usersystemctl --user enable borg-backup-topic.timer
systemctl --user start borg-backup-topic.timerHow to check that backups are working
-------------------------------------.. warning::
If you are running services with superuser privileges, repeat all
the subsequent commands *without* the `--user` switch.Make sure the timers are enabled and running:
.. code-block:: bash
systemctl --user list-timers --all
Make sure the services are ok:
.. code-block:: bash
systemctl --user status borg-backup-topic