Article ID: 941330 - Last Review: June 16, 2008 - Revision: 2.2 How to automate the deletion of backups in SharePoint Server 2007 and in Windows SharePoint Services 3.0 by using a Visual Basic scriptINTRODUCTIONThis article describes how to automate the deletion of
backups in Microsoft Office SharePoint Server 2007 and in Windows SharePoint
Services 3.0 by using a Microsoft Visual Basic script. This article contains an
example Visual Basic script that deletes backups that are more than a certain
number of days old. MORE INFORMATIONBackups should have a configurable retention policy.
Examples of retention policies are as follows:
Note You must have sufficient permissions to perform this procedure. Typically, deleting backups should be performed by a member of the Local Administrator group on the computer that contains the shared folder for the backups. In any case, the person who runs the script must have Read permissions, Write permissions, and Delete permissions to the shared folder for the backups and to the backup files that are to be deleted. Warning Use of the code in this article is at your own risk. Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites: Microsoft Certified Partners - https://partner.microsoft.com/global/30000104 (https://partner.microsoft.com/global/30000104) Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice (http://support.microsoft.com/gp/advisoryservice) For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms) If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, visit the following Microsoft Web site: https://partner.microsoft.com/40011340
(https://partner.microsoft.com/40011340)
For more information about the support options that are available
and about how to contact Microsoft, visit the following Microsoft Web site: http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
(http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
Sample scriptThe following example Visual Basic script automates the deletion of backups. In this script, backups that are more than a certain number of days old are deleted.REFERENCESFor more information about how to back up data and how to
restore data by using the Microsoft SharePoint Central Administration Web site,
visit the following Microsoft Web site: http://technet2.microsoft.com/windowsserver/WSS/en/library/64171b8c-5608-4e69-881a-67996080b7ff1033.mspx
(http://technet2.microsoft.com/windowsserver/WSS/en/library/64171b8c-5608-4e69-881a-67996080b7ff1033.mspx)
| Article Translations
|
Back to the top
