Backup of ESXi Virtual Machines using Affa



Similar documents
Nagios. Contents. From SME Server. Maintainer

How to Backup XenServer VM with VirtualIQ

VMTurbo Operations Manager 4.5 Installing and Updating Operations Manager

LAMP Quickstart for Red Hat Enterprise Linux 4

BACKUP YOUR SENSITIVE DATA WITH BACKUP- MANAGER

GeBro-BACKUP. Die Online-Datensicherung. Manual Pro Backup Client on a NAS

Linux System Administration on Red Hat

Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.

SEAGATE BUSINESS NAS ACCESSING THE SHELL. February 1, 2014 by Jeroen Diel IT Nerdbox

Partek Flow Installation Guide

Virtual machine W4M- Galaxy: Installation guide

NexentaConnect for VMware Virtual SAN

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

PowerPanel Business Edition Installation Guide

CommandCenter Secure Gateway

Server Installation/Upgrade Guide

Overview. Remote access and file transfer. SSH clients by platform. Logging in remotely

CommandCenter Secure Gateway

Contents Set up Cassandra Cluster using Datastax Community Edition on Amazon EC2 Installing OpsCenter on Amazon AMI References Contact

Do it Yourself System Administration

OpenGeo Suite for Linux Release 3.0

Workflow Templates Library

Backup Methods for your BBB or RPi2 Node


Virtual Appliance for VMware Server. Getting Started Guide. Revision Warning and Disclaimer

HOWTO run OmniOS under ESXi 5.1. and install VMware-Tools

Incremental Backup Script. Jason Healy, Director of Networks and Systems

Virtual Appliance Setup Guide

A candidate following a programme of learning leading to this unit will be able to:

How to install PowerChute Network Shutdown on VMware ESXi 3.5, 4.0 and 4.1

Fred Hantelmann LINUX. Start-up Guide. A self-contained introduction. With 57 Figures. Springer

13.1 Backup virtual machines running on VMware ESXi / ESX Server

The 2013 Experimental Warning Program (EWP) Virtual Weather Event Simulator (WES) Windows & Linux Installation Documentation

Oracle VM Server Recovery Guide. Version 8.2

Introduction to AIX 6L System Administration Course Summary

Abstract. Microsoft Corporation Published: August 2009

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

ESX System Analyzer Version 1.0 Installation Guide

/ Preparing to Manage a VMware Environment Page 1

VX 9000E WiNG Express Manager INSTALLATION GUIDE

Introduction to Operating Systems

NetIQ Sentinel Quick Start Guide

Red Hat Certifications: Red Hat Certified System Administrator (RHCSA)

Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 5 Manage Backup and Recovery

BLACK BOX. Quick Start Guide. Virtual Central Management System (VCMS) Works with LES Series Console Servers. LES-VCMS. Customer Support Information

How To Set Up A Backupassist For An Raspberry Netbook With A Data Host On A Nsync Server On A Usb 2 (Qnap) On A Netbook (Qnet) On An Usb 2 On A Cdnap (

User Guide for VMware Adapter for SAP LVM VERSION 1.2

Birmingham Environment for Academic Research. Introduction to Linux Quick Reference Guide. Research Computing Team V1.0

Setup Cisco Call Manager on VMware

The Tor VM Project. Installing the Build Environment & Building Tor VM. Copyright The Tor Project, Inc. Authors: Martin Peck and Kyle Williams

Using Virtual Machines

Cookbook Backup, Recovery, Archival (BURA)

RES ONE Automation 2015 Task Overview

Extending Remote Desktop for Large Installations. Distributed Package Installs

Using Network Attached Storage with Linux. by Andy Pepperdine

Quick Setup Guide. 2 System requirements and licensing Kerio Technologies s.r.o. All rights reserved.

NRPE Documentation CONTENTS. 1. Introduction... a) Purpose... b) Design Overview Example Uses... a) Direct Checks... b) Indirect Checks...

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

How to Use vsphere to Connect to and Manage an ESXi Hypervisor Installation

How To Install An Org Vm Server On A Virtual Box On An Ubuntu (Orchestra) On A Windows Box On A Microsoft Zephyrus (Orroster) 2.5 (Orner)

Configuring High Availability for VMware vcenter in RMS Distributed Setup

Bitrix Site Manager. VMBitrix Virtual Machine. Quick Start And Usage Guide

Moving Drupal to the Cloud: A step-by-step guide and reference document for hosting a Drupal web site on Amazon Web Services

How to install/upgrade the LANDesk virtual Cloud service appliance (CSA)

During your session you will have access to the following lab configuration.

WES 9.2 DRIVE CONFIGURATION WORKSHEET

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

NOC PS manual. Copyright Maxnet All rights reserved. Page 1/45 NOC-PS Manuel EN version 1.3

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

Table of Contents. Online backup Manager User s Guide

Installing and Administering VMware vsphere Update Manager

HOWTO: Set up a Vyatta device with ThreatSTOP in bridge mode

Field Installation Guide

Installing Platform RTM. Platform RTM Version Release date: October 2011

Configuring MailArchiva with Insight Server

1. Product Information

HOW TO BUILD A VMWARE APPLIANCE: A CASE STUDY

Online Backup Client User Manual Linux

Kaltura On-Prem Evaluation Package - Getting Started

Creating a DUO MFA Service in AWS

Installation Guide for WebSphere Application Server (WAS) and its Fix Packs on AIX V5.3L

Moxa Device Manager 2.0 User s Guide

Extreme Control Center, NAC, and Purview Virtual Appliance Installation Guide

Cassandra Installation over Ubuntu 1. Installing VMware player:

Installing VMware Tools on Clearswift v4 Gateways

Using VMware Player. VMware Player. What Is VMware Player?

How To Set Up Egnyte For Netapp Sync For Netapp

ULTEO OPEN VIRTUAL DESKTOP V4.0

CS197U: A Hands on Introduction to Unix

Abstract. Microsoft Corporation Published: November 2011

Accessing RCS IBM Console in Windows Using Linux Virtual Machine

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

VMware vsphere Data Protection Advanced 5.5

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

Deploy the ExtraHop Discover Appliance with Hyper-V

Installing a Symantec Backup Exec Agent on a SnapScale Cluster X2 Node or SnapServer DX1 or DX2. Summary

Cloud Storage Quick Start Guide

Procedure to Create and Duplicate Master LiveUSB Stick

Transcription:

Backup of ESXi Virtual Machines using Affa From SME Server Skill level: Advanced The instructions on this page may require deviations from procedure, a good understanding of linux and SME is recommended. Contents 1 Introduction 2 Preparing the Affa Server 2.1 Affa Installation 2.2 VMware Infrastructure (VI) Perl Toolkit Installation 2.2.1 Configure the DAG repository 2.2.2 Install the VMware Infrastructure (VI) Perl Toolkit 3 Preparing the ESXi Host for use with Affa 3.1 Adding an ESXi User with restricted Permissions 3.1.1 Adding Affa role 3.1.2 Adding Affa user 3.1.3 Assigning permissions 3.2 Configuring SSH and RSYNC on the ESX3i Host 3.2.1 Download and install the script 4 Setting up an Affa job 5 Uninstall 6 Addtional Information 6.1 How to update the ESXi System Image 6.2 How to make a statically linked Rsync Binary 7 References Introduction Affa supports hot backing up virtual machines running on the VMWare ESXi server. It uses the VMware Infrastructure Perl Toolkit to communicate with the EXSi and rsync over ssh to transfer the data. Before the backup starts, the state of the running VM is freezed by creating a snapshot of all its disks. After the freezed virtual disk files were backed up, the snapshot is deleted and the config points to the just backed up disks again. Then, as a last step the config files are backed up. A restore of a VM can be done by simply copying back all archived files to the original location on the ESXi host. It is also possible to copy the files to a different directory (or to another ESXi server) and add the vmx file to the inventory. Alternatively with SambaShare=yes the VMWare Converter tool can be used. Note:

This document is applicable to ESX3i with an USB boot device. It will most likely not work with other type of boot devices Warning: This software comes 'as is' without any warranty. Errors in design and/or implementation cannot be completely eliminated. Therefore take precautions to avoid negative impacts to your system. Preparing the Affa Server Affa Installation Install the Affa program as descibed here: Affa#Installation_or_Update VMware Infrastructure (VI) Perl Toolkit Installation Configure the DAG repository The following command will configure the dag repository on SME Server. /sbin/e-smith/db yum_repositories set dag repository \ Name 'Dag - EL4' \ BaseURL 'http://apt.sw.be/redhat/el4/en/$basearch/dag' \ EnableGroups no \ GPGCheck yes \ GPGKey http://dag.wieers.com/packages/rpm-gpg-key.dag.txt \ Visible no \ Exclude freetype,htop,iptraf,rsync,syslinux \ status disabled After adding it to the database we have to update the changes to the configuration file: signal-event yum-modify Login as root and run: /usr/bin/yum install openssl-devel /usr/bin/yum --enable=dag install perl-xml-sax Install the VMware Infrastructure (VI) Perl Toolkit Download the VI Perl Toolkit tarball from the VMWare web site: http://www.vmware.com/support/developer /viperltoolkit/ tar xzf VMware-VIPerl-1.6.0-104313.i386.tar.gz cd vmware-viperl-distrib Edit the vmware-install.pl script and comment out these lines

4738 # if ( -d '/proc/xen' ) { 4739 # error('you cannot install '. 4740 # vmware_product_name(). 4741 # ' on a system running a xen kernel.'); 4742 # } Run the script./vmware-install.pl Ignore this warning: The following Perl modules were found on the system but may be too old to work with VIPerl: URI XML::NamespaceSupport Preparing the ESXi Host for use with Affa To make the ESXi server ready to cooperate with Affa you must install the rsync program, enable the ssh service, configure passwordless ssh login and add a user for API communication using the VMware Infrastructure (VI) Perl Toolkit. Adding an ESXi User with restricted Permissions Run the Virtual Infrastructure Client and logon to the ESXi host. Adding Affa role Switch to the Administration module and add a new role with permissions to create and delete snapshots

Adding Affa user Switch back to the Inventory module and add a new user with password:

Assigning permissions In the Permission Tab assign the new role to the new user.

Configuring SSH and RSYNC on the ESX3i Host On ESXi the SSH service Dropbear is installed but disabled. To use rsync the SSH service must be enabled and the rsync program must be installed. To enable passwordless login a.ssh directory for storing the keys must be created. A script affa-setup.sh is provided that does this: enable SSH service by configuring inetd.conf and restarting the inetd service install rsync (statically linked binary) create a /root home directory with a.ssh sub directory to store the public keys for password-less login link the.ssh directory to the non-volatile USB device add a command to /etc/rc.local that executes all the steps above at boot time Download and install the script On the ESXi Server console hit Alt-F1 to get the service shell. Now blind-type the word unsupported to unlock the shell. Login with the root password.

Download the tarball. The tarball contains the rsync binary and the script. cd /bootbank wget http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/affa2/affa-esxi-setup-02.tgz Verify the download wget http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/affa2/affa-esxi-setup-02.tgz.md5sum md5sum -c affa-esxi-setup-02.tgz.md5sum Unpack it tar xzf affa-esxi-setup-02.tgz rm affa-esxi-setup-02.tgz* and run the script./bexi/affa-setup.sh Now you can ssh login and use rsync. Setting up an Affa job The following assumes, that you are already familiar with configuring Affa and only focus on the ESXi specific parts. Assume you want to backup the virtual machine named 'myvm' on ESXi server with IP 10.200.48.5. log into the 'affabox' and copy the config helper script cp -a /usr/lib/affa/jobconfig-esxi-sample.pl /root/esxi-myvm-job.pl

edit /root/esxi-myvm-job.pl and set my $jobname='esxi-myvm'; and 'remotehostname =>'10.200.48.5', tell Affa that this job backups a ESXi virtual machine 'ESXi' => 'yes', set the VM name 'ESXiVMName' => 'myvm', set the username and password (this is the ESXi User with restricted permissions created above) 'ESXiUsername' => 'affa', 'ESXiPassword' => 'secret', configure virtual disk files to be compressed and chunked 'chunkfiles' => '*.vmdk', save the script, then run it /root/esxi-myvm-job.pl send the public key affa --send-key esxi-myvm run the job manually affa --run esxi-myvm When the Affa job starts, you can watch the snapshot create task in the Virtual Infrastructure Client. The name of the snaphot starts with "BEXI-". Do not delete it or revert to it while Affa is running. Uninstall

SSH login as root on the ESXi host and run these commands carefully: grep -v "#BEXI" < /etc/rc.local >/etc/rc.local.affa; mv -f /etc/rc.local.affa /etc/rc.local sed -e 's#^\(root:.*\)\(:/root:\)\(.*\)#\1:/:\3#' < /etc/passwd > /etc/passwd.affa; mv -f /etc/passwd.affa /etc/pa sed -e 's/^\(ssh.*\)/#\1/' < /etc/inetd.conf > /etc/inetd.conf.affa; mv -f /etc/inetd.conf.affa /etc/inetd.conf kill -HUP `ps grep inetd sed -e 's/.*//'` rm -rf /bin/rsync /root /bootbank/bexi tar -C / -xzf /bootbank/environ.tgz sbin/dropbearmulti Addtional Information How to update the ESXi System Image Shutdown the ESXi server. Remove the USB Memory stick and plug it into a linux computer. run the dmesg command to find out the device the memory stick is assigned to. The following example assumes that it is /dev/sdf. Replace is by the correct device. mkdir -p /mnt/esxi mount -t vfat /dev/sdf5 /mnt/esxi Save local.tgz and the bexi/ directory to the local machine cp -a /mnt/esxi/local.tgz /mnt/esxi/bexi. umount /mnt/esxi Download the ISO from the VMWare website (http://www.vmware.com/download/esxi/) and extract the image. mount -o loop VMware-VMvisor-InstallerCD*iso /mnt/esxi/ mkdir -p /tmp/esxi tar -xvzf /mnt/esxi/install.tgz -C /tmp/esxi/ umount /mnt/esxi cd /tmp/esxi/usr/lib/vmware/installer/ bzip2 -d VMware-VMvisor-big*.dd.bz2 Write the new image to the memory stick. Make sure that you use the correct target device of=... dd if=vmware-vmvisor-big-3.5.0_update_3-123629.i386.dd of=/dev/sdf rm -rf /tmp/esxi Copy local.tgz and the bexi/ directory to the memory stick. mount -t vfat /dev/sdf5 /mnt/esxi cp -a local.tgz bexi /mnt/esxi umount /mnt/esxi Plug the memory stick into the ESXi server and power on. Note: Alternatively you can install the new ESXi image on a second memory stick and then remote copy local.tgz and bexi/ from the running ESXi. Then shut down the ESXi server, replace the stick and power on. This minimizes the down time. How to make a statically linked Rsync Binary (This is just for information. A pre-build Rsync static is included in the affa-esxi-setup-*.tgz tarball) download the source from http://rsync.samba.org/

unpack the tarball tar xzf rsync-3.0.4.tar.gz cd rsync-3.0.4 build the statically linked binary make CFLAGS="-static" EXEEXT="-static" strip rsync-static References Wiki article Affa Retrieved from "http://wiki.contribs.org/backup_of_esxi_virtual_machines_using_affa" Categories: Advanced Howto Backup This page was last modified on 6 January 2009, at 21:03. Content is available under GNU Free Documentation License 1.2.