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

SAP Sybase SQL Anywhere 16.0 » SQL Remote » Managing SQL Remote systems » SQL Remote system backups » Maintaining transaction logs for remote databases

 

Backing up a remote database

Use the following procedure to back up your remote databases.

Prérequis

You must have the DATABASE BACKUP system privilege. This procedure includes a maintenance strategy for the use of the transaction logs by SQL Remote. Do not use this procedure and run the SQL Remote Message Agent (dbremote) with the -x option.

 Task
  1. Make a full backup of the remote database.

    1. Connect to the database.

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

      For example, assume that the backup directory is e:\archive, the database file is located in the c:\live directory, and its corresponding transaction log file is located in the d:\live directory:

      dbbackup -r -n -c "UID=DBA;PWD=sql;DBF=c:\live\remotedatabase.db" e:\archive

      The transaction logs in the d:\live directory are not altered by the full backup.

    3. Copy the backup files located in the e:\archive directory to an off-site drive or to a DVD.

    4. Run the SQL Remote Message Agent (dbremote) with access to the current transaction log files using the following command:

      dbremote -c "UID=DBA;PWD=sql;DBF=c:\live\remotedatabase.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.

  2. Set up the Backup utility (dbbackup) to make incremental backups of the remote database's transaction log.

    1. Connect to the database.

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

      For example:

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

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

Résultat

The remote database is backed up.