---
title: Datastores
slug: enterprise-v6p1/datastores
createdAt: 2025-12-18T08:39:36.301Z
---

# <font color="#1d50a2">AsterNOS-Datastores</font>

AsterNOS datastore provides a rpc similar to standard NETCONF copy-config.

**copy-config** rpc support following combines:

- copy configuration data from one datastore to another datastore.
- copy configuration data from datastore to uri.
- copy from uri to uri.
- copy from uri to datastore is **not supported**.

uri can be file, http, https, scp, sftp, ftp.

- file is a local file on the device.
- http, https, scp, sftp, ftp are remote resource.
- if uri is scp/sftp/ftp, username and password are required in format: protocol://username\:password@/path/to/resource.
- if uri is http/https, we assume that uri can be accessed by AsterNOS device.

## <font color="#1d50a2">Copy-config from Running to Startup</font>

Request example to get copy running config to startup config via rpc **copy-config**

```xml
<copy-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <target>
    <startup/>
  </target>
  <source>
    <running/>
  </source>
</copy-config>
```

Response example

```xml
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f50e44bb-af8d-48f9-95be-66f7c82bffd1">
  <ok/>
</rpc-reply>
```

## <font color="#1d50a2">Copy-config from scp to file</font>

Request example to copy remote file via scp to local file via rpc **copy-config**

```xml
<copy-config>
    <source>scp://user_admin:password@192.168.18.18:/home/user_admin/config_db_leaf123.json</source>
    <target>file:///home/admin/config_db_leaf123.json</target>
</copy-config>
```

Response example

```xml
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:d4a406bd-cc39-487f-a6ff-9ad38885cc51">
  <ok/>
</rpc-reply>
```

You can find config\_db\_leaf123.json in /home/admin/ after rpc is executed.
