Saturday, January 10, 2009

Let's Talk about .. MOSS2007-Backup & Restore Site Collection

The best practical way to backup and restore site collection is using the command line. We use stsadm command for both backup and restore. To backup the site collection into .dat file, we use stsadm.exe -o backup -url [your Site Collection url] -filename [Backup filename with location url] For example,


[cmd]

"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN\"stsadm.exe -o backup -url http://NATTServer/sites/NattSite -filename f:\backup\nattsite.dat



And we use stsadm.exe -o restore -url [your Site Collection url] -filename [Backup filename with location] For example,


[cmd]
"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN\"stsadm.exe -o restore -url
http://NATTServer/sites/NattSite -filename F:\backup\nattsite.dat


Note: we can backup site collection from one server to restore it at another site collection.
Moreover, we can add -overwrite to both -backup and -restore command, however, it's not recommended to overwrite the site collection when you restore it since some incorrect things may occur. It's the suggestion from P'Chatree from Microsoft. Thus, you should delete site collection before restoring the site collection.


The instruction to delete site collection


-Enter Central Administration

-Click Application Management tab

-Click SharePoint Site Management->Delete site collection
-Click at No selection

-Click Change Site Collection
-Select the site collection you wanna delete

-Click OK button

-Click Delete button

-Click OK button to confirm to delete

No comments: