JSS Backup - redundancy

mjohnston
New Contributor

Hi All,
Looking for some tips on redundancy for our Casper environment.
Our JSS is on a Windows 2008 R2 server.
I configured the database to backup every night but it looks like it can only backup locally to that same server. If it could backup to a different server that would be ideal.

I spun up a second server in the hopes that I could script a copy job to it from the JSS.
My scripting is very elementary at best so it's not really working out so far.

What do you Casper admins recommend for redundancy using Windows servers?
Ultimately, I like the idea that if our JSS was down for whatever, I could quickly and easily have the second server running with minimal interruption of service.

Thanks,
Matt

8 REPLIES 8

daz_wallace
Contributor III
Contributor III

Hi @mjohnston

For your scenario, It'll depend on what you currently use to backup your Windows servers. Some of our clients have a solution where an agent is installed on a server and then directories can be specified for backups. If this is possible, I'd suggest that and point it at your JSS Backup directory.

In regards to the general redundancy question, you could spin off your Tomcat part of the server to another Server, even going as far as clustering two or more Tomcat servers to provide a failover (although this would need a load balancer to work correctly). This would result in having another server for MySQL and you could either script this backup, or look at dedicated MySQL backups.

The MySQL database is the core part of your JSS, it's what makes your JSS yours (it holds all the stuff you've configured and setup in the JSS).

I hope that helps, or at least gives you some ideas!

Darren

mjohnston
New Contributor

Thanks for the info. We have around 60 Macs in our environment so in my mind, not really big enough to work on clustering etc...
I really just want to be able to save the database off to a different network share somewhere and it's disappointing that the DB backup utility will only backup locally to the JSS.

Has anyone written a powershell script that copies the Databse backup folder off to another share somewhere on a set schedule? My powershell knowledge is very elementary and all attempts so far are not working.

Thanks in advance for help.
Matt

corbinmharris
Contributor

This what I do for our MacMini that supports about 150 Macs in 3 international locations that replicates to another MacMini in Uruguay.

  1. External drive running TimeMachine
  2. Carbon Copy Cloner to update a bootable external drive overnight
  3. CrashPlan ProE cloud backup in the event of a hurricane.

Considering moving to JSS Cloud this year and the MacMinis will just be distro points.

Corbin

nessts
Valued Contributor II

have your database backup write the file to a place that is backed up. or into your CasperShare so it it synchronized with your CasperShare Sync if you do that in some sort of automated fashion

jonscott
New Contributor

Hi Matt,

It's been awhile since I've done much with Windows servers, but I used to use robocopy a bit to synchronize data between servers. It should do what you're asking about. You can certainly find more complete examples online, but something like

robocopy C:JSSBackups \OtherServerJSSBackups

on the command line or in a batch file is a start. If scheduled tasks are still a thing, that'll do the scheduling.

I do something similar with a command line tool on Linux to copy database backups to AWS.

Jon

mjohnston
New Contributor

Thanks for the robocopy tip off. Haven't looked at this for years and years.

So here's what I did. I mapped z: on my JSS to a network share obviously on another server.
I put robocopy "C:Program FilesJSSBackupsDatabase" z: /purge into notepad and saved it as a ps1 file (powershell script) and then configured task scheduler to run the script at a specified time.

So this script will copy the contents of the JSS backup folder which backs up every night and deletes files older than 14 days. It copies it to z: (the pre mapped share) and then the /purge part deletes any files in the destination that no longer reside in the source.

In essence, the script syncs the destination folder with the source folder and seems to do it perfectly.

Thanks to all for getting my mind in the right direction. As always, JAMF nation is the place to come for help.
Matt

Chris_Hafner
Valued Contributor II

All good options on the low end. In which case, another low end solution I used once upon a time was to have that dump the database backup into a dropbox folder and then head off to other things.

donmontalvo
Esteemed Contributor II

+1 on Robocopy, now that JSS flattens everything, can be used to replicate DPs too. :)

--
https://donmontalvo.com