# RunDeck Backups

Adapted from here: [https://docs.rundeck.com/docs/administration/maintenance/backup.html](https://docs.rundeck.com/docs/administration/maintenance/backup.html)

We will use the rd tool to access the RunDeck API and export the project job list.

We will be backing things up to this folder:

```
/projects/rundeck_backups
```

1\. Execute this, to export the project and job list:

```bash
rd jobs list -f /projects/rundeck_backups/jobs.xml -p ansible-test
```

If the above command returns this error, you need to set the environment variable:

[![image.png](https://wiki.galaxydump.com/uploads/images/gallery/2025-06/scaled-1680-/2FElW4msrwbYHGvu-image.png)](https://wiki.galaxydump.com/uploads/images/gallery/2025-06/2FElW4msrwbYHGvu-image.png)

If so, set this variable:

```
export RD_URL=http://192.168.1.200:4440
```

2\. Stop the server:

```bash
sudo systemctl stop rundeckd.service
```

3\. Backup the database:

```
sudo cp -r /var/lib/rundeck/data /projects/rundeck_backups/data/
```

4\. Copy the logs:

```bash
sudo cp -r /var/lib/rundeck/logs /projects/rundeck_backups/logs/
```

5\. Start the server:

```bash
sudo systemctl start rundeckd.service
```