Created
July 27, 2016 05:01
-
-
Save Dan1el42/03a3b965e421065a6f94223ef3f562a3 to your computer and use it in GitHub Desktop.
A possible solution for https://powershell.org/forums/topic/svn-backup-help-please/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Variable setup | |
| $DateTime = Get-Date -Format "yyyyMMdd-hhmmss" | |
| $SvnAdminExecutablePath = "C:\Program Files\VisualSVN Server\bin\svnadmin.exe" | |
| $SvnAdminSubcommand = "dump" | |
| $RepositoriesRootPath = "D:\Repositories" | |
| $RepositoryName = "Admin" | |
| $RepositoryPath = Join-Path -Path $RepositoriesRootPath -ChildPath $RepositoryName | |
| $BackupRootPath = "\\c2sd2643t\SVN-BU" | |
| $BackupFilePath = Join-Path -Path $BackupRootPath -ChildPath "${RepositoryName}_${DateTime}.svndump" | |
| $BackupMessagesFilePath = Join-Path -Path $BackupRootPath -ChildPath "${RepositoryName}_${DateTime}.txt" | |
| cmd.exe /c "$SvnAdminExecutablePath" $SvnAdminSubcommand "$RepositoryPath" `>"$BackupFilePath" 2`>"$BackupMessagesFilePath" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment