edutech4schools Posted September 15, 2015 Posted September 15, 2015 Moved a primary school over to Hyper-V (yay) but am confused in regards to snapshots and Sims. Everyone convinced me to move to virtual saying it was better because of this and that but one of the main reasons was the ability to snapshot a server before making any big changes. Only issue is, everything I have read says it's not a great idea to snapshot a server running SQL databases and obviously Sims is this. So far I have been installing any Windows updates on this server without taking a snapshot but this just seems bonkers and I am wondering if others are taking snapshots of servers running Sims.
3s-gtech Posted September 15, 2015 Posted September 15, 2015 Not snapshots, but we're taking Hyper-V backups of them. You could also use the free version of Veeam to do this.
Jobos Posted September 15, 2015 Posted September 15, 2015 Everyone convinced me to move to virtual saying it was better because of this and that but one of the main reasons was the ability to snapshot a server before making any big changes. Only issue is, everything I have read says it's not a great idea to snapshot a server running SQL databases and obviously Sims is this. Isn't this because snapshots slowdown the vm? I take a snapshot before updating and delete it after checking everything is ok.
john Posted September 15, 2015 Posted September 15, 2015 I would suggest reading this - VMware KB: Best practices for virtual machine snapshots in the VMware environment (yes its vmware but same principal apply to any hypervisor). If you do it, keep it for as shorter time as possible such as a couple of hours as SQL could have such a rate of data change you do yourself no favours.
edutech4schools Posted September 15, 2015 Author Posted September 15, 2015 Isn't this because snapshots slowdown the vm? I take a snapshot before updating and delete it after checking everything is ok. No, its to do with database consistency. @john thanks will have a read
edutech4schools Posted September 15, 2015 Author Posted September 15, 2015 @john that does not seem to mention sql databases specifically. Confusion Over Hyper-V and “Snapshots†| Aidan Finn, IT Pro Hyper-V snapshots are supported in production. But they are not supported by many of the applications you’d install in a VM, e.g. SQL Server, Exchange, etc. So are you all taking snapshots of your sql servers? and if so I presume nothing has broken for you so far.
edutech4schools Posted September 15, 2015 Author Posted September 15, 2015 But I have just found this Changes in support for virtual machine snapshots for SQL Server « The Lowercase w
Arthur Posted September 15, 2015 Posted September 15, 2015 (edited) Only issue is, everything I have read says it's not a great idea to snapshot a server running SQL databases and obviously SIMS is this. You're going to need to upgrade your Hyper-V host(s) to Windows Server 2016 to create VSS-based Production Checkpoints. https://blog.workinghardinit.work/2015/09/04/production-checkpoints-in-windows-server-2016 We now have the choice between two type of checkpoints: Production Checkpoints and Standard Checkpoints. A standard virtual machine checkpoint all the memory state of running applications get stored and when you apply the checkpoint it’s back magically. Doing this to a production SQL or Exchange Server for example causes (huge) problems. With some applications these problems are minor or transient but it’s not a healthy consistent state to be in, and recovery has to happen. Which could happen automatically or require disaster recovery depending on the situation at hand. Production checkpoints are made in application consistent manner. For this the leverage Volume Shadow Copy Services (or File System Freeze on Linux) which puts the virtual machines into a safe state to create a checkpoint that can be restored like a VSS based, application consistent backup or SAN snapshot. This does mean that applying a production checkpoint requires the restored virtual machine to boot from an off line state, just like with a restored backup. The choice for what type of checkpoint can be made on a per virtual machine basis which make it’s flexible as you can pick the best option for a particular virtual machine for a specific purpose. http://www.thomasmaurer.ch/2015/02/sneak-peek-into-the-next-version-of-hyper-v Virtual Machine Checkpoints or in older versions Virtual Machine Snapshots were a great solution to take a state of a virtual machine and save it, doing some changes and if something fails you could simply revert back to the time you took the checkpoint. This was not really supported to use in production, since a lot of applications couldn’t handle that process. Microsoft now changed that behavior now fully supports it in production environments. For this Production Checkpoints are now using VSS instead of the Saved State to create the checkpoint. This means if you are restoring a checkpoint this is just like restoring a system from a backup. For the user everything works as before and there is no difference in how you have to take the checkpoint. Production Checkpoints are enabled by default, but you can change back to the old behavior if you need to. But still using Checkpoints brings some other challenges, like the growing .avhdx file, which still apply. Edited September 15, 2015 by Arthur 1
edutech4schools Posted September 16, 2015 Author Posted September 16, 2015 @Arthur Thanks for taking the time to find that information. I do wonder how many do not realize it's possible to bork an SQL database simply by taking a snapshot or checkpoint.
edutech4schools Posted September 16, 2015 Author Posted September 16, 2015 Just out of interest is it still a no no to snapshot/checkpoint a DC?
Arthur Posted September 16, 2015 Posted September 16, 2015 (edited) Just out of interest is it still a no no to snapshot/checkpoint a DC? According to MS, that's fine as long as the host and guest are both on Server 2012 or newer. I haven't tried it myself though. https://msdn.microsoft.com/en-us/library/jj643357(v=vs.85).aspx http://blogs.technet.com/b/askpfeplat/archive/2012/10/01/virtual-domain-controller-cloning-in-windows-server-2012.aspx Edited September 16, 2015 by Arthur
bossman Posted September 16, 2015 Posted September 16, 2015 I always used to take a snapshot in Xenserver of the Sims before an upgrade, I made sure no-one was able to access while I was doing this so there was no data changes to the SQL database, only once did I ever have to revert back to the snapshot after and upgrade and it was fine. As has been mentioned it is not a good thing to snapshot whilst users are able to change the data as you lose all the new data which has been entered for that period of time from the snapshot to the time you revert back. Common sense really
edutech4schools Posted September 16, 2015 Author Posted September 16, 2015 I have read numerous posts where admins shut down the SQL server and then take a snapshot, power it back up, run Windows update or whatever, reboot, shutdown and then delete / re merge snapshot. This all sounds sensible it's just I don't have the nerve to do it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now