3.2 Backing up the Embedded Sybase SQL Anywhere Database Running on a Windows Server to a Network Location on a Remote Windows Machine

To back up an embedded Sybase SQL Anywhere database that is installed and running on a Windows server to a network location on another Windows machine, you need a local machine and a remote machine. The local machine is a Windows server with the ZENworks server components and the embedded Sybase SQL Anywhere database installed. The remote machine is a Windows machine that has the network location to which you want to back up the database.

  1. Perform the following steps on the local machine:

    1. Create an administrative user and specify a password.

      For example, you could specify the administrative username as Administrator and the password as novell.

    2. From the desktop Start menu, click Settings, click Control Panel, double-click Administrative Tools, then double-click Services.

    3. Right-click the Novell ZENworks Datastore service, then click Properties.

    4. Click the Log On tab.

    5. Select This account, then specify the name and the password of the administrative user created in Step 1.a.

      For example, specify the user as Administrator and the password as novell.

    6. Click OK.

  2. Perform the following steps on the remote machine that has the network location where you want to save the backup:

    1. Create an account with the same credentials as the user you created in Step 1.a.

      For example, specify user as Administrator and password as novell.

    2. Provide Read/Write permission on the network location to the user.

  3. You can immediately back up the embedded Sybase SQL Anywhere database or schedule the backup to run at a specific time. To immediately back up the database, continue with this step. To schedule the backup to run at a specific time every day or on specific days of a month, skip to Step 4.

    To immediately back up the database to the network location on the remote machine by using the zman command line utility, enter the following command at the database server console prompt:

    zman database-backup \\IP_address_of_the_remote_machine\backup_directory\custom_directory

    Where \\IP_address_of_the_remote_machine\backup_directory is the network location on the remote machine and custom_directory_name is a name that you specify for a directory to be newly created by zman and into which the database files are to be backed up.

    To manually back up the database to the network location on the remote machine:

    1. Stop all the ZENworks Services on the all the ZENworks Servers in the Management Zone.

      1. Execute the following command at the server prompt:

        novell-zenworks-configure -c Start

      2. Enter the number next to the Stop action.

    2. Manually copy zenworks_zone_name.db and zenworks_zone_name.log from the database server to a desired location on the remote machine.

      By default, the files are located in ZENworks_Installation_directory\Novell\Zenworks\Database on a Windows Sybase database server.

    3. Start all the ZENworks Services on the all the ZENworks Servers in the Management Zone.

      1. Execute the following command at the server prompt:

        novell-zenworks-configure -c Start

      2. Enter the number next to the Start action.

  4. (Conditional) To schedule the backup:

    1. Create a schedule file, backupschedule.sql, with the following contents:

      CREATE EVENT backup_schedule_name
      
      SCHEDULE
      
      specify_the_schedule   
      

      A sample schedule file to back up the database at a 11 p.m. every day is as follows:

      CREATE EVENT ZENDBBackup
      
      SCHEDULE
      
      START TIME '11:00 PM' EVERY 24 HOURS
      

      A sample schedule file to back up the database at 1:00 a.m on the first, second, third, and fourth day of the month is as follows:

      CREATE EVENT ZENDBBackup1
      
      SCHEDULE
      
      START TIME '1:00 AM'
      
      ON (1,2,3,4)
      

      Sample schedule files are available in the ZENworks_Installation_directory\Novell\Zenworks\ share\zman\samples\database directory.

    2. Execute the following command at the command prompt:

      zman database-backup \\IP_address_of_the_remote_machine\backup_directory\custom_directory c:\backUpSchedule.sql -d SQL_function_call

      Where \\IP_address_of_the_remote_machine\backup_directory is the network location on the remote machine and custom_directory_name is a name that you specify for a directory to be newly created by zman and into which the database files are to be backed up.

      For more information about the command, view the zman man page (man zman) on the device, or see zman(1) in the ZENworks 11 Command Line Utilities Reference.

According to the backup schedule, zenworks_zone_name.db and zenworks_zone_name.log are created in the network location on the remote machine. The backed-up database is stored in zenworks_zone_name.db. The result of the database backup is logged in zenworks_zone_name.log.

If you want to change the database backup location or the backup schedule at a later time, review the following sections: