[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Backup script

From: David Cali <davidcali_at_charter.net>
Date: 2005-05-12 03:16:24 CEST

Hi Guys (and Girls),

 

I recently started using subversion in our company due to the many problems
we are having with VSS. It is such a great program, you guys did an
excellent job! Anyways, after doing a few google searches, I was unable to
find any sort of backup scripts that didn't require me to install python
(the more components I have to install, the harder a sell it is to
management :-(). Since we're a MSFT shop, I went ahead and wrote a very
quick vbscript that allows me to perform nightly backups without taking the
database offline (I'm using the Berkley DB). I haven't explored the site
long enough to find out where to post this, but I'd like to share it with
anyone who was in the same situation as I was. So feel free to use it, or
discard it. And thanks for such a wonderful alternative to the crap I have
been stuck with for five years!

 

Regards,

David Cali

 

svnbackup.vbs:

----------------------------------------------------------------------------
-------------------------------------------

Set WshShell = WScript.CreateObject("WScript.Shell")

Set fso = CreateObject("Scripting.FileSystemObject")

 

sourceDir = "e:\svnroot"

targetDir = "z:\svnbackup"

 

if fso.FolderExists(targetDir & "\") Then

 

   newTargetDir = targetDir & _

                           Right("0" & Month(now),2) & _

                           Right("0" & Day(now),2) & _

                           Year(now) & _

                           Right("0" & Hour(now),2) & _

                           Right("0" & Minute(now),2)

 

   Set folderObject = fso.GetFolder(targetDir & "\")

   folderObject.Move (newTargetDir)

End If

 

WshShell.Run("svnadmin hotcopy " & sourceDir & " " & targetDir & "
--clean-logs")

 

Set folderObject = Nothing

Set fso = Nothing

Set WshShell = Nothing

 

 
Received on Thu May 12 09:29:58 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.