JSS Database backups: how often and methods used

Hafiz
New Contributor II

Guys right now I am manually doing database backups on the CentOS7 JSS by, e.g.:
mysqldump -u root -p jamfsoftware > casper_database_25092015.sql

... And then scp'ing the file off to my MacBook.

But I want to automate the process with a cron daemaon (or even the systemd equivalent of cron), how are people creating their database backups - what kind of scripts are there? How often would you suggest doing a backup of the JSS database - daily, weekly, monthly? And how are you getting your database .sql files off to remote cifs/smb shares which are protected by active directory authentication passwords?

I am thinking of backing up the JSS database to two different remote shares but these will require AD username/password to log-in to (any good method for doing that?) but just wondering if there are any good scripts out there for doing that. And if there are better methods than that which people are using.

6 REPLIES 6

bentoms
Release Candidate Programs Tester

@Hafiz my JSS is running on OSX server... So we can use the JSS Util to schedule nightly backups.

I then RSYNC the folder where the backups are kept a few hours later to a few remote servers.

Hafiz
New Contributor II

@bentoms The servers that you rsync to do they require authentication or are they just open shares? I suppose you can enter the username, password in an encrypted file....

jarednichols
Honored Contributor

In the past I've used MySQL replication to a slave database in a different datacenter. This way I didn't have to lock the tables, dump it, scp it, store those... PITA.

Should the master DB go down, then worry about dumping from the slave. And, because you've been replicating vs backing up, you've got very little data loss.

Live replication, ftw.

bentoms
Release Candidate Programs Tester

@Hafiz it's RSYNC over ssh.. So no open shares, & the syncing is done over a secure tunnel.

Here is the how.

Chris_Hafner
Valued Contributor II

Our MySQL db and JSS webserver runs on an OS X box as well so we also use JAMF scheduler utility. This performs nightly backups which are then synced to my NetBoot server and other DPs. I use dropbox as this is a simple syncing service that also backs things up offsite regardless of my other offsite storage. What can I say, it was simple and cheap. I can about security of course, but in edu. I get to follow our own guidelines.

EightQuarterBit
New Contributor III

We use Carbonite's built-in MySQL backup function to perform nightly backups. This does require having a Windows server on hand to run Carbonite on, and we're using a dedicated MySQL server so I'm not sure what alterations you might have to make if you're using the the built-in MySQL server set up by JSS installer, but so far we've been happy with the solution.

Before we purchased Carbonite I was doing weekly manual backups from my technician MacBook with Sequel Pro, which at least gives a nice GUI and takes out the complication of getting the backups off the MySQL server. I still perform manual backups this way before I update the JSS or perform other significant maintenance.