Back Up DBC and User Data Using the Command Line | Teradata DSA - 17.00 - 17.05 - Backing Up DBC and User Data Using the Command Line - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Advanced SQL Engine Node Software Migration Guide

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Release Date
June 2020
Content Type
Administration
Configuration
Installation
Publication ID
B035-5942-170K
Language
English (United States)
Two backup jobs are required: one for all DBC user data and one for DBC only.

Each config or create step uses an XML file. The examples below include a representative XML file. See Teradata® DSA User Guide for details about the XML files.

  1. Create a backup job for user data that includes all children of DBC but excludes the DBC database.
    Example: dsc create_job -n DBC-All -f DBCAllJob.xml

    This example of DBCAllJob.xml includes all children of DBC by setting the <includeAll> attribute to true.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <dscCreateJob xmlns="http://schemas.teradata.com/v2012/DSC">
        <job_instance>
            <job_name>DBC-All</job_name>   
            <job_description>Backup user data and all objects in DBC</job_description>
            <job_type>BACKUP</job_type>
            <job_state>ACTIVE</job_state>
            <auto_retire>false</auto_retire>
            <objectlist>
                <objectinfo>
                    <object_name>DBC</object_name>
                    <object_type>DATABASE</object_type>
                    <parent_name></parent_name>
                    <parent_type>BACKUP_JOB</parent_type>
                    <object_attribute_list>
                         <includeAll>true</includeAll> 
                    </object_attribute_list>
                </objectinfo>
            </objectlist>
        </job_instance>
        <source_tdpid>systemname</source_tdpid>
        <target_media>1_5_drives</target_media>
        <job_options>
            <online>false</online>
            <data_phase>DATA</data_phase>
            <query_band></query_band>
            <dsmain_logging_level>Error</dsmain_logging_level>
        </job_options>
    </dscCreateJob>
    
  2. If prompted, enter login credentials.
  3. Run the job.
    Example: dsc run_job -n DBC-All
  4. Create a backup job that includes only the DBC database.
    A DBC only backup job cannot be run as online.
    Example: dsc create_job -n DBC-Only -f DBCOnlyJob.xml

    This example of DBCOnlyJob.xml excludes all children of DBC by setting the <includeAll> attribute to false.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <dscCreateJob xmlns="http://schemas.teradata.com/v2012/DSC">
        <job_instance>
            <job_name>DBC-Only</job_name>   
            <job_description>Backup DBC only and exclude all child objects</job_description>
            <job_type>BACKUP</job_type>
            <job_state>ACTIVE</job_state>
            <auto_retire>false</auto_retire>
            <objectlist>
                <objectinfo>
                    <object_name>DBC</object_name>
                    <object_type>DATABASE</object_type>
                    <parent_name></parent_name>
                    <parent_type>BACKUP_JOB</parent_type>
                    <object_attribute_list>
                         <includeAll>false</includeAll> 
                    </object_attribute_list>
                </objectinfo>
            </objectlist>
        </job_instance>
        <source_tdpid>systemname</source_tdpid>
        <target_media>1_5_drives</target_media>
        <job_options>
            <online>false</online>
            <data_phase>DATA</data_phase>
            <query_band></query_band>
            <dsmain_logging_level>Error</dsmain_logging_level>
        </job_options>
    </dscCreateJob>
    
  5. When prompted, enter login credentials.
  6. Run the job.
    Example: dsc run_job -n DBC-Only
  7. [Optional] Check the status of any running job:
    dsc job_status -n JobName
    Job Status: COMPLETED_SUCCESSFULLY indicates the job is finished. A job might also complete with warning or errors.