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.)
rundeckd stop
Copy the data files. (Assumes file datastore configuration). The location of the data directory depends on the installation method:
/var/lib/rundeck/dataLauncher install: $RDECK_BASE/server/data
cp -r data /path/to/backup/dir
Copy the log (execution output) files.
/var/lib/rundeck/logsLauncher install: $RDECK_BASE/var/logs
cp -r logs /path/to/backup/dir
Start the server
rundeckd start
Stop the server. See: startup and shutdown. (Rundeck recovery should only be done with the server down.)
rundeckd stop
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:
rundeckd start
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