none
Regarding Restoring a site using a stsadm in wss3.0

    Question

  • here is my issue, i am trying to do a restore a site from a folder in c: drive using stsadm. when i type the command and hit enter it says access denied to C:drive?

    does any body had similar kind of problem? please share your thoughts and experience?

    Yeah, I did run cmd as adminsitrator?

    Friday, April 23, 2010 2:46 AM

Answers

  • Here's the complete rundown on the permissions needed to run STSADM's Backup and Restore operations:

    Although Microsoft states that the user must be a local administrator on the SharePoint server to execute STSADM.exe, in actuality elevated rights are required to successfully complete many operations with the tool, including the backup and restore operations. For the backup and restore operations, the account logged into the Windows Command Shell to run STSADM.exe must be an owner of the SharePoint databases impacted by the operation.(The account should be granted the db_owner role in SQL Server.) I've found that you'll have the best results if you run STSADM.exe as the SharePoint database access service account when performing backup and restore operations.

    The account you are using to execute STSADM.exe must also have the right to read from the directory used as the target storage location for the backup files that will be created, as well as to write and update files in the directory. Depending on your SharePoint farm’s configuration, the directory you use as the target storage location can be mapped via a file system path such as C:\backups or a UNC path such as \\backups.

    One other note...I know that for backups if you're using a local drive as a storage location, you must be running SharePoint and your SQL Server database on the same server, otherwise you're forced to use a UNC path. This may also hold true for restore operations, but I'm not sure. Does your target environment have SharePoint and SQL on the same server? If so, you may try mapping the backup file from a UNC path and see if that works.

    Also, can you check the log file from your failed restore operation to see if there is any better error messages or context around what the tool was trying to do when it errored out? If you can find anything there or in SharePoint's other log files it may be helpful to troubleshoot your problem.

    John


    MCTS: WSS v3, MOSS 2007, and SCOM 2007

    Now Available on Amazon - The SharePoint 2007 Disaster Recovery Guide.
    • Marked as answer by SPKID2 Friday, April 23, 2010 4:19 AM
    Friday, April 23, 2010 3:46 AM

All replies

  • Yes, you need to be an admin on the box in order to run the command.

    http://technet.microsoft.com/en-us/library/cc261956.aspx says:

    "Microsoft Office SharePoint Server 2007 includes the Stsadm tool for command-line administration of Office SharePoint Server 2007 servers and sites. Stsadm is located at the following path on the drive where SharePoint Products and Technologies is installed: %COMMONPROGRAMFILES%\microsoft shared\web server extensions\12\bin. You must be an administrator on the local computer to use Stsadm.

    Stsadm provides a method for performing the Office SharePoint Server 2007 administration tasks at the command line or by using batch files or scripts. Stsadm provides access to operations not available by using the Central Administration site, such as changing the administration port. The command-line tool has a more streamlined interface than Central Administration, and it allows you to perform the same tasks. There are certain operations and certain parameters that are only available by using the Stsadm command-line tool."


    I LOVE MS..... Thanks and Regards, Kshitiz (Posting is provided "AS IS" with no warranties, and confers no rights.)
    Friday, April 23, 2010 2:53 AM
  • i can do all operations using stsadm, like add solutions etc but , why iam unable to restore site using a stsadm?

    due to this issue i am not able to play with stsadm , and i am not loving sharepoin wholeheartedly.

     

    please give ur thoughts.

     

    Friday, April 23, 2010 3:00 AM
  • Here's the complete rundown on the permissions needed to run STSADM's Backup and Restore operations:

    Although Microsoft states that the user must be a local administrator on the SharePoint server to execute STSADM.exe, in actuality elevated rights are required to successfully complete many operations with the tool, including the backup and restore operations. For the backup and restore operations, the account logged into the Windows Command Shell to run STSADM.exe must be an owner of the SharePoint databases impacted by the operation.(The account should be granted the db_owner role in SQL Server.) I've found that you'll have the best results if you run STSADM.exe as the SharePoint database access service account when performing backup and restore operations.

    The account you are using to execute STSADM.exe must also have the right to read from the directory used as the target storage location for the backup files that will be created, as well as to write and update files in the directory. Depending on your SharePoint farm’s configuration, the directory you use as the target storage location can be mapped via a file system path such as C:\backups or a UNC path such as \\backups.

    One other note...I know that for backups if you're using a local drive as a storage location, you must be running SharePoint and your SQL Server database on the same server, otherwise you're forced to use a UNC path. This may also hold true for restore operations, but I'm not sure. Does your target environment have SharePoint and SQL on the same server? If so, you may try mapping the backup file from a UNC path and see if that works.

    Also, can you check the log file from your failed restore operation to see if there is any better error messages or context around what the tool was trying to do when it errored out? If you can find anything there or in SharePoint's other log files it may be helpful to troubleshoot your problem.

    John


    MCTS: WSS v3, MOSS 2007, and SCOM 2007

    Now Available on Amazon - The SharePoint 2007 Disaster Recovery Guide.
    • Marked as answer by SPKID2 Friday, April 23, 2010 4:19 AM
    Friday, April 23, 2010 3:46 AM
  • Well, I believe, you need to use a farm admin account to run Restore operation. You may login to the box using the farm admin credentials or use "RUN AS" on the command prompt and run as Farm admin. incase of subsite, i believe a site collection admin can perform the restore.


    I LOVE MS..... Thanks and Regards, Kshitiz (Posting is provided "AS IS" with no warranties, and confers no rights.)
    Friday, April 23, 2010 3:48 AM
  • yes we have sql and sharepoint on the same server.

    regarding the log file , i will check and let you know. and also i will try restore from UNC path.

    thanks for ur insight on sharepoint , it did helped my knowledge to no more about sharepoint and settings.

     

    Thanks John!

    Friday, April 23, 2010 4:19 AM