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.

= Components =

Agent
Agent

Multiprocessing Python software that runs at the client side where the data backup is executed. It can be executed as a standalone or by the Freezer Scheduler. The freezer-agent provides a flexible way to execute backup, restore, and perform other actions on a running system.

To provide flexibility in terms of data integrity, speed, performance, resources usage, and so on, the Freezer Agent offers a wide range of options to execute optimized backup according the available resources, such as:


 * Segments size (the amount of memory used)
 * Queues size (optimize backups where I/O, bandwidth, memory, or CPU is a constraint)
 * I/O Affinity and process priority (can be used with real time I/O and maximum user level process priority)
 * Bandwidth limitation
 * Client side Encryption (AES-256-CFB)
 * Compression (multiple algorithms supported as zlib, bzip2, xz/lzma)
 * Parallel upload to pluggable storage media (that is, upload backup to Swift and to a remote node by SSH, or upload to two or more independent Swift instances with different credentials, and so on)
 * Execute file-based incremental (such as tar), block-based incremental (such as rsync algorithm), and differential-based backup and restore
 * Multi platform: you can run it on hLinux, Windows, *BSD, and OSX
 * Automatic removal of old backups

Scheduler
Scheduler

A client side component running on the node from where the data backup is executed. It consists of a daemon that retrieves the data from the freezer API and executes jobs (that is, backups, restore, admin actions, info actions, and pre- and/or post- job scripts) by running the Freezer Agent. The metrics and exit codes returned by the Freezer Agent are captured and sent to the Freezer API.

The scheduler manages the execution and synchronization of multiple jobs executed on a single node or multiple nodes. The status of the execution of all the nodes is saved through the API.

The Freezer scheduler takes care of uploading jobs to the API by reading job files on the file system. It also has its own configuration file where job sessions or other settings such as the Freezer API polling interval can be configured.

API
API

Stores and provides metadata to the Freezer Scheduler. Also stores session information for multi node backup synchronization. Workload data is not stored in the API.

Web UI
Web UI

A horizon panel that interacts with the Freezer API to configure and change settings. It provides most of the features from the freezer-agent CLI, advanced scheduler settings such as multi-node backup synchronization, metrics, and reporting.

CLI
python-freezerclientI

A client side component that can interact with the api to create, update, list, delete jobs, actions, backups.