Backup/Restore/Transfer Database in Enterprise Server
The SQL database in Enterprise Server stores the metadata of all streams in the past and present, all account information including roles, all rules, decoders, and decoder groups.A complete backup and restore should be a four-part procedure:
- Export (and check for successful export)
- Uninstall database schema
- Install database schema (with version that matches the backup to be restored)
- Import backup data.
Transferring the database from one Enterprise Server (e.g. Server 1) to another (Server 2, to serve, for example, as a redundant backup), would require this procedure:
- Server 1: Export (and check for successful export) using the first procedure below.
- Server 1 and 2: Copy SQL Backup zipfile from Server 1 to Server 2 in the same folder location
- On Server 2: Uninstall Database scheme using the second procedure below (just in case it has a different version than the backup)
- Server 2: Install Database schema to match backup version (third procedure below)
- Server 2: Import backup data from SQL zipfile
EXPORT SQL DATABASE:
This procedure will export all stored accounts, decoders, decoder groups, rules, stream and file metadata. It will not backup stored files.- Connect directly to the Enterprise Server using Windows Remote Desktop, or using the server's keyboard/mouse/monitor and web browser. Another remote-control technology such as VNC/TeamViewer/LogMeIn will also work.
- Log in to Enterprise Server as a sys.admin-level user. The default sys.admin user is admin, password demo.
- Select "Admin Panel" from the tabs on the top navigation row.
- Select "Install/Update" tab.
- Set the following information in the fields:
- User: root (may default to admin if your browser has memorized your username/password for the ES login, but this must be set to root)
- Pass: demo
- Source XML: c/sls_db/slsserver.xml (should be filled in already)
- Action: Export DB (select from list)
- Backup: No
- The "Update Version," "Version Check," "Params," and "Available Backups" fields are ignored at this point.
- Click the "Submit" buttononce only. A "busy" indicator will appear in the upper right corner during the backup process, which normally takes about 1-2 seconds for a typical database size.
- Check the area below the form for the output from the job process. Scroll down if necessary. If the job reports a successful completion, it will give a date-stamp along with the message "Party time!"
- IMPORTANT:Even if the "Party Time!" message appears, you must check the exported file to make sure it has a non-zero filesize. The filename is shown in the job output area, and is found in the pathc:\sls_db\sb_backup\with filenamemysql_dump_XXXXXXXXXXXXXXXXXXXXXXXX.sql.zip where the Xs are specific to the version of the Enterprise Server firmware.
2014-08-21 00:15:31
backing up streambox_live and mysql database...
mysqldump --user="root" --password="[password]" --lock-all-tables --compress --quick --host="localhost" --databases "streambox_live" > "c:\sls_db\sb_backup\mysql_dump_v3.0_20140821_streambox_live_1408580131.sql"
mysqldump --user="root" --password="[password]" --lock-all-tables --compress --quick --host="localhost" --databases "mysql" > "c:\sls_db\sb_backup\mysql_dump_v3.0_20140821_mysql_1408580131.sql"
Compressing backup toc:\sls_db\sb_backup\mysql_dump_v3.0_20140821_streambox_live_1408580131.sql.zip
The zip archive contains 2 files with a status of 0
Successful:c:\sls_db\sb_backup\mysql_dump_v3.0_20140821_streambox_live_1408580131.sql.zip[255 Kb]
2014-08-21 00:15:34
Party Time!
The "Successful:" line reports the filesize (255Kb in our example) above, but you must still check the file using Windows Explorer to see that it does not have 0Kb filesize. If the filesize of the exported .sql.zip file is 0Kb, repeat the process.
The exported file is complete, and the .sql file can be backed up or transferred to another Enterprise Server (with the same version) for import. Do not change the filename!
UNINSTALL SQL DATABASE:
This procedure will remove all stored accounts, decoders, decoder groups, rules, stream and file metadata. It will not remove stored files. Before importing a new database, uninstall the existing database (after backing up if desired), and then follow the Installation procedure to install the database scheme in the correct database version.- Connect directly to the Enterprise Server using Windows Remote Desktop, or using the server's keyboard/mouse/monitor and web browser. Another remote-control technology such as VNC/TeamViewer/LogMeIn will also work.
- Log in to Enterprise Server as a sys.admin-level user. The default sys.admin user is admin, password demo.
- Select "Admin Panel" from the tabs on the top navigation row.
- Select "Install/Update" tab.
- Set the following information in the fields:
- User: root (may default to admin if your browser has memorized your username/password for the ES login, but this must be set to root)
- Pass: demo
- Source XML: c/sls_db/slsserver.xml (should be filled in already)
- Action: Uninstall (select from list)
- Backup:
- Setting Yes will create a backup as shown in the backup procedure in addition to uninstalling the database. Since the backup process sometimes fails (uncommonly), it is recommended that the backup done before uninstalling if desired.
- Set No if you already have a satisfactory backup or don't want one.
- The "Update Version," "Version Check," "Params," and "Available Backups" fields are ignored at this point.
- Click the "Submit" buttononce only. A "busy" indicator will appear in the upper right corner during the uninstall process, which normally takes about 1-2 seconds for a typical database size.
- Check the area below the form for the output from the job process. Scroll down if necessary. If the job reports a successful completion, it will give a date-stamp along with the message "Party time!"
INSTALL & IMPORT SQL DATABASE:
This procedure will install, port all stored accounts, decoders, decoder groups, rules, stream and file metadata. It will not restore stored files.NOTE:This is procedure has two steps; first you must install an empty database schema, then the data can be imported into the database.
INSTALL DATABASE SCHEMA:
- Connect directly to the Enterprise Server using Windows Remote Desktop, or using the server's keyboard/mouse/monitor and web browser. Another remote-control technology such as VNC/TeamViewer/LogMeIn will also work.
- Log in to Enterprise Server as a sys.admin-level user. The default sys.admin user is admin, password demo.
- Select "Admin Panel" from the tabs on the top navigation row.
- Select "Install/Update" tab.
- Set the following information in the fields:
- User: root (may default to admin if your browser has memorized your username/password for the ES login, but this must be set to root)
- Pass: demo
- Source XML: c/sls_db/slsserver.xml (should be filled in already)
- Action: Installation (select from list)
- Update Version:(select from list)
- select the version of the backup filename;in our example,mysql_dump_v3.0_20140821_streambox_live_1408580131.sql, the version (after mysql_dump) is v3.0.
- Version Check: [checked]
- The "Params," and "Available Backups" fields are ignored at this point.
- Click the "Submit" buttononce only. A "busy" indicator will appear in the upper right corner during the backup process, which normally takes about 1-2 seconds for a typical database size.
- Check the area below the form for the output from the job process. Scroll down if necessary. If the job reports a successful completion, it will give a date-stamp along with the message "Party time!"
IMPORT DATABASE FROM BACKUP:
- Select "Install/Update" tab.
- Set the following information in the fields:
- User: root (may default to admin if your browser has memorized your username/password for the ES login, but this must be set to root)
- Pass: demo
- Source XML: c/sls_db/slsserver.xml (should be filled in already)
- Action: Import DB (select from list)
- Update Version:(select from list)
- select the version of the backup filename;in our example,mysql_dump_v3.0_20140821_streambox_live_1408580131.sql, the version (after mysql_dump) is v3.0.
- Version Check: [checked]
- Available Backups: (select the backup from the list -- files shown here are detected in theC:\sls_db\sb_backup\ folder)
- In our example, backup is (zip) Backup v3.0 - 08/20/14 11...
- The "Params," and "Available Backups" fields are ignored at this point.
- Click the "Submit" buttononce only. A "busy" indicator will appear in the upper right corner during the backup process, which normally takes about 1-2 seconds for a typical database size.
- Check the area below the form for the output from the job process. Scroll down if necessary. If the job reports a successful completion, it will give a date-stamp along with the message "Party time!"
- Restart the SLS Service. By default there is a shortcut on the desktop that says "Restart SLS Service." If that is not available, access the Windows Services screen ( run "services.msc") and stop, then start the SLS Service, a.k.a. Streambox Live Service. Check that the SLS Service is set for automatic startup.
- Check the accounts, archive, decoders,rules,and decoder groups (as applicable) tabs to check that the backed up content has been restored.