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

Finding a good home for backups #1

Closed
allonhadaya opened this issue Aug 25, 2016 · 3 comments
Closed

Finding a good home for backups #1

allonhadaya opened this issue Aug 25, 2016 · 3 comments

Comments

@allonhadaya
Copy link
Contributor

allonhadaya commented Aug 25, 2016

The backup script in template/ubuntu-16.04/backup.sh uses /tmp/backups as the destination of backup files (as well as intermediate files).

BACKUP_DIR=/tmp/backups

On some distros /tmp is cleared either on boot or by regular cron jobs: http://serverfault.com/questions/377348/when-does-tmp-get-cleared

On other systems /tmp is backed by RAM and may be lost on crashes.

This is not the default behaviour on Ubuntu, but should a different directory be chosen in case this script is used on a distro that does clear tmp OR if a user happens to configure their Ubuntu server to clear tmp?

Perhaps this is actually a philosophical point: backups are not temporary by definition. They are persistent (at least for the duration of the retention policy).

How about /root/backups? Is there an even better option? Is /tmp actually the right place; why?

I'm curious to hear your thoughts!

@voidmain
Copy link
Member

I wrote it this way because the backup.sh script is just an example. Also, I put at the bottom of the script a commented out line that would copy the files offsite. My thought was to drop them in /tmp, copy them offsite, and then potentially clear /tmp or let it be cleared whenever by whoever. I'm up for changing that behavior in the script though.

@allonhadaya
Copy link
Contributor Author

Cool, the choice definitely makes sense in the context of copying the backup files elsewhere. What do you think of #4?

@voidmain
Copy link
Member

voidmain commented Sep 6, 2016

Looks good. I merged it into master as c887dae. Thanks for the update.

@voidmain voidmain closed this as completed Sep 6, 2016
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

No branches or pull requests

2 participants