Wednesday, October 20, 2010

STSADM Export vs. Limited Harddrive Space

I came across a situation at work where I had to run the stsadm -o export command to backup my development SharePoint sites. My restore options were limited because I was only allowed to access Central Administration on my development SharePoint server, but NOT on the Production servers. I was also unable to remote to the Production SharePoint server, nor did I have the ability to schedule a Content Deployment job from Central Admin.

My task was to backup all my sites on my development server and then restore them into production. Because of my limitations to the production environment, this is what i had decided to do:
1. Remote to my development servers and run stsadm -o export to backup my sites.2. Using SharePoint Designer, restore my backup files to production.
If this wasn’t complicated enough (time consuming, rather), I was running out of space on my development server. Running stsadm -o export produces temporary files that will eventually become your .CMP backup files. However, since my sites were large and had many versions of documents, the limited space was prohibiting me from finishing my backups. I had no choice but to kill the backup job until I found a solution, which i did.
This will only work if you have more than one partition on your SharePoint server, and luckily for me, I did.
My C drive only had 3.19gig of available space, but I had a D drive with 39gig of available space.
The STSADM Export command stores temporary files into your TEMP (or TMP) directory as defined in your Environment Variables. You can find our where these temp directories are by right clicking on “My Computer” and selecting “Properties”, then choose the “Advanced” tab. Finally, click the “Environment Variables” button at the bottom of the dialog box.
In the top window (User variables for username), you will see the “TEMP” and “TMP” variables. The default value for these are “%USERPROFILE%Local Settings\Temp”.
I created a new “TEMP” directory on my D drive (since it had a lot of extra space) and modified both my “TEMP” and “TMP” user variables to point to this new location. After logging off and back on again, i was able to rerun the stsadm -o export command to backup my entire site and all subsites without running into problems of not having enough space.
I hope this helps.
(PS. I am not responsible for your actions to my posts. These steps worked for me in my own testing environment.)

No comments: