Zálohování pomocí utility DBBackup |
Top Previous Next |
Seznam témat:
Databázi lze kromě naplánovaných událostí automaticky zálohovat také pravidelným voláním utility dbbackup.exe, která je standardně instalována v adresáři Vision\asa\win64. Automatické volání lze zajistit pomocí Náplánovaných úloh (součást Windows) či jiných nástrojů pro naplánované spouštění úloh. Nevýhodou této metody je nutnost zadat cestu k dbbackup.exe přímo nebo pomocí PATH a nutnost uvést do příkazové řádky programu dbbackup přihlašovací jméno a heslo. Zde je příklad volání utility dbbackup.exe (provede zálohu do adresáře C:\zalohy): dbbackup -y -c "eng=vision_sql;dbn=vision_test;uid=admin;pwd=admin;commlinks=tcpip" c:\zalohy
nebo s využitím již nadefinovaného ODBC DSN: dbbackup -y -c "dsn=Vision;uid=admin;pwd=admin" c:\zalohy
Bližší info k parametrům utility dbbackup lze získat spuštěním s parametrem /?
Popis funkce dbbackup [ switches ] directory
Switch Description -c "keyword=value; ..." Supply database connection parameters -d Only back up the main database file -l file Live backup of the transaction log to a file -n Change the naming convention for the backup transaction log -o filename Log output messages to a file -q Quiet mode—do not print messages -r Rename and start a new transaction log -t Only back up the transaction log -w Only back up the write file -x Delete and restart the transaction log -xo Delete and restart the transaction log without making a backup -y Replace files without confirmation
Description If none of the switches -d, -t, or -w are used, all database files are backed up. For more information about the command-line switches, see Backup utility options. ****************** Directory The directory to which the backup files are copied. If the directory does not exist, it is created. However, the parent directory must exist. Connection parameters (-c) For a description of the connection parameters, see Connection parameters. If the connection parameters are not specified, connection parameters from the SQLCONNECT environment variable are used, if set. The user ID must have DBA authority or REMOTE DBA authority. For example, the following command backs up the asademo database running on the server sample_server, connecting as user ID DBA with password SQL, into the asabackup directory: dbbackup -c "eng=sample_server;dbn=asademo;uid=DBA;pwd=SQL" asabackup
Backup main database only (-d) - Back up the main database files only, without backing up the transaction log file or a write file, if one exists. Live backup (-l lower-case L) This option is provided to enable a secondary system to be brought up rapidly in the event of a server crash. A live backup does not terminate, but continues running while the server runs. It runs until the primary server crashes. At that point, it is shut down, but the backed up log file is intact and can be used to bring a secondary system up quickly.
Change backup transaction log naming convention (-n) - This option is used in conjunction with -r. It changes the naming convention of the backup transaction log file to yymmddnn.log, where nn is a number from 00 to 99 and yymmdd represents the current year, month and day. The backup copy of the transaction log file is stored in the directory specified on the command line, and with the yymmddnn.log naming convention. This allows backups of multiple versions of the transaction log file to be kep in the same backup directory. The two-digit year notation does not cause any year 2000 problems. The names are used solely for identification, not for ordering.
Log output messages to file (-o) - Write output messages to the named file. Operate quietly (-q) - Do not display output messages. This option is available only from the command-line utility. Rename and start new transaction log (-r) - This option forces a checkpoint and the following three steps to occur:
Back up the transaction log file only (-t) This can be used as an incremental backup since the transaction log can be applied to the most recently backed up copy of the database file(s). Back up the database write file only (-w) For a description of database write files, see The Write File utility. Delete and restart the transaction log (-x) Back up the existing transaction log, then delete the original log and start a new transaction log. This option causes the backup to wait for a point when all transactions from all connections are committed. Delete and restart the transaction log without a backup (-xo) Delete the current transaction log and start a new one. This operation does not carry out a backup; its purpose is to free up disk space in non-replication environments. Operate without confirming actions (-y) Choosing this option creates the backup directory or the replacement of a previous backup file in the directory without confirmation.
Související témata |