Re: Command Line for Backing up Source Safe.
- From: Chris Davoli <ChrisDavoli@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Oct 2005 15:03:02 -0700
Anna-Janyne, thanks, this will help a lot. What do you do if users are in the
database if you don't lock it? Do you run this late at night and hope no one
is in there?
If anybody else know of a command line way to lock the database let me know.
--
Chris Davoli
"Anna-Jayne Metcalfe" wrote:
> Hi Chris,
>
> > I need to get some DOS command line scripts to automate the back up of
> > source
> > safe. Where can I get these. I need:
> > 1.) Lock the SS database
> > 2.) Fix
> > 3.) Analyze
> > 4.) Archive to a backup.
>
> Here's the batch files we use. We perform the backup first (in the form of
> an archive generated using the WinZip command line client), before
> performing the analyse/fix. Doing so ensures that we have a valid backup if
> there is a problem during the analyse/fix operation.
>
> As far as I know there isn't a way to lock a database from the command line
> which will force any logged in users to logout, so we skip that step.
>
> I hope that helps.
>
>
> Kind Regards,
>
> Anna-Jayne Metcalfe
>
> Software/Product Development Consultant,
> Riverblade Limited.
> http://www.riverblade.co.uk
>
>
> ZipVssDatabase.txt:
>
> @echo off
>
> SET SourcePath=%1
> if '%SourcePath%'=='' goto Exit
>
> c:
> cd "C:\Vss\Win32"
>
> if exist "%SourcePath%\Data\Backup\analyze.log" del
> "%SourcePath%\Data\Backup\*.*" /f /s /q
>
> mkdir "%SourcePath%\Data\Backup"
> analyze -B"%SourcePath%\Data\Backup" -c -f -d -v4 -i- "%SourcePath%\Data"
>
> :Exit
> cd %BackupDir%
> echo.
>
>
>
> AnalyseAndFixVss.bat:
>
> @echo off
>
> SET SourcePath=%1
> if '%SourcePath%'=='' goto Exit
>
> c:
> cd "C:\Vss\Win32"
>
> if exist "%SourcePath%\Data\Backup\analyze.log" del
> "%SourcePath%\Data\Backup\*.*" /f /s /q
>
> mkdir "%SourcePath%\Data\Backup"
> analyze -B"%SourcePath%\Data\Backup" -c -f -d -v4 -i- "%SourcePath%\Data"
>
> :Exit
> cd %BackupDir%
> echo.
>
>
>
>
>
.
- References:
- Re: Command Line for Backing up Source Safe.
- From: Anna-Jayne Metcalfe
- Re: Command Line for Backing up Source Safe.
- Prev by Date: RE: Team Development Questions
- Next by Date: Re: VSS Labels lost -
- Previous by thread: Re: Command Line for Backing up Source Safe.
- Next by thread: Re: VSS Labels lost -
- Index(es):
Relevant Pages
|