locked
import two .Dat file in import command RRS feed

  • Question

  • Hi,

    I export subsite with stsadm command like this:

    stsadm.exe -o export -url http://ServerName:4040/sites/management/office -filename E:\sharepoint\SharepointBKP\backup.dat -overwrite

    but it’s create 2 .Dat file ,backup.Dat and backup1.Dat in my backup folder.

    now how I can import these 2 .Dat file with import command? I mean how I can give 2 Dat file to –filename in import command?

    I’m very appreciated if anyone can help me.

    thanx

    Sunday, January 9, 2011 5:03 AM

Answers

  • Execute like this .Error is related to the Backslash in the file path.Whenever you give a parameter with slashes make sure it is within double Quotes "" because slashes considered as escape character .  

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>stsadm.exe -o import -url "http://ServerName/sites/management/school" -filename "E:\sharepoint\sharepointBKP\backup.dat"

    • Marked as answer by Emir Liu Thursday, January 20, 2011 7:05 AM
    Sunday, January 9, 2011 5:42 PM

All replies

  • Whatever the name you gave in export command ,give the same name in your import command.Usually command will create more than one file.No need to worry it knows how to read.Make sure you copy all the files to destination server where you execute the import command.

    Export

    stsadm.exe -o export -url http://ServerName:4040/sites/management/office -filename E:\sharepoint\SharepointBKP\backup.dat -overwrite

    Import

    stsadm.exe -o import -url http://TargetSite  -filename E:\sharepoint\SharepointBKP\backup.dat

    Sunday, January 9, 2011 6:24 AM
  • Thanx shyjumohan

    I use this command for import:

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>stsadm.exe -o import -url http://ServerName/sites/management/school -filename E:\sharepoint\sharepointBKP\backup.dat

    But “Command line error.” Appears and I cant import my file,

    Why this error happen?

    How I can import my file correctly?

    Sunday, January 9, 2011 7:55 AM
  • You will get this error if the system does not recognize the syntax. It is not be related to your backup files.

    I have seen this happening when there is a character encoding mismatch. Try typing the whole command instead of copy paste. Also put the url and filename within double quotes.

    Hope this helps.

    Thanks,
    Dip

    Sunday, January 9, 2011 5:19 PM
  • Execute like this .Error is related to the Backslash in the file path.Whenever you give a parameter with slashes make sure it is within double Quotes "" because slashes considered as escape character .  

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>stsadm.exe -o import -url "http://ServerName/sites/management/school" -filename "E:\sharepoint\sharepointBKP\backup.dat"

    • Marked as answer by Emir Liu Thursday, January 20, 2011 7:05 AM
    Sunday, January 9, 2011 5:42 PM