Freezer-getting-started
Getting Started with Freezer
Freezer is a Backup and Restore as a Service tool that helps you automate the backup and restore process for your data. Freezer executes backups and restores as jobs, and executes these jobs independently and/or as managed sessions (multiple jobs in multiple machines sharing a state).
Freezer features:
- Multiplatform: Linux, Windows, *BSD, OSX.
- Snapshots in Linux using LVM and on Windows using VSS.
- Encryption using AES-256-CFB.
- Low storage consumption: backups and restores are treated as streams.
- Flexible backup policy (both incremental and differential).
- Multiple compression algorithm support (zlib, bzip2, xz).
- Remove old backup automatically according the provided rules.
- Multiple storage media support (Swift, local file system, SSH).
- Remove old backup automatically according the provided parameters.
- Manage multiple jobs (multiple backups on the same node).
- Flush kernel buffered memory to disk.
- Manage multiple jobs (i.e. multiple backups on the same node).
- Synchronize backups and restore on multiple nodes.
- Web user interface integrated with OpenStack Horizon.
- Can execute scripts/commands before or after a job execution
Actions
An action is the simplest execution of freezer, it could be a backup, a restore or an admin task.
An example of a backup using the agent:
freezer-agent --action backup --backup-name my_backup --storage swift --container my_backup_container
An example of an action as an INI file saved as **/tmp/my_backup.ini**
[default] action = backup backup_name = my_backup storage = swift container = my_backup_container
Then we can use the ini file like this:
freezer-agent --config /tmp/my_backup.ini
An action can be represented as command line arguments or as an INI file.
Jobs
A job is a wrapper around a single or multiple actions that will be excecuted by a client and it contains scheduling information for recurrent executions.
A job can be represented as a json file.
Create a backup job in /tmp/job_backup.conf
{ "job_actions": [ { "freezer_action": { "mode" : "mysql", "mysql_conf" : "/etc/mysql/debian.cnf", "path_to_backup": "/var/lib/mysql/", "backup_name": "freezer-db-mysql", "snapshot": true, "always_level": 1, "max_priority": true, "remove_older_than": 90, "container": "freezer_backup_devstack_1_alwayslevel". "storage": "swift" }, "max_retries": 5, "max_retries_interval": 60, "mandatory": true } ], "job_schedule" : { }, "description": "mysql backup" }
Sessions
A group of jobs which share the same scheduling time, this is really helpful to sync backups across multiple nodes.
Clients
A client is an agent/scheduler running in a host.