Tuesday, November 4, 2008

When STSADM Export runs out of space

A little while back I had a client that called about a script we had created to automate SharePoint site backups. The script was written in PowerShell and basically went through the entire site and exported each site to a directory and then moved onto each subsite of that site. Once all of the sites were exported, it zipped all the files up and created one ZIP file.


The client was calling because the backups seemed to be sporadic in size. One dat the backup file would be 14GB and then the next it would be 35GB and then it would be 8GB. I knew that the script was not doing anything special so I looked into the client's server and found that there was only about 100MB of free space on their hard drive. It then made sense to me that the size of the files was so sporadic. What was happening is that there would be enough space on the drive to complete the first day's backup. Since the script was keeping 7 days of files, when it got to the next day it could complete that backup. But by the 6th or 7th day there was not enough space on the drive so it would back up what it could until it ran out of space and then fail. The next day the script would run and delete one of the large backup files and there would once again be enough space to backup completely. This would continue on.


I told the client that they would need more disk space as they were running out and that is why the files were different sizes. I just heard back from the client the other day and they said that the files were now the same size.


The reason I knew that the script was bombing out and just finishing was that I tried manually doing an export of a fairly large site and the export failed when disk space ran out but still created a file that just didn't include the entire site. Once you know that you would see why there were no errors anyplace to indicate a problem.

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home