File System level backups with LVM snapshots: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
== Introduction ==
= Introduction =
The general idea consists in combining an external tool wich is able to do filesystem level incremental backups (
The general idea consists in combining an external tool wich is able to do filesystem level incremental backups (
rsync by means of [http://backuppc.sourceforge.net/ BackupPC] in this document) with the possibility to take snapshots of LVM based storage of virtual machines.
rsync by means of [http://backuppc.sourceforge.net/ BackupPC] in this document) with the possibility to take snapshots of LVM based storage of virtual machines.
Line 24: Line 24:
Detailed configuration steps for a Windows host is shown.
Detailed configuration steps for a Windows host is shown.


== Requirements ==
= Requirements =
* Local user "backup", member of <tt>Administrators</tt> and <tt>Backup Operators</tt>
* Local user "backup", member of <tt>Administrators</tt> and <tt>Backup Operators</tt>
'''Tools needed on target Windows host'''
== Tools needed on target Windows host ==
* [http://www.cygwin.com/ CYGWIN]
* [http://www.cygwin.com/ CYGWIN]
** sshd
** sshd
Line 35: Line 35:
* [http://helgeklein.com/setacl/ SetACL]
* [http://helgeklein.com/setacl/ SetACL]
* [http://technet.microsoft.com/en-us/sysinternals/bb897438 Sync]
* [http://technet.microsoft.com/en-us/sysinternals/bb897438 Sync]
= Procedure =

Revision as of 12:34, 10 September 2012

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 directly executing the rsync command, intercepts it and runs a script ("forced command") which:

  1. Prepares backup operations (for instance, saving ACL in case of Windows host)
  2. Stops or Suspends services which can do important changes on filesystem.
  3. Triggers a snapshot of his own storage on PVE host it is runnng on.
  4. Revert machine to normal operating state.
  5. Redirects original rsync command towards PVE hosts and the snapshot.
    • Redirected rsync runs on PVE: mount fs, optionally save MBR and PBS, save ntfs metadata for Windows hosts, run rsync.
  6. Triggers snapshot snapshot removal on PVE.

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

Backuppc-snap-schema.png

Detailed configuration steps for a Windows host is shown.

Requirements

  • Local user "backup", member of Administrators and Backup Operators

Tools needed on target Windows host

Procedure