Backing up and renaming the original transaction log

When you back up your database, you must decide whether you want to continue to use the existing transaction log or create a new one. If your database is involved in synchronization or replication, you must maintain copies of old transaction logs until you are certain that they are no longer needed.

 Make a backup, renaming the transaction log (Sybase Central)
  1. Use the SQL Anywhere 12 plug-in to connect to the database as a user with BACKUP authority.

  2. Right-click the database and click Create Backup Images.

  3. Click Next.

  4. In the Which Database Do You Want To Back Up list, select the database and click Next.

  5. In the Save The Backup Images In The Following Directory field, type the name of a directory to save the backup copies.

  6. Select an option in the Which Files Do You Want To Back Up list and click Next.

  7. In the What Do You Want To Do With The Transaction Log list, click Rename The Transaction Log.

  8. Click Next.

  9. Click Finish.

 Make a backup, renaming the transaction log (SQL)
  • Use the BACKUP statement with the following clauses:

    BACKUP DATABASE
    DIRECTORY backup-directory
    [ TRANSACTION LOG ONLY ]
    TRANSACTION LOG RENAME;

    Include the TRANSACTION LOG ONLY clause only if you are making an incremental backup.

    The backup copies of the transaction log and database file are placed in backup-directory. If you enter a path, it is relative to the working directory of the database server, not your client application.

 Make a backup, renaming the transaction log (command line)
  • Run the following command (it must be typed on one line):

    dbbackup -c "connection-string" -r [ -t ] backup-directory

    Include the -t option if you are making an incremental backup.

    The backup copies of the transaction log and database file are placed in backup-directory. If you enter a path, it is relative to the directory from which you run the command.

 See also