Argument till programmet Monitor.SqlAnywhere.BackupTool.exe

  1. Markera all text från ett exempel nedan och kopiera med Ctrl + C.
  2. Klistra in i en texteditor med Ctrl + V, exempelvis i Anteckningar.
  3. Redigera det som är markerat med gul färg i exemplet, så att det överensstämmer med din miljö.
  4. Markera all text i texteditorn och kopiera den på nytt med Ctrl + C.
  5. Klistra in texten med Ctrl + V i argumentfältet beskrivet i steg 9 i installationsbeskrivningen Backup/testföretag lokalt på separat databasserver.

Exempel 1: Backup av företagsdatabaser

-d C:\Databases -s SQLANYs_MonitorG5_Server1 --dbn 001,002,003 -o C:\DatabaseBackup -n C:\DatabaseBackup\{yyyy-MM-dd}.log -r --ms your.smtpserver.com --mp 25 --md SenderName --mn BackupSender@yourcompany.com --mu SmtpUsername --mw C:\somewhere\pwd.txt --mr BackupRecipient1@yourcompany.com,BackupRecipient2@yourcompany.com --mb MailSubject --mt 0

Exempel 1: Kopiering till testföretag

-d "C:\ProgramData\Monitor ERP System G5\Databases" -s DatabaseServerName --dbn 001 -t 001_1 -o "C:\ProgramData\Monitor ERP System G5\Databases" -n "C:\ProgramData\Monitor ERP System G5\Databases\001_1\{yyyy-MM-dd}.log" -r --ms your.smtpserver.com --mp 25 --md SenderName --mn BackupSender@yourcompany.com --mu SmtpUsername --mw C:\somewhere\pwd.txt --mr Recipient1@yourcompany.com,Recipient2@yourcompany.com --mb MailSubject --mt 0

Obs! Du måste omsluta ett värde i ett argument med "" om det innehåller mellanslag.

Förklaring av alla argument (Engelska)

Option Required/Optional Description Example
-d "database path" Required Supply file or root path of the database to backup.

-d C:\Databases

-s "server name" Required Service name of the SQL Anywhere database server. -s SQLANYs_MonitorG5_Server1
--dbn "database names" Required Comma-separated list of database names. --dbn 001,002,003
-o "output path" Required The folder root path where backups are placed. -o "C:\DatabaseBackup"
-n "logPath{datetimeformat}" Optional

Backup error log.

If none is specified then the executable's location is used.

Supply either file or directory path.

If a filename is not specified then the default name is: yyyy-MM.[databaseNames].log

Datetime patterns can be specified in the filename.

-n C:\log

-n C:\log\{yyyy-MM-dd}.log

-v Optional If specified then a validation will be done once the backup has completed. -v
-m Optional If specified then only back up log file. -m
-r Optional If specified then truncate log file. -r
--tm Optional

If specified then only test the supplied mail settings. Used when setting up the backup jobs to ensure mailing works.

When this option is used no other backup parameter will run, even if you have included backup options.

--tm
-u Optional If specified then each backup will be created in a new folder named yyyyMMddHHmmss -u
-t "test company" Required

Copy a database to the named test company. Supply the database name of the test company.

Used in conjunction with --dbn "database name", the database to copy from.

-t 001_1

--ms "mailserver" Required Specify the e-mail server name. --ms your.smtpserver.com
--mp "port number" Required Specify the e-mail server port number. --mp 25
--md "display name" Required Specify the e-mail display name. --md SenderName
--mn "Sender email address" Required Specify the sender e-mail address. --mn BackupSender@yourcompany.com
--mu "username" Required Specify the user name for login on the e-mail server.

--mu foo@bar.com

--mu SmtpUsername

--mw "password file path" Required Specify a path to a text file that contains the actual password of the sender e-mail address that will send e-mail reports. Permissions for this file should be restricted so that only the Windows account that runs the scheduled task has exclusive access to the file! --mw C:\somewhere\pwd.txt
--mr "mail recipients" Required Comma-separated list of recipients. --mr Recipient1@yourcompany.com,Recipient2@yourcompany.com
--mb "subject" Required Specify the mail subject. --mb MailSubject
--mt "mail trigger" Required

Specify the trigger for when an email should be sent. Default is always.

0 = Always
1 = Error

--mt 0
--ml Optional If specified then SSL will be used. --ml