JSS DB replication to TEST JSS

HenryOzsoy
New Contributor III

Hi everyone,

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

Thanks,

Henry

1 ACCEPTED SOLUTION

HenryOzsoy
New Contributor III

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

View solution in original post

7 REPLIES 7

Simmo
Contributor II
Contributor II

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

HenryOzsoy
New Contributor III

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.

Simmo
Contributor II
Contributor II

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?

jarednichols
Honored Contributor

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

fritz_schlapbac
Contributor

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.

HenryOzsoy
New Contributor III

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

cbrewer
Valued Contributor II

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.