How to “Refresh” a Development SharePoint 2010 Server.

As with any development environment, it’s best to work with a product that is as close to live as possible. In SharePoint, it’s no different. You want to development on a system as close to the same as production as you can, so it’s necessary to “refresh” your development system as often as possible. There may be better ways to do this (SQL Mirroring) but this works quite well for myself. Please feel free to add your opinion and let me know if there’s a better way of accomplishing this.

Goal:

To “refresh” a Development SharePoint server with a backup from the Production SharePoint 2010 Site

Prerequisites:

This guide assumes you have the following prerequisites:

    • You have already deployed a Development Server and it is up and running, most likely with out of date content. This guide does not cover creating a Development Server, but here is a guide on how to do so.
    • Both installs (Development and Production servers) are running the same version of SharePoint. To see the version number your SharePoint system is on, use the following

       

       

      This process will not work if they are not on the exact same version.

    • I have been told that it’s not a great idea to use snapshots when dealing with a virtualized SharePoint environment. Do what you can to make sure your data is backed up, but be weary of a snapshot as your only form of backup. See here for more info You have made a snapshot or backup of both SharePoint Servers and their related SQL servers. If you’re running a virtualized environment, this should be fairly straight forward. Create a snapshot of each server in case something goes wrong. If you’re running a hardware setup, be sure to backup your system to an image file or use whatever your preferred backup software in case something doesn’t work out correctly.
    • Any deployed “Farm Solutions” (WSPs) must be deployed on both systems. This process of backup and restore do not effect the Central Administration sites of either machine. Farm Solutions must be deployed manually on both machines or you risk breaking the site.
    • You will need your Development Server SQL instance and database names. In my environment, I run a two-server farm for the production site and a single-server farm for the development system. This is fine, but you will need to know the instance name and database name of your SQL system in order for the backup to point to the proper database during the restore process.
    • You will need to be able to log in with a user who has permission to write to the SQL server on the Development System. The restore writes data to the SQL server hosting the Development Site, so it makes sense that you will need admin access to it.

 

The Backup:

  1. Log in to the production server that hosts your live SharePoint site
  2. Open up SharePoint 2010 Management Shell (Powershell, but it’s important to use the SharePoint Powershell that is installed with SharePoint)
  3. We will be using the Backup-SPSite command with your own parameters. I’ll show you what I used and but you will want to customize it with your own environment.The code below shows most of the parameters for the Backup-SPSite command. I’ll explain what they do and then show you my example for my environment.

     

      • The -Force parameter simply allows you to overwrite an existing backup if found.
      • The -NoSiteLock parameter prevents the site from going into “Read Only” mode while backing the system up if there are users actively working on the site while you are creating this backup.
      • The -UseSqlSnapshot parameter specifies a SQL Database Snapshot will be created when the backup begins, and all site collection data will be retrieved directly from the database snapshot. This snapshot will be deleted automatically when the backup completes. The UseSqlSnapshot parameter is recommended if the database server hosting your content database supports database snapshots such as SQL Server Enterprise Edition and SQL Server Developer Edition. This is because it will ensure a valid backup while allowing users to continue reading and writing to the site collection during the backup. It is not necessary to specify the NoSiteLock parameter when specifying the UseSqlSnapshot parameter.

    Here’s what I used:

     

    As you can see, it saved it in the spot that I told it to and that it’s not a huge file as our SharePoint site isn’t huge.

The Refresh:

Now that you have your file backed up, you can move it over to your Dev machine or just point to it if you have it set up on a network location.

  1. Our options using the Restore-SPSite PowerShell command to restore are shown below.

     

    Here is the breakdown of what each parameter does:

      • -DatabaseServer: This is the name of the computer where you are hosting the MSSQL Database. For me it’s the name of the local machine I’m working on because my Dev Server hosts its own MSSQL Database so I will be using sptest\DevSQL.
      • -DatabaseName: This is the name of the database itself. In my case, my Database name is the standard WSS_Content.
      • -Force: Will force the backup to overwrite an existing SPSite. I will be using this parameter because I need it to overwrite my current testing environment.
      • -GradualDelete: Specifies that the site collection being overwritten with the -Force parameter should be gradually deleted over time by a timer job instead of all at once, which reduces its impact on SharePoint 2010 Products and SQL Server performance. This option is recommended for large site collections.

     

  2. Ok, now that we know our restore options, you can see my a screenshot of what I typed into SharePoint Management Shell.
  3. It will then ask you if you are sure you want to perform this action. I select the default of Yes and let it run. When it finishes you should have your test site updated.

Last Thoughts:

I did have an issue the first time I refreshed my development server. For some reason the User Profiles service was not started. To fix it, I had to stop and then re-start the service. I haven’t had this happen since, but I figured it would be worth mentioning. Let me know if you have a better way of performing this!

Additional Resources/Credits:

Coming Soon!

In the near (hopefully) future I should have some posts involving:

  • Java programming
  • How to install power locks on a Jeep Wrangler 4-door AND a working security system
  • My review of Google Android App Inventor
  • My top 5 Android Apps

Be sure to check back soon!

Fixing a Nano 4th Generation Click Wheel — Nano 4th Generation Disassembly

UPDATE: I did not fix this particular Nano.  It seems that the problem was caused by a fairly common occurrence; a flaw in docking stations/the Nano itself.  Apparently a lot of people have reported that their 4th Generation Nano clickwheels become unresponsive after constant docking/undocking.  I believe the problem is related to the USB Connector rubbing against the clickwheel ribbon cable.  I will show it below in hopes that someone may find a solution.  I was unable to fix the device at this time.


I received this Nano with the clickwheel all sorts of unresponsive.  The hold button was the only thing that would make the screen light up.  I could reset the device using the Menu button and Select button, but once the device restarted it again failed to respond.  I did a little research and it seems like this is a fairly common problem with these Nanos.  I set out to fix it and record my journey in hopes of helping steer others clear of damage.


Getting Started:

First off you’ll want the right tools.

  1. Small screwdriver set.  You’ll need a VERY small Philips head.  A flathead was also helpful.
  2. Some sort of prying tool.  I used a small flathead, but as anyone who has ever done this kind of prying knows, it’s very easy to scratch or harm the surface of what you’re working with.  I recommend this: Metal Opening Tool.  If you’re the kind of person who does any kind of prying, this will save you a lot of heartache.
  3. (Optional) Ziplock bag or something to keep all the parts together.

The first thing you will want to do is pry open the top bezel. You can do this with a small screwdriver or the prying tool. BE CAREFUL. It is very easy to damage the case of the Nano. If you aren’t too worried about aesthetics and just want the bugger to work, then bumble away like I usually do.  When you remove the bezel, be sure to remove the Hold Switch and set it aside for now.  There is some sticky material that is used to keep the bezel in place.  Just ignore this for now and remove it if it gets in your way when unscrewing. Once the bezel is removed, it should look like this (screws have been marked with red):

The Bez

Step Two:

Do the same thing and remove the bezel on the bottom.

Step Three:

Screws highlighted.

Remove the screws.  Check the pictures above for screw locations.  There should be 5 screws once you’ve removed them.

Step Four:

Remove the bottom dock frame.

Step Five:

Using a small screwdriver or opening tool, start sliding the LCD out of the case.  Do not force it out or slide it too far at this time. Some ribbon cables need to be removed before you slide the whole piece out.

Step Six:

Turn the Nano so that the “back” is facing you.  You should see the Hold Switch.  Be careful here. When I first tried to pry off the hold switch I sent the little red plastic switch part flying.  make sure you pop off the ribbon part (orange) under the switch.  This will free up the top part of the “guts” so that we can slide the internals out of the case. [singlepic id=6 w=320 h=240 float=center]

Step Seven:

Slide the LCD out enough so that you can see the ribbon cable (this is what connects to the click wheel).  We are now going to press firmly on the glass to pop it out of the case.  This was a little tough for me.  I recommend pressing downwards so that the bottom part of the glass goes into case a little.  I had to use my small screwdriver to wedge in between the glass and the frame. [singlepic id=7 w=320 h=240 float=center]

Step Eight:

Once you have the glass off you should have access to another ribbon cable.  Make sure you flip up the black ribbon lock (highlighted in red below) before pulling out the ribbon. Slide out the ribbon connector.  This should free up the LCD. [singlepic id=8 w=320 h=240 float=center]

Step Nine:

Slide out the LCD part of the Nano.  After releasing the ribbons it should come right out.  You’ll have a Nano with the battery left. [singlepic id=9 w=320 h=240 float=center]

Step Ten:

You will need to take a flat tool (I used the small flathead screwdriver) to un-stick the battery off the back of the case.  After removing all the stickiness, the internals should slide out the bottom.  You may have to help things by guiding through the spot that used to have the LCD.  We still have one more ribbon wire to disconnect before you slide it all the way out. [nggallery id=2 float=center]

Step Eleven:

Unlock the ribbon cable and slide it out shown below.  This should allow you to slide the internals out from the bottom.  That particular ribbon cable is the click wheel cable. Be careful here. These ribbons are very delicate.

[singlepic id=14 w=320 h=240 float=center]

Step Twelve:

After disconnecting the ribbon cable, the logic board should slide out.  You may need to help it down by pushing the battery.  Once removed, you should have a pretty little logic board in your hands.

Note: I’ve highlighted the culprit area that the docking station seems to “rub.”

[singlepic id=15 w=320 h=240 float=center]

If you have anything you would like to add to this post, please feel free.  I would love to get a discussion going about possible fixes for this issue.  I did purchase an “as is” 4th Generation logic board from ebay for $6.  I’m hoping the new logic board was just having batter issues, and my next step is to attempt to combine the two logic boards into 1 working Nano.  I don’t know if there’s any hope, but I will try my best to get this puppy working.  Good luck!