While running, export the Job definitions if you do not have these in source control:
Export the jobs. You will have to do this for each project
rd-jobs list -f /path/to/backup/dir/project1/jobs.xml -p project1 rd-jobs list -f /path/to/backup/dir/project2/jobs.xml -p project2 ...
Stop the server. See: startup and shutdown. (Rundeck data file backup should only be done with the server down.)
Copy the data files. (Assumes file datastore configuration). The location of the data directory depends on the installation method:
cp -r data /path/to/backup/dir
cp -r logs /path/to/backup/dir
Start the server
Stop the server. See: startup and shutdown. (Rundeck recovery should only be done with the server down.)
Restore data/logs dir from backup (Refer to above for appropriate log/data path):
cp -r /path/to/backup/logs logspath cp -r /path/to/backup/data datapath
Start the server:
Reload the Job definitions. You will have to do this for each project:
rd-jobs load -f /path/to/backup/dir/project1/jobs.xml -p project1 rd-jobs load -f /path/to/backup/dir/project2/jobs.xml -p project2
As of Rundeck 1.4.4, you can export a Project's database contents into an archive file, and later import it into another project.
You can use this mechanism for:
To export, visit the "Admin" link in the Rundeck page header.
Click on the link under "Export Archive" to download an archive containing the project Jobs, Executions and History.
This archive can be imported into any other Rundeck project.
The archive will contain:
Note that the archive will not contain:
project.propertieslocated under your
resources.xmlor resources received from external providers.)
You should back up those contents separately if necessary.
To import the contents of an exported archive, visit the "Admin" link in the Rundeck page header.
Click on "Import Archive" to display the import form.
Choose the rundeck archive file to import (should end with ".rdproject.jar").
The import process:
Note that because the archive does not contain the project configuration or resource definitions, you will have to configure those separately for the new or updated project.