Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Backing Up and Restoring Configurations

    Back up Procedure

    Configuration Backup and Restore

    1. Take a snapshot of the Cassandra database on all database nodes. Copy it to a different host if you intend to reimage or reset the same servers.
      root@a4s1:~# nodetool -h localhost -p 7199 snapshot
      
      Requested creating snapshot for: all keyspaces 
      
      Snapshot directory: 1403160262349
      

      Note: The snapshot could be in /home/cassandra/ or /var/lib/cassandra. Zip the cassandra directory and store it in a remote host.

    2. Get a back up of the MySQL database in the OpenStack node.
      root@a4s1:~# cat /etc/contrail/mysql.token
      
      422beb8ab4e9a6bdc5e7
      
      root@a4s1:~# mysqldump -u root --password=422beb8ab4e9a6bdc5e7 --all-databases > openstack.sql
    3. For testing purposes only: Bring servers to a clean state
      fab reset_config

      Note: This step is for testing purposes ONLY. This is not necessary if you are bringing up another node.

    Restore Procedure

    1. Stop Nova services.
      root@a4s1:~# service nova-api stop 
      
      nova-api stop/waiting
      
      root@a4s1:~# service nova-compute stop 
      
      nova-compute stop/waiting
      
      root@a4s1:~# service nova-scheduler stop 
      
      nova-scheduler stop/waiting
      
      root@a4s1:~# service nova-conductor stop 
      
      nova-conductor stop/waiting
      
    2. Stop Glance service.
      root@a4s1:~# service glance-api stop 
      
      glance-api stop/waiting
      
      root@a4s1:~# service glance-registry stop 
      
      glance-registry stop/waiting
    3. Stop Keystone service.
      root@a4s1:~# service keystone stop 

      
      keystone stop/waiting
    4. Stop Config service.
      fab stop_cfgm
    5. Stop Collector service.
      fab stop_collector
    6. Stop Database service.
      fab stop_database
    7. Restore All OpenStack databases.
      root@a4s1:~# cat /etc/contrail/mysql.token
      
      e5814139795b0c06e90a
      
      root@a4s1:~# mysql -u root --password=e5814139795b0c06e90a < openstack.sql
    8. Restore the Cassandra database using the script cass-db-restore-v4.sh.

      Note: Please copy the backed up Cassandra database to this server.

      root@a4s1:~# ./cass-db-restore-v4.sh
      
      NAME
      
              Script to restore Cassandra datbase from snapshot
      
      SYNOPSIS
      
              cass-db-restore-v4.sh [--help|-h] [--base_db_dir|-b] [--snapshot_dir|-s] [--snapshot_name|-n]
      
              MUST OPTIONS: base_db_dir, snapshot_dir, snapshot_name
      
      DESCRIPTION
      
              --base_db_dir, -b
      
                      Location of running Cassandra database
      
              --snapshot_dir, -s
      
                      Snapshot location of Cassandra database
      
              --snapshot_name, -n
      
                      Snapshot name
      

    Restore Example

    cass-db-restore-v4.sh -b /var/lib/cassandra/data -s /root/data.ss -n 1403068337967
    
    root@a4s1:~# ./cass-db-restore-v4.sh -b /home/cassandra/data -s /root/data.ss/cassandra/data -n 1403160262349
    
    Snapshot available...continuing..
    
    ----------------dirs to be restored------------
    
    to_bgp_keyspace/route_target_table/
    
    ContrailAnalytics/MessageTableSource/
    
    ContrailAnalytics/MessageTableMessageType/
    
    ContrailAnalytics/StatsTableByU64StrTag/
    
    ContrailAnalytics/MessageTableModuleId/
    
    ContrailAnalytics/ObjectValueTable/
    
    ContrailAnalytics/MessageTable/
    
    ContrailAnalytics/StatsTableByStrStrTag/
    
    ContrailAnalytics/MessageTableTimestamp/
    
    ContrailAnalytics/MessageTableCategory/
    
    ContrailAnalytics/SystemObjectTable/
    
    ContrailAnalytics/ObjectTable/
    
    config_db_uuid/obj_fq_name_table/
    
    config_db_uuid/obj_uuid_table/
    
    system/schema_columns/
    
    system/local/
    
    system/schema_columnfamilies/
    
    system/schema_keyspaces/
    
    ----------db files in snapshots--------------
    
    =======check /home/cassandra/data/to_bgp_keyspace/route_target_table// ===============
    
    to_bgp_keyspace-route_target_table-ic-1-CompressionInfo.db  to_bgp_keyspace-route_target_table-ic-2-CompressionInfo.db
    
    to_bgp_keyspace-route_target_table-ic-1-Data.db             to_bgp_keyspace-route_target_table-ic-2-Data.db
    
    to_bgp_keyspace-route_target_table-ic-1-Filter.db           to_bgp_keyspace-route_target_table-ic-2-Filter.db
    
    to_bgp_keyspace-route_target_table-ic-1-Index.db            to_bgp_keyspace-route_target_table-ic-2-Index.db
    
    to_bgp_keyspace-route_target_table-ic-1-Statistics.db       to_bgp_keyspace-route_target_table-ic-2-Statistics.db
    
    to_bgp_keyspace-route_target_table-ic-1-Summary.db          to_bgp_keyspace-route_target_table-ic-2-Summary.db
    
    to_bgp_keyspace-route_target_table-ic-1-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/MessageTableSource// ===============
    
    ContrailAnalytics-MessageTableSource-ic-1-CompressionInfo.db  ContrailAnalytics-MessageTableSource-ic-2-CompressionInfo.db
    
    ContrailAnalytics-MessageTableSource-ic-1-Data.db             ContrailAnalytics-MessageTableSource-ic-2-Data.db
    
    ContrailAnalytics-MessageTableSource-ic-1-Filter.db           ContrailAnalytics-MessageTableSource-ic-2-Filter.db
    
    ContrailAnalytics-MessageTableSource-ic-1-Index.db            ContrailAnalytics-MessageTableSource-ic-2-Index.db
    
    ContrailAnalytics-MessageTableSource-ic-1-Statistics.db       ContrailAnalytics-MessageTableSource-ic-2-Statistics.db
    
    ContrailAnalytics-MessageTableSource-ic-1-Summary.db          ContrailAnalytics-MessageTableSource-ic-2-Summary.db
    
    ContrailAnalytics-MessageTableSource-ic-1-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/MessageTableMessageType// ===============
    
    ContrailAnalytics-MessageTableMessageType-ic-1-CompressionInfo.db  ContrailAnalytics-MessageTableMessageType-ic-2-CompressionInfo.db
    
    ContrailAnalytics-MessageTableMessageType-ic-1-Data.db             ContrailAnalytics-MessageTableMessageType-ic-2-Data.db
    
    ContrailAnalytics-MessageTableMessageType-ic-1-Filter.db           ContrailAnalytics-MessageTableMessageType-ic-2-Filter.db
    
    ContrailAnalytics-MessageTableMessageType-ic-1-Index.db            ContrailAnalytics-MessageTableMessageType-ic-2-Index.db
    
    ContrailAnalytics-MessageTableMessageType-ic-1-Statistics.db      ContrailAnalytics-MessageTableMessageType-ic-2-Statistics.db
    
    ContrailAnalytics-MessageTableMessageType-ic-1-Summary.db          ContrailAnalytics-MessageTableMessageType-ic-2-Summary.db
    
    ContrailAnalytics-MessageTableMessageType-ic-1-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/StatsTableByU64StrTag// ===============
    
    ContrailAnalytics-StatsTableByU64StrTag-ic-1-CompressionInfo.db  ContrailAnalytics-StatsTableByU64StrTag-ic-1-Index.db
    
    ContrailAnalytics-StatsTableByU64StrTag-ic-1-Data.db            ContrailAnalytics-StatsTableByU64StrTag-ic-1-Statistics.db
    
    ContrailAnalytics-StatsTableByU64StrTag-ic-1-Filter.db          ContrailAnalytics-StatsTableByU64StrTag-ic-1-Summary.db
    
    =======check /home/cassandra/data/ContrailAnalytics/MessageTableModuleId// ===============
    
    ContrailAnalytics-MessageTableModuleId-ic-1-CompressionInfo.db  ContrailAnalytics-MessageTableModuleId-ic-2-CompressionInfo.db
    
    ContrailAnalytics-MessageTableModuleId-ic-1-Data.db             ContrailAnalytics-MessageTableModuleId-ic-2-Data.db
    
    ContrailAnalytics-MessageTableModuleId-ic-1-Filter.db           ContrailAnalytics-MessageTableModuleId-ic-2-Filter.db
    
    ContrailAnalytics-MessageTableModuleId-ic-1-Index.db            ContrailAnalytics-MessageTableModuleId-ic-2-Index.db
    
    ContrailAnalytics-MessageTableModuleId-ic-1-Statistics.db       ContrailAnalytics-MessageTableModuleId-ic-2-Statistics.db
    
    ContrailAnalytics-MessageTableModuleId-ic-1-Summary.db          ContrailAnalytics-MessageTableModuleId-ic-2-Summary.db
    
    ContrailAnalytics-MessageTableModuleId-ic-1-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/ObjectValueTable// ===============
    
    ContrailAnalytics-ObjectValueTable-ic-1-CompressionInfo.db  ContrailAnalytics-ObjectValueTable-ic-2-CompressionInfo.db
    
    ContrailAnalytics-ObjectValueTable-ic-1-Data.db             ContrailAnalytics-ObjectValueTable-ic-2-Data.db
    
    ContrailAnalytics-ObjectValueTable-ic-1-Filter.db           ContrailAnalytics-ObjectValueTable-ic-2-Filter.db
    
    ContrailAnalytics-ObjectValueTable-ic-1-Index.db            ContrailAnalytics-ObjectValueTable-ic-2-Index.db
    
    ContrailAnalytics-ObjectValueTable-ic-1-Statistics.db       ContrailAnalytics-ObjectValueTable-ic-2-Statistics.db
    
    ContrailAnalytics-ObjectValueTable-ic-1-Summary.db          ContrailAnalytics-ObjectValueTable-ic-2-Summary.db
    
    ContrailAnalytics-ObjectValueTable-ic-1-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/MessageTable// ===============
    
    ContrailAnalytics-MessageTable-ic-1-CompressionInfo.db  ContrailAnalytics-MessageTable-ic-2-CompressionInfo.db
    
    ContrailAnalytics-MessageTable-ic-1-Data.db             ContrailAnalytics-MessageTable-ic-2-Data.db
    
    ContrailAnalytics-MessageTable-ic-1-Filter.db           ContrailAnalytics-MessageTable-ic-2-Filter.db
    
    ContrailAnalytics-MessageTable-ic-1-Index.db            ContrailAnalytics-MessageTable-ic-2-Index.db
    
    ContrailAnalytics-MessageTable-ic-1-Statistics.db       ContrailAnalytics-MessageTable-ic-2-Statistics.db
    
    ContrailAnalytics-MessageTable-ic-1-Summary.db          ContrailAnalytics-MessageTable-ic-2-Summary.db
    
    ContrailAnalytics-MessageTable-ic-1-TOC.txt             ContrailAnalytics-MessageTable-ic-2-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/StatsTableByStrStrTag// ===============
    
    ContrailAnalytics-StatsTableByStrStrTag-ic-1-CompressionInfo.db  ContrailAnalytics-StatsTableByStrStrTag-ic-2-CompressionInfo.db
    
    ContrailAnalytics-StatsTableByStrStrTag-ic-1-Data.db            ContrailAnalytics-StatsTableByStrStrTag-ic-2-Data.db
    
    ContrailAnalytics-StatsTableByStrStrTag-ic-1-Filter.db          ContrailAnalytics-StatsTableByStrStrTag-ic-2-Filter.db
    
    ContrailAnalytics-StatsTableByStrStrTag-ic-1-Index.db           ContrailAnalytics-StatsTableByStrStrTag-ic-2-Index.db
    
    ContrailAnalytics-StatsTableByStrStrTag-ic-1-Statistics.db      ContrailAnalytics-StatsTableByStrStrTag-ic-2-Statistics.db
    
    ContrailAnalytics-StatsTableByStrStrTag-ic-1-Summary.db         ContrailAnalytics-StatsTableByStrStrTag-ic-2-Summary.db
    
    ContrailAnalytics-StatsTableByStrStrTag-ic-1-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/MessageTableTimestamp// ===============
    
    ContrailAnalytics-MessageTableTimestamp-ic-1-CompressionInfo.db  ContrailAnalytics-MessageTableTimestamp-ic-2-CompressionInfo.db
    
    ContrailAnalytics-MessageTableTimestamp-ic-1-Data.db            ContrailAnalytics-MessageTableTimestamp-ic-2-Data.db
    
    ContrailAnalytics-MessageTableTimestamp-ic-1-Filter.db          ContrailAnalytics-MessageTableTimestamp-ic-2-Filter.db
    
    ContrailAnalytics-MessageTableTimestamp-ic-1-Index.db           ContrailAnalytics-MessageTableTimestamp-ic-2-Index.db
    
    ContrailAnalytics-MessageTableTimestamp-ic-1-Statistics.db      ContrailAnalytics-MessageTableTimestamp-ic-2-Statistics.db
    
    ContrailAnalytics-MessageTableTimestamp-ic-1-Summary.db         ContrailAnalytics-MessageTableTimestamp-ic-2-Summary.db
    
    ContrailAnalytics-MessageTableTimestamp-ic-1-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/MessageTableCategory// ===============
    
    ContrailAnalytics-MessageTableCategory-ic-1-CompressionInfo.db  ContrailAnalytics-MessageTableCategory-ic-2-CompressionInfo.db
    
    ContrailAnalytics-MessageTableCategory-ic-1-Data.db             ContrailAnalytics-MessageTableCategory-ic-2-Data.db
    
    ContrailAnalytics-MessageTableCategory-ic-1-Filter.db           ContrailAnalytics-MessageTableCategory-ic-2-Filter.db
    
    ContrailAnalytics-MessageTableCategory-ic-1-Index.db            ContrailAnalytics-MessageTableCategory-ic-2-Index.db
    
    ContrailAnalytics-MessageTableCategory-ic-1-Statistics.db       ContrailAnalytics-MessageTableCategory-ic-2-Statistics.db
    
    ContrailAnalytics-MessageTableCategory-ic-1-Summary.db          ContrailAnalytics-MessageTableCategory-ic-2-Summary.db
    
    ContrailAnalytics-MessageTableCategory-ic-1-TOC.txt
    
    =======check /home/cassandra/data/ContrailAnalytics/SystemObjectTable// ===============
    
    ContrailAnalytics-SystemObjectTable-ic-1-CompressionInfo.db  ContrailAnalytics-SystemObjectTable-ic-1-Statistics.db
    
    ContrailAnalytics-SystemObjectTable-ic-1-Data.db             ContrailAnalytics-SystemObjectTable-ic-1-Summary.db
    
    ContrailAnalytics-SystemObjectTable-ic-1-Filter.db           ContrailAnalytics-SystemObjectTable-ic-1-TOC.txt
    
    ContrailAnalytics-SystemObjectTable-ic-1-Index.db
    
    =======check /home/cassandra/data/ContrailAnalytics/ObjectTable// ===============
    
    ContrailAnalytics-ObjectTable-ic-1-CompressionInfo.db  ContrailAnalytics-ObjectTable-ic-2-CompressionInfo.db
    
    ContrailAnalytics-ObjectTable-ic-1-Data.db             ContrailAnalytics-ObjectTable-ic-2-Data.db
    
    ContrailAnalytics-ObjectTable-ic-1-Filter.db           ContrailAnalytics-ObjectTable-ic-2-Filter.db
    
    ContrailAnalytics-ObjectTable-ic-1-Index.db            ContrailAnalytics-ObjectTable-ic-2-Index.db
    
    ContrailAnalytics-ObjectTable-ic-1-Statistics.db       ContrailAnalytics-ObjectTable-ic-2-Statistics.db
    
    ContrailAnalytics-ObjectTable-ic-1-Summary.db          ContrailAnalytics-ObjectTable-ic-2-Summary.db
    
    ContrailAnalytics-ObjectTable-ic-1-TOC.txt
    
    =======check /home/cassandra/data/config_db_uuid/obj_fq_name_table// ===============
    
    config_db_uuid-obj_fq_name_table-ic-1-CompressionInfo.db  config_db_uuid-obj_fq_name_table-ic-2-CompressionInfo.db
    
    config_db_uuid-obj_fq_name_table-ic-1-Data.db             config_db_uuid-obj_fq_name_table-ic-2-Data.db
    
    config_db_uuid-obj_fq_name_table-ic-1-Filter.db           config_db_uuid-obj_fq_name_table-ic-2-Filter.db
    
    config_db_uuid-obj_fq_name_table-ic-1-Index.db            config_db_uuid-obj_fq_name_table-ic-2-Index.db
    
    config_db_uuid-obj_fq_name_table-ic-1-Statistics.db       config_db_uuid-obj_fq_name_table-ic-2-Statistics.db
    
    config_db_uuid-obj_fq_name_table-ic-1-Summary.db          config_db_uuid-obj_fq_name_table-ic-2-Summary.db
    
    config_db_uuid-obj_fq_name_table-ic-1-TOC.txt
    
    =======check /home/cassandra/data/config_db_uuid/obj_uuid_table// ===============
    
    config_db_uuid-obj_uuid_table-ic-1-CompressionInfo.db  config_db_uuid-obj_uuid_table-ic-2-CompressionInfo.db
    
    config_db_uuid-obj_uuid_table-ic-1-Data.db             config_db_uuid-obj_uuid_table-ic-2-Data.db
    
    config_db_uuid-obj_uuid_table-ic-1-Filter.db           config_db_uuid-obj_uuid_table-ic-2-Filter.db
    
    config_db_uuid-obj_uuid_table-ic-1-Index.db            config_db_uuid-obj_uuid_table-ic-2-Index.db
    
    config_db_uuid-obj_uuid_table-ic-1-Statistics.db       config_db_uuid-obj_uuid_table-ic-2-Statistics.db
    
    config_db_uuid-obj_uuid_table-ic-1-Summary.db          config_db_uuid-obj_uuid_table-ic-2-Summary.db
    
    config_db_uuid-obj_uuid_table-ic-1-TOC.txt
    
    =======check /home/cassandra/data/system/schema_columns// ===============
    
    system-schema_columns-ic-5-CompressionInfo.db  system-schema_columns-ic-5-Summary.db          system-schema_columns-ic-6-Index.db
    
    system-schema_columns-ic-5-Data.db             system-schema_columns-ic-5-TOC.txt             system-schema_columns-ic-6-Statistics.db
    
    system-schema_columns-ic-5-Filter.db           system-schema_columns-ic-6-CompressionInfo.db  system-schema_columns-ic-6-Summary.db
    
    system-schema_columns-ic-5-Index.db            system-schema_columns-ic-6-Data.db
    
    system-schema_columns-ic-5-Statistics.db       system-schema_columns-ic-6-Filter.db
    
    =======check /home/cassandra/data/system/local// ===============
    
    system-local-ic-6-CompressionInfo.db  system-local-ic-6-TOC.txt             system-local-ic-7-Summary.db          system-local-ic-8-Statistics.db
    
    system-local-ic-6-Data.db             system-local-ic-7-CompressionInfo.db  system-local-ic-7-TOC.txt             system-local-ic-8-Summary.db
    
    system-local-ic-6-Filter.db           system-local-ic-7-Data.db             system-local-ic-8-CompressionInfo.db  system-local-ic-8-TOC.txt
    
    system-local-ic-6-Index.db            system-local-ic-7-Filter.db           system-local-ic-8-Data.db
    
    system-local-ic-6-Statistics.db       system-local-ic-7-Index.db            system-local-ic-8-Filter.db
    
    system-local-ic-6-Summary.db          system-local-ic-7-Statistics.db       system-local-ic-8-Index.db
    
    =======check /home/cassandra/data/system/schema_columnfamilies// ===============
    
    system-schema_columnfamilies-ic-45-CompressionInfo.db  system-schema_columnfamilies-ic-47-CompressionInfo.db
    
    system-schema_columnfamilies-ic-45-Data.db             system-schema_columnfamilies-ic-47-Data.db
    
    system-schema_columnfamilies-ic-45-Filter.db           system-schema_columnfamilies-ic-47-Filter.db
    
    system-schema_columnfamilies-ic-45-Index.db            system-schema_columnfamilies-ic-47-Index.db
    
    system-schema_columnfamilies-ic-45-Statistics.db       system-schema_columnfamilies-ic-47-Statistics.db
    
    system-schema_columnfamilies-ic-45-Summary.db          system-schema_columnfamilies-ic-47-Summary.db
    
    system-schema_columnfamilies-ic-45-TOC.txt             system-schema_columnfamilies-ic-47-TOC.txt
    
    system-schema_columnfamilies-ic-46-CompressionInfo.db  system-schema_columnfamilies-ic-48-CompressionInfo.db
    
    system-schema_columnfamilies-ic-46-Data.db             system-schema_columnfamilies-ic-48-Data.db
    
    system-schema_columnfamilies-ic-46-Filter.db           system-schema_columnfamilies-ic-48-Filter.db
    
    system-schema_columnfamilies-ic-46-Index.db            system-schema_columnfamilies-ic-48-Index.db
    
    system-schema_columnfamilies-ic-46-Statistics.db       system-schema_columnfamilies-ic-48-Statistics.db
    
    system-schema_columnfamilies-ic-46-Summary.db          system-schema_columnfamilies-ic-48-Summary.db
    
    system-schema_columnfamilies-ic-46-TOC.txt
    
    =======check /home/cassandra/data/system/schema_keyspaces// ===============
    
    system-schema_keyspaces-ic-5-CompressionInfo.db  system-schema_keyspaces-ic-6-CompressionInfo.db  system-schema_keyspaces-ic-7-CompressionInfo.db
    
    system-schema_keyspaces-ic-5-Data.db            system-schema_keyspaces-ic-6-Data.db             system-schema_keyspaces-ic-7-Data.db
    
    system-schema_keyspaces-ic-5-Filter.db          system-schema_keyspaces-ic-6-Filter.db           system-schema_keyspaces-ic-7-Filter.db
    
    system-schema_keyspaces-ic-5-Index.db           system-schema_keyspaces-ic-6-Index.db            system-schema_keyspaces-ic-7-Index.db
    
    system-schema_keyspaces-ic-5-Statistics.db      system-schema_keyspaces-ic-6-Statistics.db       system-schema_keyspaces-ic-7-Statistics.db
    
    system-schema_keyspaces-ic-5-Summary.db         system-schema_keyspaces-ic-6-Summary.db          system-schema_keyspaces-ic-7-Summary.db
    
    system-schema_keyspaces-ic-5-TOC.txt            system-schema_keyspaces-ic-6-TOC.txt
    
    root@a4s1:~#
    
    

    Restore Steps Continued

    1. Start Nova services.
      root@a4s1:~# service nova-api start
      
      nova-api start/running, process 25075
      
      root@a4s1:~# service nova-compute start 
      
      nova-compute start/running, process 25527
      
      root@a4s1:~# service nova-scheduler start
      
      nova-scheduler start/running, process 25509
      
      root@a4s1:~# service nova-conductor start 
      
      nova-conductor start/running, process 25545
    2. Start Glance service.
      root@a4s1:~# service glance-api start
      
      glance-api start/running, process 25779
      
      root@a4s1:~# service glance-registry start 
      
      glance-registry start/running, process 25793
    3. Start Keystone service.
      root@a4s1:~# service keystone start

      
      keystone start/running, process 25806
    4. Start Config service.
      fab start_cfgm
    5. Start Collector service.
      fab start_collector
    6. Start Database service.
      fab start_database

    Finishing

    Purpose

    Once all the services are started again, you should be able to restore all the VNs and policies in the new node setup.

    Modified: 2015-09-02