dimanche 31 mai 2009

MOSS 2007 / WSS v.3 - About PowerShell

WSS v3 Backup retention script

After setting up STSADM.exe to backup my WSS v.3 sites the backup directory did grow daily.

I could not find any way to set some sort of retention on these backups, and got tired of deleting the backups and adjusting the spbrtoc.xml manually. So I wrote my own script.

As a real PowerShell addict this problem had to be solved with PowerShell. Here's the script.

Lire aussi / read also


Powershell SharePoint 2007 Backup Script

I’m still not bought on the whole Powershell and SharePoint idea but I’m getting there.  I found this example script that cleans up the old backup files and then performs a full farm backup of MOSS.

When performing backups of SharePoint using Central Administration or STSADM, backup files are created in a specified UNC path.  If you don’t keep an eye on this location and delete/archive old backups this can grow out of control.  Cleaning up backup files isn’t straightforward either, it involes manually editing the spbrtoc.xml file in the backup location and then deleting the backup folders that relate to the backups you removed from the XML file. 

This is where Powershell adds value.

MOSS 2007 / WSS v.3 - About PowerShell

Aucun commentaire: