Re: Command Line for Backing up Source Safe.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
>
>
>
>
>
.



Relevant Pages

  • Re: Parameterization of Object Models
    ... Lock down Access to the system -- ... Attempt to prevent deadlocks see The Concepts of Database Management, ... recovery; that is, you say that you recovered the database. ... database (called a backup or a save). ...
    (comp.lang.misc)
  • Re: backup of database with multiple backend data bases
    ... Without doing this often at all I have had occasions where the copied file was corrupt and unusable when the copy was made while someone had the .mdb open. ... echo Copying DatabaseName.mdb to local disk ... Cannot copy database file while DatabaseName program is being used. ... find seems to want to backup the front end mdb... ...
    (microsoft.public.access.formscoding)
  • RE: How do I restore from mdf and ldf files?
    ... Tasks -> Backup Database ... Tasks -> Restore Database ... Windows 2003 Server with Latest Service Pack ... Pre-requisites for Sharepoint Backup and Restore: ...
    (microsoft.public.sharepoint.portalserver)
  • Re: RMAN restore of full backup fails completely
    ... You are not using a catalog database. ... You might have autobackup controlfile on, ... Your autobackup has been made *prior* to the backup! ... plus archivelog', when i try a restore on the other server however, the ...
    (comp.databases.oracle.server)
  • Backup and Restore Files
    ... What is the best way to backup and restore a runtime database file? ... pszDisplayName As String ...
    (microsoft.public.access.gettingstarted)