Backing up databases

 Make a server-side backup

When you make a backup, you must decide where you want to store the backup files: on the database server computer or on the client computer.

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

  2. Execute a BACKUP DATABASE statement. For example:

    BACKUP DATABASE DIRECTORY 'd:\\temp\\backup';

    This statement creates a backup copy of the database files in the directory d:\temp\backup on the server computer.

    Alternatively, you can run dbbackup with the -s option to create the server-side backup. For example:

    dbbackup -s -c "Host=sample_host;SERVER=myserver;DBN=demo;UID=DBA;PWD=sql" 
    "c:\SQLAnybackup"
 Make a client-side backup
  1. Connect to the database as a user with REMOTE DBA or BACKUP authority.

  2. Run the Backup utility (dbbackup) with the -c option on the client computer. For example:

    dbbackup -c "Host=sample_host;SERVER=myserver;DBN=demo;UID=DBA;PWD=sql" "c:\SQLAnybackup"
 See also