-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added hourly backup option. Added exclude file. Modified script sligh… #4
base: master
Are you sure you want to change the base?
Conversation
…tly to more closely mimic the behavior of the Borgbase Vorta backup client. Added more documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to split your commits by topic? It would be a great thing!
README.md
Outdated
|
||
# add cronjob (for hourly backup) | ||
{ crontab -l ; echo "0 * * * * backup"; } | crontab - | ||
{ crontab -l ; echo "0 * * * * /usr/local/bin/backup"; } | crontab - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/usr/local/bin
... see my comments below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When writing a crontab (especially root's crontab), hard paths should be coded for whatever you are running. Not doing so easily allows an attacker to compromise a system. If two "backup" scripts, for example, are on the path, an attacker could write one that would get executed by root and cron would have no way of reporting that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point. But whenever you've got a path in your PATH variable, which is not strictly limited to be writable by the user itself or root, you've got a problem. A different problem and a problem not limited to cron.
The correct solution for that is not to hardcode a single executable path, you have to hardcode every path!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the README with additional information. I think in this case, providing an example for the crontab entry is OK.
Also I'd like to apologise for the last months not reacting to anything. I had a personal breakdown and had to take a hiatus. |
Added CMD_BORG variable to example.env and modified backup script to accomodate. Added information to README.
Moved borg command verification to *after* the environment file is read-in.
Corrected CMD_BORG variable definition Co-Authored-By: Benedikt Heine <[email protected]>
Created variable called OPT_BORG_EXCLUDE_IF_PRESENT in example.env and added this to the backup script.
Added documentation link and additional sample exclusion patterns that are useful.
Let me know if I need to make any more changes for the PR. Have a good weekend! |
Added BORG_RSH variable to set the location of an SSH key for a remote borg server
Added examples for BORG_REPO variable to include local and remote hosts
Do you have any intent to get this merged? |
…tly to more closely mimic the behavior of the Borgbase Vorta backup client. Added more documentation.