All of the user data that exists at any time in your Synchronizer system also exists in the applications being synchronized. Therefore, if there is a problem with your Synchronizer system, you can always resynchronize in order to restore your user data to a current working state.
If desired, you can back up your entire Synchronizer system in order to preserver the Mobility Pack or Data Synchronizer software, configuration files, certificate files, and database.
For additional details, see TID 7008163, “How to Back Up and Restore the Mobility Pack” in the Novell Support Knowledgebase.
Use your backup software of choice to back up the following directories on your Synchronizer server:
Directory |
Description |
---|---|
/opt/novell/datasync |
Mobility Pack or Data Synchronizer software |
/etc/datasync |
Configuration files |
/var/lib/datasync |
Certificate files |
Use a PostgreSQL-supported backup solution to back up the Synchronizer database and other connector databases in the following directory:
/var/lib/pgsql
Decide how you want to back up the data:
Stopping your Synchronizer system before backing it up is the safest way to ensure a completely consistent backup.
In a terminal window on the Synchronizer server, log in as the root user.
Create a directory for storing your backup files, for example:
mkdir /var/dsbackup
Create a script similar to the following:
#!/bin/bash # back up stopped Synchronizer system rcdatasync stop rcpostgresql stop # tar -czvpf /var/dsbackup/pgsql.tgz /var/lib/pgsql tar -czvpf /var/dsbackup/vardatasync.tgz /var/lib/datasync tar -czvpf /var/dsbackup/optdatasync.tgz /opt/novell/datasync tar -czvpf /var/dsbackup/etcdatasync.tgz /etc/datasync # rcpostgresql start rcdatasync start
For example, you could create a script named dsbackup.sh in the /opt/novell/datasync directory.
Add execute permissions to the backup script:
chmod +x script_name.sh
Execute the backup script.
Change to the directory where you backed up the Synchronizer files to verify that the .tgz files were successfully created.
For convenience, you might want to back up your Synchronizer system while it is still running.
In a terminal window on the Synchronizer server, log in as the root user.
Create a script to back up the Synchronizer database:
Create a file named .pgpass in the root user’s home directory (/root).
Put the following contents in the .pgpass file.
*:*:*:datasync_user:database_password
The Synchronizer database user is datasync_user. The Synchronizer database password was established during installation.
Create a database backup script similar to the following, using the pg_dump command to back up just the Synchronizer database:
#!/bin/bash # back up Synchronizer database pg_dump -U datasync_user mobility > /tmp/mobility.out pg_dump -U datasync_user datasync > /tmp/datasync.out /usr/bin/bzip2 /tmp/mobility.out /usr/bin/bzip2 /tmp/datasync.out
NOTE:If you are using a connector other than the Mobility Connector, replace mobility with the name of the database for your connector. Not all connectors use a connector-specific database.
For example, you could create a database backup script named dsdbbackup.sh in the /opt/novell/datasync directory.
Add execute permissions to the database backup script:
chmod +x script_name.sh
Execute the database backup script.
Create a script to back up the Synchronizer directories:
Create a directory for storing your backup files, for example:
mkdir /var/dsbackup
Use the following script to back up the rest of your Synchronizer system while it is sill running:
#!/bin/bash # back up running Synchronizer system tar -czvpf /var/backup/vardatasync.tgz /var/lib/datasync tar -czvpf /var/backup/optdatasync.tgz /opt/novell/datasync tar -czvpf /var/backup/etcdatasync.tgz /etc/datasync
For example, you could create a script named dsdirbackup.sh in the /opt/novell/datasync directory.
Add execute permissions to the backup script:
chmod +x script_name.sh
Execute the backup script.
Change to the directory where you backed up the Synchronizer files to verify that the .tgz files were successfully created.
Change to the directory where you backed up the Synchronizer files.
Us the following tar command to restore the backed-up Synchronizer directories:
tar -xzvf file_name.tgz
(Conditional) If you used the pg_dump command to back up the Synchronizer database separately, use the psql command to restore it.