Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 » SQL Remote » Managing SQL Remote systems » Backing up SQL Remote systems

 

Back up the consolidated database

Back up your consolidated database by making a full backup of the consolidated database and transaction log, and then make incremental backups of the transaction log.

 To back up SQL Remote consolidated databases
  1. Make a full back up of the consolidated database and its transaction log.

    1. Connect to the database as a user with DBA authority.

    2. Run dbbackup with the -r and -n options.

      For example:

      dbbackup -r -n -c "UID=DBA;PWD=sql;DBF=c:\live\database.db" e:\archive
  2. Make incremental backups of the consolidated database transaction log. When backing up the transaction log, choose to rename and restart the transaction log.

    1. Connect to the database as a user with DBA authority.

    2. Run dbbackup with the -r and -n and -t options.

      For example:

      dbbackup -r -n -t -c "UID=DBA;PWD=sql;DBF=c:\live\database.db" e:\archive
  3. Run the SQL Remote Message Agent (dbremote) with access to the current transaction log.

    For example:

    dbremote -c "UID=DBA;PWD=sql;DBF=c:\live\database.db" d:\live
Caution

Do not run the SQL Remote Message Agent (dbremote) with the -x option on a database that is being backed up.

The figure below illustrates a database named database.db in the c:\live directory, with a transaction log named database.log in the d:\live directory.

The transaction log files are held in the Live directory.

When you back up the transaction log to a backup directory e:\archive using the -r and -n options to rename and restart the transaction log the Backup utility (dbbackup) carries out the following tasks:

  1. Renames the current transaction log file to 971201xx.log, where xx are sequential characters ranging from AA to ZZ.

  2. Backs up the transaction log file to the backup directory, creating a backup file named 971201xx.log.

    Old transaction log names before 8.0.1

    Before the release of SQL Anywhere 8.0.1, the old transaction log files were named yymmdd01.log, yymmdd02.log, and so on. The name change was introduced to allow more old transaction logs to be stored. As the SQL Remote Message Agent (dbremote) scans all the files in the specified directory, regardless of their names, the name change should not affect existing applications.

  3. Starts a new transaction log, as database.log.

After several backups, the live directory and the archive directory contain a set of sequential transaction logs.

The Live directory and the Archive directory both contain a set of sequential transaction logs.
 See also