I have backup my site collection found on the root. then i wanted to resote it on a different location, so i did the following steps:-
1.using the central administration , i delete the site collection.
2.then i run the following powershell command , where i got the siteid for the deleted site collection
3.i run this powershell command:-
Remove-SPDeletedSite <the above site id>
4.after that i tried restoring the site collection as follow:-
PS C:\Users\spfarm.srv> Restore-spsite -identity http://servername/KB/PMO -Path C:\Newfolder\0112.bak
but i got this exception:-
Restore-spsite : No content databases are available for this operation but the site collection is scheduled for deletion in at least one content database. Either wait for the deletion operation to complete or create a content database, and then try the operation again. To create a content database, click "Content databases" on the Application Management page, select the Web application to use, and then click "Add a content database". At line:1 char:1 + Restore-spsite -identity http://servername/KB/PMO -Path C:\Newfo ...
another appraoch i created a new site collection on the same url, then i use the -force command as follow:-
PS C:\Users\spfarm.srv> Restore-spsite -identity http://servername/KB/PMO -Path C:\Newfolder\0112.bak -force
but i got the same exception. so can anyone adivce on this please ?
now i manually run the "gradual site delete" job, then i try restoring the site collection , but this time i got this error:-
Restore-spsite : <nativehr>0x80070003</nativehr><nativestack></nativestack> At line:1 char:1 + CategoryInfo : InvalidData: (Microsoft.Share...dletRestoreSite: SPCmdletRestoreSite) [Restore-SPSite], DirectoryNotFoundException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreS ite