File System level backups with LVM snapshots: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
Line 6: Line 6:


Fundamental constraints in this solution are:  
Fundamental constraints in this solution are:  
* Do not change fundamentally the configuration of an host under BackuPC
* Do not change fundamentally the configuration of an host under BackuPC
* Preserve easy interactive restore directly on the host.  
* Preserve easy interactive restore directly on the host.  


Basically the target host, when a backup is required via ssh connection,  instead of executing directly the rsync command  
Basically the target host, when a backup is required via ssh connection,  instead of executing directly the rsync command  
intercepts it ed runs a script ("[http://oreilly.com/catalog/sshtdg/chapter/ch08.html#22858 forced command]") which:
intercepts it ed runs a script ("[http://oreilly.com/catalog/sshtdg/chapter/ch08.html#22858 forced command]") which:
* Prepares backup operations (for instance, saving ACL in case of Windows host)
 
* Stops or Suspends services which can do important changes on filesystem.
* Prepares backup operations (for instance, saving ACL in case of Windows host)
* Triggers a snapshot of his own storage on PVE host it is runnng on.
* Stops or Suspends services which can do important changes on filesystem.
* Revert machine to normal operating state.
* Triggers a snapshot of his own storage on PVE host it is runnng on.
* Redirects original rsync command towards PVE hosts and the snapshot.
* Revert machine to normal operating state.
* Redirects original rsync command towards PVE hosts and the snapshot.
   
   
Redirected rsync runs on PVE. At the and snapshot is removed.
Redirected rsync runs on PVE. At the and snapshot is removed.

Revision as of 10:39, 10 September 2012

File System level backups with LVM snapshots

Introduction

The general idea consists in combining an external tool wich is able to do filesystem level incremental backups ( rsync by means of BackupPC in this document) with the possibility to take snapshots of LVM based storage of virtual machines.

Fundamental constraints in this solution are:

  • Do not change fundamentally the configuration of an host under BackuPC
  • Preserve easy interactive restore directly on the host.

Basically the target host, when a backup is required via ssh connection, instead of executing directly the rsync command intercepts it ed runs a script ("forced command") which:

  • Prepares backup operations (for instance, saving ACL in case of Windows host)
  • Stops or Suspends services which can do important changes on filesystem.
  • Triggers a snapshot of his own storage on PVE host it is runnng on.
  • Revert machine to normal operating state.
  • Redirects original rsync command towards PVE hosts and the snapshot.

Redirected rsync runs on PVE. At the and snapshot is removed.

During interactive restore, instead, rsync process runs directly on the host.

Image(backuppc-snap-schema.png)