Back Up DBC and User Data Using the Command Line | Teradata DSA - Backing Up DBC and User Data Using the Command Line - BAR - Data Stream Architecture

Teradata® DSA User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
BAR
Data Stream Architecture
Release Number
17.20
Published
November 2022
Language
English (United States)
Last Update
2023-11-30
dita:mapPath
bis1632417576364.ditamap
dita:ditavalPath
vwp1576617377804.ditaval
dita:id
cyv1467242268519
Product Category
Software
Teradata Tools and Utilities
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 following examples include a representative XML file.

Before you create a restore job, a backup job must have completed successfully or with a warning.
  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.