Updated readme with directions on usage and scheduling

This commit is contained in:
2026-01-14 23:34:17 -06:00
parent 3d3f30d717
commit 8fbc641489

View File

@@ -41,6 +41,62 @@ Installation of this software is easy. It's a few commands, and a few prompts.
less install.sh #RTFC!
bash install.sh
## Usage
If you want access to all the binaries in your path, you will have to edit the secure_path defaults in your /etc/sudoers
file to gain access to it via sudo as a sudo-capable user.
sudo visudo
#/etc/sudoers
Defaults secure_path = <blah>:/opt/borg/bin
This will be fixed with the packaged version of this software, as by default the packaged version will install software to
/usr/local/sbin, which is in the secure_path.
Alternatively, you can create a symlink.
sudo ln -s /opt/borg/bin/backup /usr/local/sbin/backup
sudo ln -s /opt/borg/bin/reposetup /usr/local/sbin/reposetup
Alternatively, you can create an alias in your shell rc file
#~/.bashrc
alias backup="sudo /opt/borg/bin/backup
alias reposetup="sudo /opt/borg/bin/reposetup
Use whatever method you prefer, they all accomplish the same thing, with different drawbacks.
Again, this problem will be solved for the packaged release.
To run the backup:
sudo screen -dmS backup /opt/borg/bin/backup
Screen will allow the process to continue running even if your terminal session dies.
You can do similar with tmux
sudo tmux new -ds backup '/opt/borg/bin/backup'
Or, if you like to live dangerously, you can just run
sudo /opt/bin/borg/backup
## Scheduling backups
You can schedule backups using cron or systemd timers. I intend to write a systemd unit and timer for the final release,
but for now the recommended setup would be to use a cronjob.
Either use one of the managed crons (cron.hourly, cron.daily) or set up a cronjob in your crontab
sudo crontab -e
#/etc/crontab
0 4 * * * /opt/borg/bin/backup
Will back up your machine every day at 4:00AM local time.
## Contact
If you use this software, and encounter issues, I'd love to hear from you! If you want to contribute to this software,