$spSite= Get-SPSite $site$web = $spSite.OpenWeb()$files = $web.RecycleBin | ?{$_.Title -match “tst”}foreach ($file in $files){Write-Host “Found $($file.Title)”$web.RecycleBin.Restore($file.ID)Write-Host “Restored $($file.Title)”}
SharePoint Kings,Technosavvy guys hunting SharePoint Challenges... SharePoint 2013, SharePoint 2010, MOSS 2007, Windows Workflow Foundation, Project Server and Other Related Technologies.
Friday, July 12, 2013
Search From Recycle bin
Saturday, February 20, 2010
Backup and Restore SharePoint site collection from one Farm to another Farm using STSADM commands
Source Server:
Server Name: ABC
Site Collection URL: http://abc.com
Site Owner: ABC/administrator
Take backup using following command:
STSADM.EXE –o backup –URL http://abc.com -filename “backup_abc.bak” –overwrite
Help URL for backup: http://technet.microsoft.com/en-us/library/cc263441.aspx
Now to restore it to destination SharePoint farm
Destination Server:
Server Name: XYZ
Site Collection URL: http://xyz.com
Site Owner: XYZ/administrator
Create blank Web Application from Central Administration
Now restore using STSADM command
STSADM.EXE –o restore –URL http://xyz.com -filename “backup_abc.bak” –restoremethod New –newdatabaseserver “DATABASE_SERVER_NAME”
Change the site collection owner of this newly restored site
More details for restore is here
http://technet.microsoft.com/en-us/library/cc262087.aspx
Hope this will help you, let us know your comments on it
SharePointKings Team.
Thursday, October 2, 2008
Backup and Restore Site Collection in MOSS
Here are the stsadm commands that will be useful to backup and restore site collections in MOSS.
Backup Site Collection
First go to command prompt and set the following path:
c:\program files\common files\microsoft shared\web server extensions\12\bin
This is the folder in which the stsadm.exe is present.
After setting this path write the following command:
stsadm -o backup -url http://servername:portnumber/sitecollectionName -filename pathofDestinationFolder/NameofBackupFile
You will need proper rights on the content db to take backup
Restore Site Collection
Set the path as shown in the above example.
After setting the path the process is:
I am taking an example of restoring collaboration portal. Before executing the restore command create a web application and create a site collection with collaboration portal as site template. Here is the command:
stsadm -o restore -url http://servername:portnumber/sitecollectionName -filename pathOfBackupFile -overwrite
writing -overwrite is mandatory else it will give error.
Again you will need proper rights on the content db to execute restore command.
Happy Administering!!
Saturday, September 13, 2008
Backup Restore in Server Farm (Recover disaster in MOSS)
This post will help you when your SharePoint Central administrator site has got disappeared suddenly from IIS / not opening or corrupted yet all rest of the sites are working well.
Following solution will also let you know, how to take farm backup in SharePoint Server farm?
Ok guys then you need to follow the following steps to get it back.
First take full backup of your farm.
To take a backup of your farm when you have suppose two SharePoint Servers and One database server
1. Server A at 192.168.1.1 IP
2. Server B at 192.168.1.2 IP
3. Database Server C at 192.168.1.3 IP
So create one folder at Server B (192.168.1.2) C:\Backup name it “Backup” right click it and Share this folder and give rights to “Every one user”.
stsadm –o backup –directory
Fire command stsadm –o backup –directory file://192.168.1.2/c$/backup -backupmethod “full”
Here, we are taking backup for our safety so that we can recover if any thing wrong happen.
Ok, good after taking backup take a backup of your all virtual directories because next step is to run SharePoint configuration wizard so it may replace your web.config in virtual directories so it is safe to take backup of virtual directories.
Now run SharePoint configuration wizard on any server. Select use existing server farm and select the same configuration database let wizard finish all steps.
Cheers, hope it will work for you.
For more information write us at sharpointkings@gmail.com
Let us know your feedback through comments or mail us if this solution works for you it will encourage us to write more articles.
Friday, June 13, 2008
Backup and Restore Problem
Hi,
here is a case when you want to restore WSS 3.0 site with Content database in SQL Server 2000 to wss 3.0 with Default Embadded Edition Microsoft##SSEE.
I have server "A" (Old server) where WSS 3.0 are installed. I have 2 sites created in WSS 3.0 and I have SQL Server 2000 on server "A".
Now I want to restore these four site on new server called "B" where WSS 3.0 installed with Default Microsoft##SSEE Sql instance.
so what should I do which is better and effective way to do this?
as there are two over load of backup from stsadm command in wss 3.0 which should I use.
1.Stsadm.exe -o backup -url http://a/ -filename "c:\backup\a_80.bak"
2.stsadm.exe -o backuo -backupmethod "full" -directoryname "c:\backup"
which one should I use?.
using second method of backup while restore on new server "B" I am getting error [SPManager] [ERROR] [6/9/2008 8:40:11 AM]: The signature of the public key is invalid.
Signing object:[dbo].[AllDocs]
[SPManager] [ERROR] [6/9/2008 8:40:11 AM]: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
while restoring WebApplication is successfully created but in second phase when it trying to attach contentdb with this webapplication it fires an error that remote connection is not enabled because its Microsoft##SSEE instance.
Solution is take backup from first method.. i.e.
1.Stsadm.exe -o backup -url http://a/ -filename "c:\backup\a_80.bak"
and restore it..
Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!
If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com



