July 26, 2016 at 12:59 pm #48251
I am trying to do an SVN backup via Powershell. I have a script I am using that I want to repurpose because it is
doing a "hotcopy" instead of a "dump". I want to use CMD /C to do the work as Powershell would be slow.
Here is what I have:
$Date = Get-Date -format MM.dd.yyyy
$RepBuPath = "\\c2sd2643t\SVN-BU"
$Admin="c:\program files\VisualSVN Server\bin\svnadmin.exe"
$CopyType = "dump"
$tod = Get-Date -format "hh:mm:ss MM.dd.yy"
$BuFile=$BuFinalPath + "\" + $Repository + "." + "dump"
cmd.exe /c svnadmin.exe $CopyType $Repository `> $BuFile
The variable $BuFile gets built correctly but fails in the final line with "svnadmin: E720003: Can't open file 'admin\format': The system cannot find the file specified.
What am I doing wrong? Note this is a snippet of a larger script, I am doing testing.
July 26, 2016 at 1:36 pm #48259
Ok, got the forum rule thing.
Please elaborate on my error? What I did wrong?
July 26, 2016 at 5:07 pm #48319
Hi, the following article might be able to help.
July 26, 2016 at 8:18 pm #48366
Thank you for the example. I DID see this but being a powershell novice I am not
svnadmin dump -q $svnDumpSource > $svnDumpDest
not understanding how > takes the place of > .
Ex: svnadmin dump reposa > reposa.dump
July 26, 2016 at 8:22 pm #48368
Sorry, formatting is off. The example shows "gt;" . How does that translate to ">"
July 27, 2016 at 1:56 am #48395
July 27, 2016 at 2:14 am #48398
After further thought I'm not sure what I said even makes sense to me, time for another beer:D
You see that a lot in html where it's supposed to be > but ends up >.
Here is an example.
[Reflection.Assembly]::LoadFile( 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Web.dll') | out-null
If that one doesn't make sense I give up:D
- This reply was modified 5 months, 3 weeks ago by Dan Potter.
July 27, 2016 at 2:37 am #48401
Ha of course the forums would translate that for me. HtmlDecode ( ' & g t ; ') with no spaces.
July 27, 2016 at 5:03 am #48403
Please check out if below modified script works for you (it does on my system).
You must be logged in to reply to this topic.