Backup database

Results 1 to 3 of 3
  1. #1
    Apprentice Helvis is offline
    MemberRank
    Jan 2008 Join Date
    23Posts

    Backup database

    Hello everybody. There is a problem.
    When I try to do automatic backups(sample copy of account):

    Code:
    @echo off
    set user=my_login
    set pass=my_pass
    set path=d:\backup
    set dbname1=account
    c:\windows\system32\pdate.exe "\s\e\t \d\m\=H-M" > tmp.bat
    call tmp.bat
    del tmp.bat
    set cp_time=%dm%
    mkdir %path%\%dbname1%\%date%
    OSQL -U%user% -P%pass% -n -Q "BACKUP DATABASE %dbname1% TO DISK = '%path%\%dbname1%\%date%\%dbname1%_%date%-%cp_time%.backup'"
    Each new backup archive has the same mass. What am I doing wrong?

    Sorry for my bad english


  2. #2
    The Dinosaur chumpywumpy is offline
    MemberRank
    Jun 2008 Join Date
    /f451/Location
    5,127Posts

    Re: Backup database

    Same "mass"? Do you mean size? If so that is normal if you are doing full backups.

    If you want scheduled backups then i would use maintenance schedules to do it as you have far more options such as cleaning away old files. You can also do things like database shrinking, reorganising the indexes and (in my case) compressing my backups to 7z so they are much much smaller ;)

  3. #3
    Apprentice Helvis is offline
    MemberRank
    Jan 2008 Join Date
    23Posts

    Re: Backup database

    Quote Originally Posted by chumpywumpy View Post
    Same "mass"? Do you mean size? If so that is normal if you are doing full backups.
    ...
    Yes - I meant it. Thank you.



Advertisement