This documentation relates to QuickBuild 5.0.x
Select here if you are using a different version

Backup Database

You are viewing an old version (v. 1) of this page.
The latest version is v. 2, last edited on Feb 19, 2013 (view differences | )
view page history | view next version >>

QuickBuild database backup can be taken via RESTful call.

Syntax

The backup can be taken by posting XML representation of the database backup request object to below url:

http://localhost:8810/rest/backup

A sample XML of backup request object is like below:

<com.pmease.quickbuild.web.page.administration.BackupNowOption>
  <!-- Destination file for the backup -->
  <backupTo>/path/to/backup.zip</backupTo>

  <!-- Whether or not to exclude builds in the backup -->
  <excludeBuilds>false</excludeBuilds>

  <!-- Whether or not to exclude measurement data in the backup -->
  <excludeMeasurements>false</excludeMeasurements>

  <!-- Whether or not to exclude audits in the backup -->
  <excludeAudits>false</excludeAudits>

  <!-- Whether or not to clear passwords in the backup -->
  <clearPasswords>false</clearPasswords>
</com.pmease.quickbuild.web.page.administration.BackupNowOption>

The response is of mime type text/plain and the content is absolute path to the backup file.

Security

You will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have RUN_BUILD permission for the requested configuration.

Demo

We use curl to demonstrate how to request a build in configuration root/test:

  1. Get configuration id using id service:
    curl http://localhost:8810/rest/ids?configuration_path=root/test
  2. Save the sample build request XML described above to file tempfile.xml, and modify configuration id to use value returned by the first step.
  3. Post content of tempfile.xml to QuickBuild using below command:
    curl -X POST -u admin:admin -d@tempfile.xml http://localhost:8810/rest/build_requests

Delete a Build Request

Syntax

Existing build request can be deleted using http DELETE method through below url:

http://localhost:8810/rest/build_requests/<build request id>
If the build associated with the build request is already running, it will be forcibly stopped.

Security

You will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have STOP_BUILD permission for the associated configuration.

Demo

We use curl to demonstrate how to delete build request 0136ed89-d47f-4307-8e69-c8535fae0e84:

curl -X DELETE -u admin:admin http://localhost:8810/rest/build_requests/0136ed89-d47f-4307-8e69-c8535fae0e84
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.