3
Vote

Script failed when backing-up site on non-standard port

description

When i triyng to backup site http://intranet:8080 i recieve error. He wants to give name of file with ":" and then fail.
 
Test-Path : The given path's format is not supported.
At C:\SPBackup\SPBackup.ps1:67 char:21
  • if (-not (test-path <<<< $path))
    Set-Content : The given path's format is not supported.
    At C:\SPBackup\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:\SPBackup\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:\SPBackup\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:\SPBackup\SPBackup.ps1:73 char:37
  • $files | foreach {$zipfile.CopyHere( <<<< $_.fullname) }

comments

pianoman84 wrote Sep 3, 2009 at 2:15 PM

I've exactly the same error if I want to backup the site collection http://dev01:8081/sites/test. What does it mean and how can I avoid this?

wrote Sep 29, 2009 at 5:54 PM

dotnetrunner wrote Sep 29, 2009 at 5:56 PM

I have the exact error on http://portal:50000/ssp/admin.

wrote Oct 12, 2009 at 12:07 PM

MrHuttner wrote Sep 10, 2010 at 7:45 PM

Here was my solotion to this issue...
CODE:
function out-zip {
$path = $args[0]
$path = $path.Replace(":", "")
$files = $input

I replace the : with nothing because Windows file cannot contain it.
Works like a dream....

wrote Feb 14, 2013 at 2:43 AM