Error given path's format is not supported

Apr 10, 2009 at 6:57 PM
Hi,

I have created a spbackup.xml as follows:

<?xml version="1.0" ?>
<confSPBackup>
   <site id="1">
 <catastrophicbackup>0</catastrophicbackup>
 <catastrophicmethod>full</catastrophicmethod>
 <sitecollectionbackup>1</sitecollectionbackup>
 <sitecollectionurl>http://my-moss-server:13970</sitecollectionurl>
 <hivebackup>1</hivebackup>
 <hive>C:\Program Files\Common Files\Microsoft Shared\web server extensions\12</hive>
 <iisbackup>1</iisbackup>
 <iisencryptopassword>13970</iisencryptopassword>  
 <smtpserver></smtpserver>
 <fromemail></fromemail>
 <toemail></toemail>
 <backupdestination>\\my-moss-server\spbackup-sitecollection</backupdestination>
 <backupdestinationmaxkeepdays>14</backupdestinationmaxkeepdays>
   </site>
</confSPBackup>
===================================================
I'm getting following error when I run the spbackup.ps1 script


Test-Path : The given path's format is not supported.
At C:\Tools\spbackup1.2\spbackup.ps1:67 char:21
+  if (-not (test-path  <<<< $path))
Set-Content : The given path's format is not supported.
At C:\Tools\spbackup1.2\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
Set-Content : The given path's format is not supported.
At C:\Tools\spbackup1.2\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
Set-Content : The given path's format is not supported.
At C:\Tools\spbackup1.2\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
You cannot call a method on a null-valued expression.
At C:\Tools\spbackup1.2\spbackup.ps1:73 char:37
+  $files | foreach {$zipfile.CopyHere( <<<< $_.fullname) }
Access to the path '\\my-moss-server\spbackup-sitecollection\log.txt' is denied.
At C:\Tools\spbackup1.2\spbackup.ps1:161 char:120
+     [DateTime]::Now.ToString() +  ": Hive backup Done! File name is $backupdestination\$backupfilename-12hive$guid.zi
p" >>  <<<< "$backupdestination\log.txt"

Invalid backup name.
Test-Path : The given path's format is not supported.
At C:\Tools\spbackup1.2\spbackup.ps1:67 char:21
+  if (-not (test-path  <<<< $path))
Set-Content : The given path's format is not supported.
At C:\Tools\spbackup1.2\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
Set-Content : The given path's format is not supported.
At C:\Tools\spbackup1.2\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
Set-Content : The given path's format is not supported.
At C:\Tools\spbackup1.2\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
Access to the path '\\my-moss-server\spbackup-sitecollection\log.txt' is denied.
At C:\Tools\spbackup1.2\spbackup.ps1:206 char:133
+     [DateTime]::Now.ToString() +  ": IIS Metadata backup Done! File name is $backupdestination\$backupfilename-IISMet
adata$guid.zip" >>  <<<< "$backupdestination\log.txt"


whats the problem here?

Thanks,
San

May 19, 2009 at 1:39 PM

i know that this is an old discussion, but i have the same issue and there was never a response. if anyone is out there and can give a respose, that would be wonderful. i am using the latest version that is posted. 1.2 Please help.

May 19, 2009 at 6:16 PM

Hi MSPrad,

No it never worked for me and I gave up... I expect atleaset a small user guide with "how-to-use"...but its never there... I have had lot of issues with these codeplex tools ....anyway if u get any solution thenpls post it here..

Good luck

 

 

Oct 13, 2009 at 8:34 AM

Hi !

It's because of your port number in the site collection adress when using a site collection method.
The script gets the full adress of the site collection except the "http://" which is replaced by nothing.
And when you've got a port number different than 80, you must input it (eg : http://intranet:81). And th escript try to name the backup file with the ":" character, which is forbidden by system. This is why the script fails.
To workaround this : open the ps1 script (v 1.2), find the line : $backupfilename = $sitecollectionurl.replace("http://","")
And just under, put this line : $backupfilename = $backupfilename.replace(":","")

retry. All should be OK now.

Oct 21, 2009 at 1:36 PM

Thanks so much pioumamala. That fix worked for me. Now that our orginization has this script that works, how would i use these files for a restore? Does anyone know how to perform a restore? i noticed that there was another discussion for restores, but there wasn't ever anything posted. i will also add another post in that discussion. Hopefully someone will give us some direction on how to do that because even if you have a backup, if you dont know how to do a restore, it serves no purpose. Once again, thanks for your help

 

msprad 

Dec 5, 2012 at 9:56 AM

Dear All,
I copied the both files SPBackup.ps1 and SPBackup.xml in  C:\SPBackup directory. when i  execute the script SPBackup.ps1 i m getting the following error

need parameter Configurationfile <e.g. "C:\SPbackup\SPbackup.xml">
At C:\SPbackup\spbackup.ps1:16 char:41
+ [string]$Configurationfile = " $(throw <<<< "need parameter Configurationfile (e.g. ""c:\SpBack\SPBackup.xml"")")
)
 +Categoryinfo : OperationStopped: < need paramter ...\SPBackup.xml"> [],RuntimeException
 +FullyQualifiedErrorID : need parameter Configurationfile < e.g. "C:\SPBackup\SPBackup.xml">

spbackup.XML FILE
<?xml version="1.0" ?>
<confSPBackup>
   <site id="1"> ( No idea about this )
    <catastrophicbackup>1</catastrophicbackup>
    <catastrophicmethod>full</catastrophicmethod>
    <sitecollectionbackup>0</sitecollectionbackup>
    <sitecollectionurl></sitecollectionurl>
    <hivebackup>1</hivebackup>
    <hive>C:\Program Files\Common Files\Microsoft Shared\web server extensions\12</hive>
    <iisbackup>1</iisbackup>
    <iisencryptopassword>MetaBackupPass1</iisencryptopassword>  
    <smtpserver>webmail.xyz.com</smtpserver>
    <fromemail>r.sahibzada@xyz.com</fromemail>
    <toemail>r.sahibzada@xyz.com</toemail>
    <backupdestination>\\10.0.0.1\sp</backupdestination>
    <backupdestinationmaxkeepdays>0</backupdestinationmaxkeepdays>
   </site>
   <site id="2">
    <catastrophicbackup>0</catastrophicbackup>
    <catastrophicmethod>full</catastrophicmethod>
    <sitecollectionbackup>1</sitecollectionbackup>
    <sitecollectionurl>http://extranet.domain.com</sitecollectionurl>
    <hivebackup>1</hivebackup>
    <hive>C:\Program Files\Common Files\Microsoft Shared\web server extensions\12</hive>
    <iisbackup>0</iisbackup>
    <iisencryptopassword>MetaBackupPass1</iisencryptopassword>      
    <smtpserver>mailsrv</smtpserver>
    <fromemail>sharepoint1@domain.com</fromemail>
    <toemail>administrator@domain.com</toemail>
    <backupdestination>\\backupserver\spbackup</backupdestination>
    <backupdestinationmaxkeepdays>14</backupdestinationmaxkeepdays>
   </site>
</confSPBackup>