# Using dnl\_backup\_tool

## CDR Management

Assuming you are using the default installation path, then you can find the configuration in the following file:

```

/opt/denovo/dnl_backup_tool/conf/dnl_backup_tool.conf
```

The following fields let you configure how many days you want to keep CDRs in local disk.

{% code title=" " %}

```bash
basepath	/opt/denovo/dnl_softswitch/cdr/

# Compress CDR all data older than this value (in days)
# Default: 0 - do not compress .cdr files
keep_cdr	3

# Remove all archives older than this value (in days)
# Default: 0 - do not remove old archives
keep_archives	10


```

{% endcode %}

Within the same config file, you can setup Google cloud storage as follows:

```bash
### Gcloud configuration


# Authentication type (service, oauth2)
# Default: service
gcloud_type		service

# (M) Bucket to use
gcloud_backup_bucket	your_bucket_name

# (M) Authorization methods
#
# Service account:
#   - set gcs_auth_type to SERVICE
#   - provide path to JSON keyfile in *gcs_keyfile_path
#
# OAuth2:
#   - set gcs_auth_type to OAUTH2
#   - specify client email, secret and refresh token 
#
gcloud_key_file		/opt/denovo/dnl_backup_tool/conf/tokyo-bird-344444-7c1c6325c412.json
#gcloud_key_file		/opt/denovo/dnl_backup_tool/conf/ytel-powersips.json
gcloud_email		your_google_cloud_account
gcloud_secret		RkLYIe3k5tfffhJbi96Kut
gcloud_token		1/7jrRTfff7ZFkTp9u4sA1f0595t7__SmLS7oXP
```

If you prefer to use FTP for your cold storage, then you can setup the following parameters:

```bash
### (S)FTP configuration


# (M) Server URL
ftp_url		your_ftp_ip_or_host

# Server port
# Default: 21 - FTP, 22 - SFTP
ftp_port	21

# (M) Path to the CDR directory on the server
ftp_backup_dir	/fto_path/switch1

# Use relative paths in QUOT commands instead of absolute
# Default: false
ftp_use_relative_paths	false

# (M) Authorization methods
#
# FTP:
#   - By login/password pair:
#     set *ftp_user, and *ftp_password if required
#     leave *netrc_path empty
#
#   - Using system settings:
#     provide path to .netrc file in *netrc_path
#
#   - Anonymous:
#     set *ftp_user to "anonymous" and leave *ftp_pass empty
#
# SFTP:
#   - By login/password pair:
#     set *ftp_user and *ftp_pass values
#
#   - Using SSH keys:
#     set *pubkey_path, *privkey_path, and *passphrase if required
#     leave *ftp_user and *ftp_pass empty
#
ftp_user	your_ftp_username
ftp_password	your_ftp_password 


```

After you make changes to this config file, you must restart the switch to make it effective.  Here is the command to restart Class 4 backup tool:

```
systemctl restart dnl_backup_tool
```

When setup correctly, you should see CDRs being pushed to your Google Cloud bucket like below:

![](/files/-MYTRFwJSAEQVDABBlfy)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://v5cookbook.denovolab.com/maintainence/how-to-setup-auto-cdr-cleaning/using-dnl_backup_tool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
