Posted on 08-04-2015 07:26 PM
Hi everyone,
Do anyone of you know a quick method to replicate your JSS DB on to a Test JSS?
Thanks,
Henry
Solved! Go to Solution.
Posted on 08-04-2015 10:47 PM
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
Posted on 08-04-2015 07:52 PM
Fairly simple using the jss database utility, or you can look through your administrator guide for the commands to backup and restore the database.
Posted on 08-04-2015 07:56 PM
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.
Posted on 08-04-2015 08:06 PM
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?
Posted on 08-04-2015 08:37 PM
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
Posted on 08-04-2015 10:40 PM
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.
Posted on 08-04-2015 10:47 PM
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
Posted on 08-05-2015 05:55 AM
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.