openvz-diff-backups: a file-based incremental backup tool (Beta Testers Welcome!) [message #52759] |
Wed, 08 March 2017 03:08 |
devnull
Messages: 20 Registered: May 2012
|
Junior Member |
|
|
Hello!
Sorry for my (poor/beginner's/basic) English (I am French).
I am looking for kind people who are willing to test a beta (not really in fact) file-based backup tool.
The project has began a few years ago when I was using Proxmox 2, then Proxmox 3 and now OpenVZ "legacy".
Next step is to use OpenVZ 7 in production.
# ---
You can download it here : http://download.openvz-diff-backups.fr/releases/
I use it every day on multiple dedicated servers and it just works.
Main goal: publish the detailed documentation (French/English).
# ---
openvz-diff-backups is a file-based incremental backup tool.
It supports: Proxmox 2 & 3, Virtuozzo 6, OpenVZ "legacy" and now OpenVZ 7.
First time backup: slow (must copy all files)
subsequent backups: fast (rsync will only copy modified files)
I use it this way:
- 4 live backups each day (on a distant server X)
- 7 days of retention (in my case, it is about 1200 backups)
- replication of all backups (on a distant server Y)
- double replication of all backups (on a distant server Z)
# ---
this backup tool is designed to:
- perform full backups (even if it is incremental)
- run in background (ionice, nice, limited IOPS)
- minimize backup storage (only modified files)
- save memory state of each container
# ---
There are three modes:
1) cold backups
The safest and most portable choice (but with a cost of a downtime).
- stop container
- take a snapshot (LVM2 or Ploop)
- start container
- save snapshot data
2) hold backups
Will suspend container a few seconds (no downtime, just a few seconds of delay).
- suspend container
- take a snapshot (LVM2 or Ploop)
- resume container
- save snapshot data
3) live backups
Same as "hold" backups but will also save memory state.
- suspend container
- extract memory dump (OpenVZ or CRIU)
- take a snapshot (LVM2 or Ploop)
- resume container
- save memory dump
- save snapshot data
This is the preferred method.
a) backups can be done without downtime
b) restoring a live backup will just "resume" the container on another server (or on the same server).
# ---
Since it is a file-based backup tool, there are a few limits:
1) inode numbers are not preserved
Some tools like rkhunter and others will complain when restoring a container.
2) sometimes it is slower than a "brute force" copy
With billions of files inside a container, it is faster to copy the ploop image
3) with old OpenVZ "legacy" kernel, extracting memory dump could cause a kernel hang
I have submitted bugs reports about this and, actually, it works fine.
But, please, do not use live backups in production if your OpenVZ kernel is old.
# ---
As I said before, I am looking for people who are not afraid to test a "beta" backup tool.
Main goal is to release a stable version in a few month.
It works fine for me but I mostly use Debian + OpenVZ "legacy" now.
Several months ago, I was given the opportunity to test it on Virtuozzo 6 and OpenVZ 7.
Some minor changes were needed to be compatible.
# ---
I would be pleased to discuss the drawbacks and benefits of this project.
Note: a public GIT repo is on its way.
Have a nice day!
|
|
|
|
Re: openvz-diff-backups: a file-based incremental backup tool (Beta Testers Welcome!) [message #52776 is a reply to message #52775] |
Tue, 14 March 2017 18:00 |
devnull
Messages: 20 Registered: May 2012
|
Junior Member |
|
|
Hello!
sgoeldi wrote on Tue, 14 March 2017 10:39Do you use similar ways for OVZ7?
When openvz-diff-backups does a "live" backup with OpenVZ 7, the container is suspended, its memory is checkpointed with CRIU, a ploop snapshot is taken and then, the container is resumed.
It just takes a few seconds depending of the RAM used by the container.
After that, the ploop snapshot is mounted in a temp directory and files are synced with rsync (using --link-dest) to store only modified files.
You should give it a try with the "dry-run" mode : no modification is done and you'll see if it fits your needs.
Ex: openvz-diff-backups backup 101 auto -d -v -l 9
101 => CTID of the container
auto => select best backup mode (cold, hold or live)
-d => dry-run
-v => verbose
-l => log-level
By default, backups are stored locally (localhost) but OVZDB is designed to push backups anywhere (SSH path).
Have a nice day!
|
|
|