freezer-metadata
Introduction
============
The proposal is to have information about a backup (referred to as
"backup metadata") stored along the backup data files in unencrypted json
format.
A new structure for the backup files is also proposed.
Problem
=======
Some functionalities are easier to implement if the freezer-agent has direct
access to information pertaining the backup itself.
Not only when the API (where backup metadata is currently stored) is not
available, but also in those cases when the freezer-scheduler is not aware of
the backup information the the freezer-agent is going to need (for example
when the agent has to determine which is the correct backup to restore)
Useful information can be:
- backup checksum (currently under development)
- engine used
- use of encryption
- presence/use of any engine-metadata file
Proposed solution
=================
The backup storage will generally contain three files for each level:
- backup metadata (json format)
- backup binary data
- backup engine metadata (eg: tar-metadata file)
Another option would be to have all the backup metadata information organized
in a single structured backup-metadata file. The problem in that case would be
that the file needs to be updated every time a new level is created.
That could possibly create problems which don't arise with a write-once file.
So, for example the files in a storage could be:
freezer-
freezer-
freezer-
freezer-
freezer-
freezer-
freezer-
freezer-
freezer-
(see section below for description of new backup structure and naming)
The backup-metadata file would also be uploaded to the API for easy
search and retrieval.
Backup structure and naming
=======
backup data files are named according to the following criteria:
/engine/
This results in pseudocontainer being use in case of object storage (for
example: swift), and in subdirectories when filesystem storage is used (local
storage or over ssh)
Where:
engine = {tar, rsync, nova, cinder}
backup_name = cinder_id (when engine is cinder)
When using cinder-native backups, freezer will store only two files: the
backup-metadata and a copy of the cinder-
backup-metadata file content
=======
The content may vary and depend on the actual backup options and engine used.
Some common fields are:
{
compression
encryption-
encryption-key: string,
backup_uuid: string,
checksum: string,
engine-type: string, (redundant)
}
Information about the engine-type is somewhat redundant since it's already
part of the backup name, but it's useful when the backup metadata is uploaded
to the API, since the actual filename is lost.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Eldar Nugaev
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
-
Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Freezer metadata
Addressed by: https:/
Freezer metadata part2
Addressed by: https:/
WIP: First scenario test
Addressed by: https:/
First scenario test