Toixland

  • Aumenta dimensione caratteri
  • Dimensione caratteri predefinita
  • Diminuisci dimensione caratteri

User Manual

E-mail Stampa PDF

 

SUMMARY

 

This script will export virtual machines known to a given VMWare ESX 3 host into a specified target directory from where they can be picked up by any backup software.

Virtual machines selection will be performed in two phases:

  1. 1. select VMs based on a search criteria (see vcbSnap -r option)
  2. 2. filter VMs using a list of good VMs (session VMs list)

After the selection, the virtual machines are checked against some condition (i.e. no snapshots already exists) and then backup will be performed using vcbMounter utility.

Summary log and detailed logs for every virtual machines will be written and optionally emailed by SMTP.

To use this utility you need a configuration file that sets the needed session environment (session configuration file). See the jabs.conf.dist file for a detailed list of configuration parameters and their meaning.

Because of JABS use the vcbMounter utility, you need to set-up VCB environment too, editing the file

/etc/vmware/backuptools.conf

 

 

USAGE

 

  •     jabs -s <session_file> [-u <username>][-p <password>][-h <url>]
  •                            [-r <destination>][-a <select>]
  •                            [-L <verbosity>]
  •                            [-d <debug_flag>] [-t <test_flag>]

  •          <session_file>  the file containing session configuration
  •          <username>     username to connect to the host (default: USERNAME)
  •          <password>     password to connect to the host(default: PASSWORD)
  •          <url>                  <hostname>[:<port>](default: VCHOST)
  •          <destination>   backup destination (see vcbMounter -r option)
  •          <select>            search specifier to identify VMs groups (default: all powered on VMs) (see vcbVmName -s option)
  •          <verbosity>       verbosity used by vcbMounter command [0-6] (default: 3)
  •          <debug_flag>  Must be set to '1' if you want to enable debug mode (default: 0)
  •          <test_flag>       Must be set to '1' if you want to enable test mode (default: 0)

    All parameters, except the <session_file>, are defined into the <session_file> too, which is the only required parameter.

    Some default values (USERNAME, PASSWORD and VCHOST) are defined in the VCB environment (see /etc/vmware/backuptools.conf).

    If multiple values will be found for a parameter, the rule is:

  •     - Command line parameters override session file values
  •     - Session file paramaters override default values

 

EXAMPLE

This is the way I use JABS on my production environment.

I use a mounted readonly file system in which the script and the session files are stored. This is the /etc/fstab row

  • srv-nas:/nethdd/vmware  /backup/nas    nfs     intr,ro      0 0

The jabs.tar.gz is extracted direcly in the /backup/nas path. Then I have one or more files in /etc/cron.d (depending on how the host is used) to schedule the backup jobs.This is the cron file for the production environment.

#
# BACKUP SESSION FOR PRODUCTION ENVIRONMENT
# This file exists only on production hosts
#
#
#
# Application server will be backed up every 14 days starting at 20:15
10 20 14 * * root /usr/local/bin/jabs -s /backup/nas/scripts/jabs/sessions/jabs.prodas > /dev/null
10 20 28 * * root /usr/local/bin/jabs -s /backup/nas/scripts/jabs/sessions/jabs.prodas > /dev/null
#
#
#
# Database server will be backed up every saturday starting at 15:30
30 15 * * 6 root /usr/local/bin/jabs -s /backup/nas/scripts/jabs/sessions/jabs.proddb > /dev/null
#

The /usr/local/bin/jabs is a symbolic link (ln -s) to /backup/nas/scripts/jabs/jabs. This way I can enable/disable backup on a single host by mounting/dismounting the /backup/nas file system.

My destination backup directory (the SESSION_DESTINATION_ROOT defined in the session file) is a NFS datastore mounted through Virtual Center on every ESX hosts.

 

Ultimo aggiornamento Martedì 09 Febbraio 2010 12:02  

Statistiche

Tot. visite contenuti : 255118