Importing All Settings Data

To import all Junos Scope settings data at once, follow these steps:

  1. In the Junos Scope main window, click Settings > Import/Export Data. The Import/Export Data dialog box appears.


    Image s001466.gif
  2. In the Import All Data area, type the XML filename or browse to the XML file you want to import.

    For example, you can import the default Junos Scope-all.xml XML file from another Junos Scope server or modify the sample export-import-sample.xml file on the Junos Scope server accordingly. The contents of the sample XML file are as follows:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    - <all-records xmlns:cinclude="http://apache.org/cocoon/include/1.0">
    - <Junos Scope:users xmlns:Junos Scope="http://xml.juniper.net/jtk/export/1.0">
    - <Junos Scope:user>
    <Junos Scope:login>admin</Junos Scope:login>
    <Junos Scope:password>@S@20954@D2A1C46FC4830C53@1B3568CD62D615C9</Junos Scope:passwo
    rd>
    <Junos Scope:user-role>superuser</Junos Scope:user-role>
    </Junos Scope:user>
    </Junos Scope:users>
    - <Junos Scope:groups xmlns:Junos Scope="http://xml.juniper.net/jtk/export/1.0">
    - <Junos Scope:group>
    <Junos Scope:name>my-group</Junos Scope:name>
    <Junos Scope:criteria>SELECT DISTINCT dev.name FROM devices dev WHERE (
    dev.deleted_on = 0 ) AND ( ( dev.name LIKE '%delhi%' ) )</Junos Scope:criteria>
    <Junos Scope:pretty>NAME does contain "delhi"</Junos Scope:pretty>
    <Junos Scope:comment>my group</Junos Scope:comment>
    </Junos Scope:group>
    </Junos Scope:groups>
    - <Junos Scope:labels xmlns:Junos Scope="http://xml.juniper.net/jtk/export/1.0">
    - <Junos Scope:label>
    <Junos Scope:name>my-label</Junos Scope:name>
    <Junos Scope:category>core</Junos Scope:category>
    <Junos Scope:comment />
    </Junos Scope:label>
    </Junos Scope:labels>
    - <Junos Scope:devices xmlns:Junos Scope="http://xml.juniper.net/jtk/export/1.0">
    - <Junos Scope:device>
    <Junos Scope:name>munch</Junos Scope:name>
    <Junos Scope:hostname>munch</Junos Scope:hostname>
    <Junos Scope:priority>0</Junos Scope:priority>
    <Junos Scope:model>J4300</Junos Scope:model>
    <Junos Scope:comment />
    <Junos Scope:default-access-method>my-access</Junos Scope:default-access-method>
    <Junos Scope:device-label>my-label</Junos Scope:device-label>
    </Junos Scope:device>
    - <Junos Scope:device>
    <Junos Scope:name>delhi</Junos Scope:name>
    <Junos Scope:hostname>delhi</Junos Scope:hostname>
    <Junos Scope:priority>0</Junos Scope:priority>
    <Junos Scope:model>T320</Junos Scope:model>
    <Junos Scope:comment />
    <Junos Scope:default-access-method>my-access</Junos Scope:default-access-method>
    <Junos Scope:device-label>my-label</Junos Scope:device-label>
    </Junos Scope:device>
    - <Junos Scope:device>
    <Junos Scope:name>fivestar</Junos Scope:name>
    <Junos Scope:hostname>fivestar</Junos Scope:hostname>
    <Junos Scope:priority>0</Junos Scope:priority>
    <Junos Scope:model>J6300</Junos Scope:model>
    <Junos Scope:comment />
    <Junos Scope:default-access-method>my-access</Junos Scope:default-access-method>
    <Junos Scope:device-label>my-label</Junos Scope:device-label>
    </Junos Scope:device>
    </Junos Scope:devices>
    - <Junos Scope:schedules xmlns:Junos Scope="http://xml.juniper.net/jtk/export/1.0">
    - <Junos Scope:schedule>
    <Junos Scope:name>my-sched</Junos Scope:name>
    <Junos Scope:start-time utc-milliseconds="1138645800653">Tue Jan 31 00:00:00 IST
    2006</Junos Scope:start-time>
    <Junos Scope:period>every minute</Junos Scope:period>
    <Junos Scope:comment />
    </Junos Scope:schedule>
    </Junos Scope:schedules>
    - <Junos Scope:access-methods
    xmlns:Junos Scope="http://xml.juniper.net/jtk/export/1.0">
    <Junos Scope:encryption-format>encrypted-and-key-included</Junos Scope:encryption-fo
    rmat>
    <Junos Scope:encryption-key>@S@9DAA03366CD26456EFBC333E44620CA9</Junos Scope:encrypt
    ion-key>
    - <Junos Scope:authentication-information>
    <Junos Scope:name>my-auth</Junos Scope:name>
    <Junos Scope:login>regress</Junos Scope:login>
    <Junos Scope:password>@S@14095E0A0A8999C6F8C35FA5F797795C</Junos Scope:password>
    </Junos Scope:authentication-information>
    - <usergroup>
    <name>NOC Operator</name>
    <role>read-only</name>
    <comment>NOC operator</comment>
    </usergroup>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Junos Scope:global-policy
    xmlns:Junos Scope="http://xml.juniper.net/jtk/export/1.0">
    <Junos Scope:maximum-login-attempts>0</Junos Scope:maximum-login-attempts>
    <Junos Scope:access-window>23</Junos Scope:access-window>
    <Junos Scope:access-policy>
    <Junos Scope:ip-address>172.17.23.151</Junos Scope:ip-address>
    <Junos Scope:mask>23</Junos Scope:mask>
    <Junos Scope:allow>1</Junos Scope:allow>
    <Junos Scope:comment>blocking my machine</Junos Scope:comment>
    </Junos Scope:access-policy>
    <Junos Scope:access-policy>
    <Junos Scope:ip-address>2344:2344:2344:2344:2344:2344:2344:2344</Junos Scope:ip-address>
    <Junos Scope:mask>72</Junos Scope:mask>
    <Junos Scope:allow>1</Junos Scope:allow>
    <Junos Scope:comment>ipv6Test</Junos Scope:comment>
    </Junos Scope:access-policy>
    <Junos Scope:access-policy>
    <Junos Scope:ip-address>127.127.127.126</Junos Scope:ip-address>
    <Junos Scope:mask>30</Junos Scope:mask>
    <Junos Scope:allow>1</Junos Scope:allow>
    <Junos Scope:comment>test</Junos Scope:comment>
    </Junos Scope:access-policy>
    <Junos Scope:access-policy>
    <Junos Scope:ip-address>127.127.127.127</Junos Scope:ip-address>
    <Junos Scope:mask>32</Junos Scope:mask>
    <Junos Scope:allow>1</Junos Scope:allow>
    <Junos Scope:comment>test</Junos Scope:comment>
    </Junos Scope:access-policy>
    </Junos Scope:global-policy>
    - <Junos Scope:access-method>
    <Junos Scope:name>my-access</Junos Scope:name>
    <Junos Scope:type>clear-text</Junos Scope:type>
    <Junos Scope:authentication>my-auth</Junos Scope:authentication>
    </Junos Scope:access-method>
    </Junos Scope:access-methods>
    - <Junos Scope:radius-clients-config
    xmlns:Junos Scope="http://xml.juniper.net/jtk/export/1.0">
    - <Junos Scope:radius-server-entry>
    <Junos Scope:server-name>10.209.148.102</Junos Scope:server-name>
    <Junos Scope:port-no>1812</Junos Scope:port-no>
    <Junos Scope:acct-port-no>1813</Junos Scope:acct-port-no>
    <Junos Scope:shared-secret>@S@6DE028955F902AB28F435E9C314C38219490246BB894C586E582
    6E93F712E90A3C9D8D53EE6AB4FE4B10FE0FAF25F636</Junos Scope:shared-secret>
    </Junos Scope:radius-server-entry>
    </Junos Scope:radius-clients-config>
    </all-records>
  3. Type the key to decrypt the sensitive data that you want to import if the key was not included when the data was exported.
  4. To support synchronizing Junos Scope settings imported from multiple servers, select an import method to be used if a conflict occurs between existing records stored in the Junos Scope server and imported records. The available import method options include:
    • Ignore—(Default) An existing record stored in the Junos Scope server takes precedence over any imported record. The imported record is ignored and the existing record is not affected. Any imported record that does not exist in the Junos Scope server is inserted.
    • Merge—If a record exists in the Junos Scope server and also exists in the imported record, the imported record is merged with the existing record and is augmented as necessary. If an imported record is in conflict with an existing record, the imported record takes precedence over the existing record. The existing record is merged with the imported record; however, the fields of the imported record take precedence over the fields of the existing record. Any imported record that does not exist in the Junos Scope server is inserted.
    • Override—All records in the Junos Scope server are deleted, then all imported records are inserted. Before the override operation occurs, a message window appears with the following confirmation prompt: “ The import with override option will delete all the existing records. Do you want to continue?” Select Yes or No to continue.
  5. In the Import All Data area, click Import All Data. The Import/Export Data confirmation dialog box appears.
    Image import-export-all-data.gif
  6. Click OK.

    All setup information in the database is saved with all dependencies to the local file system with the filename that you specified.