Skip to content

Make an actual backup script #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

Merged
merged 4 commits into from
Sep 26, 2016
Merged

Conversation

npwalker
Copy link
Contributor

This PR adds a backup script and changes the interface in the puppet code for backup. Previously there was a defined type for backups and now there is a class that accepts an Array[Hash] of databases and cron schedules that is looped over.

@npwalker
Copy link
Contributor Author

@supercow thoughts on adding a retention parameter to the backup script? Like only keep 2 backups by default?

Change how many backups exist for the database and if it is equal to the retention policy then delete the oldest backup before starting the new backup ( to minimize disk usage and probability of running out of disk space ).

Thoughts?

npwalker and others added 4 commits September 26, 2016 08:36
Prior to this commit, there was no backup script.

After this commit, there is a backup script that will iterate
through an array of database names to produce a script to backup
each database.

Using the defined type, you can backup an arbitrary set of
databases on a different cron schedule.
Prior to this commit, a separate backup script was generated for each
database. This commit replaces all of that with a single bash script
that can backup an arbitrary list of databases.
Prior to this commit, the backup functionality was partially inside
init.pp and partially in a defined type.

After this commit, the backup functionality is in its own class
pe_databases::backup.
Prior to this commit, we used ensure_resource because it was meant
to be inside a defined type that may be specified more than once.
Now the defined type is gone and backup is a class

After this commit, we use file resources for clarity since the class
should not be defined more than once.
@npwalker npwalker force-pushed the make_an_actual_backup_script branch from 88a8ca7 to f567911 Compare September 26, 2016 15:37
@npwalker npwalker merged commit f567911 into master Sep 26, 2016
@npwalker npwalker deleted the make_an_actual_backup_script branch September 26, 2016 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants