Jump to: navigation, search

Difference between revisions of "Trove/backup-metadata"

(ReST Part)
Line 23: Line 23:
  
 
==== ReST Part ====
 
==== ReST Part ====
New backup list Response:
+
==== New backup list Response: ====
 
<pre>
 
<pre>
 
HTTP/1.1 200 OK
 
HTTP/1.1 200 OK
Line 51: Line 51:
 
         }
 
         }
 
     ]
 
     ]
 +
}
 +
</pre>
 +
 +
==== New Backup GET by ID ====
 +
<pre>
 +
HTTP/1.1 200 OK
 +
Content-Type: application/json
 +
Via: 1.1 Repose (Repose/2.6.7)
 +
Content-Length: 335
 +
Date: Thu, 13 Feb 2014 21:47:16 GMT
 +
Server: Jetty(8.0.y.z-SNAPSHOT)
 +
 +
{
 +
    "backup": {
 +
        "created": "2014-02-13T21:47:16",
 +
        "datastore": {
 +
                  "type": "mysql",
 +
                  "version": "5.5"
 +
        }
 +
        "description": "My Backup",
 +
        "id": "61f12fef-edb1-4561-8122-e7c00ef26a82",
 +
        "instance_id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
 +
        "locationRef": "http://localhost/path/to/backup",
 +
        "name": "snapshot",
 +
        "parent_id": null,
 +
        "size": null,
 +
        "status": "COMPLETED",
 +
        "updated": "2014-02-13T21:47:16"
 +
    }
 
}
 
}
 
</pre>
 
</pre>

Revision as of 16:15, 14 April 2014

Description

This blueprint will add the datastore and version to the backups api response.

Justification/Benefits

  • This will allow filtering the backups list by datastore type (and version?)
  • Eventually allow the api to restrict which datastore a backup could be restored to. (mysql -> mysql) (redis -> redis)

Impacts

Configuration

None

Database

  • The backup table will need to have a foreign key to the Datastore Version table.
  • This will require a migration to add the foreign key to all existing records

Public API

  • This will add the datastore type and version to the API Response
  • This will also add the ability to filter the backup list by datastore

CLI interface

  • This will add a single param to backup-list command '--datastore' to filter the list by that datastore

ReST Part

New backup list Response:

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.6.7)
Content-Length: 663
Date: Thu, 13 Feb 2014 21:47:16 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
 
{
    "backups": [
        {
            "created": "2014-02-13T21:47:16", 
            "datastore": {
                   "type": "mysql",
                   "version": "5.5"
            }
            "description": "My Backup", 
            "id": "014cfa93-fd0e-4e9d-871f-da8bb2eeee3e", 
            "instance_id": "dcf2c32b-241d-4c39-af70-1001dfe946d6", 
            "locationRef": "http://localhost/path/to/backup", 
            "name": "snapshot", 
            "parent_id": null, 
            "size": null, 
            "status": "COMPLETED", 
            "updated": "2014-02-13T21:47:16"
        }
    ]
}

New Backup GET by ID

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.6.7)
Content-Length: 335
Date: Thu, 13 Feb 2014 21:47:16 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
 
{
    "backup": {
        "created": "2014-02-13T21:47:16",
        "datastore": {
                   "type": "mysql",
                   "version": "5.5"
        }
        "description": "My Backup", 
        "id": "61f12fef-edb1-4561-8122-e7c00ef26a82", 
        "instance_id": "d4603f69-ec7e-4e9b-803f-600b9205576f", 
        "locationRef": "http://localhost/path/to/backup", 
        "name": "snapshot", 
        "parent_id": null, 
        "size": null, 
        "status": "COMPLETED", 
        "updated": "2014-02-13T21:47:16"
    }
}

Internal API

  • No change in the internal api, only to the initial model creation code in the backup models.

RPC API description

  • No change

Guest Agent

  • No Change