Skip to main content
Solved

JSS DB replication to TEST JSS

  • August 5, 2015
  • 7 replies
  • 72 views

Forum|alt.badge.img+7

Hi everyone,

Do anyone of you know a quick method to replicate your JSS DB on to a Test JSS?

Thanks,

Henry

Best answer by HenryOzsoy

My problem was that my default max_allowed_packet size was set to 4M. I changed it to 1024M as it is the max value for MYSQL packet size and restored the backup with no issues

7 replies

Forum|alt.badge.img+12
  • Contributor
  • August 5, 2015

Fairly simple using the jss database utility, or you can look through your administrator guide for the commands to backup and restore the database.


Forum|alt.badge.img+7
  • Author
  • Contributor
  • August 5, 2015

Thanks for the response @Simmo. I tried this yet it fails. I'm think that my JSS DB is hosted on a Win 2008 R2 Server and my Test JSS being hosted on a Win 2012 R2 server is causing the issue not sure.


Forum|alt.badge.img+12
  • Contributor
  • August 5, 2015

The server version shouldn't matter, the database should be universal and can be carried over from any host windows linux or mac.
Though there may be an issue surrounding 2008 > 2012? Not sure.

But it sounds like if it's not restoring correctly there may be an underlying issue.
Getting any kind of errors?


Forum|alt.badge.img+24
  • Valued Contributor
  • August 5, 2015

No idea if this is the issue, but I had Windows MySQL issues a few years back with database import/exports.

https://jamfnation.jamfsoftware.com/discussion.html?id=6243


Forum|alt.badge.img+7

I'm doing this with a PowerShell script but from a 2008 R2 to another 2008 R2 server.

To create a dump file I use:
mysqldump -u $DBuser --databases $DBname -r $Filename

To import the dump file I use:
mysql -u $DBuser $DBpasswordl $DBname < $PathtoDumpfile

The mysqldump creates a UTF-8 encoded file by default. If you edit something in the file before importing it, make sure it is still encoded in UTF-8. Everytime I had a problem with the import it was because of the encoding.


Forum|alt.badge.img+7
  • Author
  • Contributor
  • Answer
  • August 5, 2015

My problem was that my default max_allowed_packet size was set to 4M. I changed it to 1024M as it is the max value for MYSQL packet size and restored the backup with no issues


Forum|alt.badge.img+15
  • Esteemed Contributor
  • August 5, 2015

Be careful doing this. You can cause yourself major issues by setting up a test environment that uses the same VPP and DEP accounts as your production environment. There's probably a few other things to think about as well.