Skip to content
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

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

jhuscott
Copy link

…tly to more closely mimic the behavior of the Borgbase Vorta backup client. Added more documentation.

jhuscott added 2 commits May 26, 2019 23:26
…tly to more closely mimic the behavior of the Borgbase Vorta backup client. Added more documentation.
Copy link
Owner

@bebehei bebehei left a 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!

backup Outdated Show resolved Hide resolved
backup Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated

# add cronjob (for hourly backup)
{ crontab -l ; echo "0 * * * * backup"; } | crontab -
{ crontab -l ; echo "0 * * * * /usr/local/bin/backup"; } | crontab -
Copy link
Owner

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.

Copy link
Author

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.

Copy link
Owner

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!

Copy link
Author

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.

@bebehei
Copy link
Owner

bebehei commented May 27, 2019

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.

Scott Roberts added 2 commits May 28, 2019 10:45
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.
backup Outdated Show resolved Hide resolved
jhuscott and others added 4 commits May 28, 2019 11:22
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.
@jhuscott
Copy link
Author

jhuscott commented Jun 1, 2019

Let me know if I need to make any more changes for the PR. Have a good weekend!

jhuscott added 2 commits June 13, 2019 09:06
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
Repository owner deleted a comment from Soumya6Tiwari Feb 23, 2024
@bebehei
Copy link
Owner

bebehei commented Aug 7, 2024

Do you have any intent to get this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants