msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

05 Sep 2014 Backup VMware ESXi using BazaarVCB

This post describes how you can backup your VMware ESXi home installation with free license using BazaarVCB if you do not have a vCenter Server available. Bazaarvcb is the fastest backup solution I have used on the free VMware hypervisor.
Download the latest version from the download page.

The backup script is run by crontab every night and looks like this

#!/bin/bash
bazaarvcbPath="/media/backup/bazaarvcb-0.9.7b-linux-i386/bazaarvcb"
backupsPath="/media/backup"
hostname="192.168.0.222"
username="root"
password="password"
rollOut="30"
vmNames="vm-guest1 vm-guest2 vm-guest3"

for VM in $vmNames; do
        `$bazaarvcbPath backup -H $hostname -u $username -p $password --roll-out $rollOut $VM $backupsPath/$VM`
done

The backups are full so make sure you have enough disk space available.

bazaarvcb options

$ bazaarvcb -h
usage: bazaarvcb [-h]  ...

optional arguments:
  -h, --help   show this help message and exit

valid commands:
    checkhash  check .hsh files integrity in one directory
    listvm     list registered VMs on the ESXi host
    queryvm    display VMs informations
    listbackup
               search for backups in local and remote directories
    querybackup
               display report file of one particular
    backup     backup a VM
    restore    restore a backup

Open TCP port 31031 in your firewall to ensure that you have a high transfer rate, otherwise the backup will be transferred over SSH protocol and will be capped in speed to about 7MB/s (on the free hypervisor).
Bazaarvcb cannot backup a VM with snapshot(s).

Warning!
I have not tested this on a host connected to a vCenter server and can not confirm that it will work or not.

Tags: , , ,

Posted by

24 Sep 2012 Using rsnapshot as backup solution

This post describes short how to use rsnapshot as a remote filesystem snapshot utility, based on rsync that I use as my personal backup tool.
I have started using rsnapshot after using rsync and rdiff-backup and lost files because of file corruption.
rsnapshot is a great backup utility because it hardlinks files if they already exists and your backups does not take much more space than the actual filesystem you are backing up.
You need to configure passwordless SSH connection from the backup server to the file server if you plan to run this as a automated job using crontab.

This is the content of my config file (/root/scripts/rsnapshot-home.conf) to backup my remote fileserver

config_version  1.2
snapshot_root   /media/Backup/
cmd_cp  /bin/cp
cmd_rm  /bin/rm
cmd_rsync       /usr/bin/rsync
cmd_ssh /usr/bin/ssh
cmd_logger      /usr/bin/logger
cmd_du  /usr/bin/du
interval        daily   7
interval        weekly  4
interval        monthly 3
verbose 2
loglevel        4
logfile /var/log/rsnapshot-home.log
exclude_file    /root/scripts/rsnapshot-home.exclude
rsync_long_args --delete        --numeric-ids   --delete-excluded
lockfile        /var/run/rsnapshot.pid
backup  username@example.com:/export/files/      files/

The config file is tab delimited so you will get errors if you use space instead!

Running manual daily backup can be done with the command

# rsnapshot -c /root/scripts/rsnapshot-home.conf daily

You do now have a folder structure like this with your backups

/media/Backup/daily.0/files
/media/Backup/daily.1/files
/media/Backup/daily.2/files
/media/Backup/daily.3/files
...

Where daily.0 is the newest backup.

The backup files are store in the same form as in your file server so you can browse them using a regular file browser.
You can read more about restoring backups on the rsnapshot HOWTO.

You can also configure a report to be sent after every backup with the perl script rsnapreport.pl but I will not be covering that in this post.

Tags: ,

Posted by

02 Aug 2012 Backup of Zimbra MailBox using zmmailbox

This is a short script I use to backup the Zimbra mailbox content for my users.
This has been used on a Zimbra Collaboration Server (ZCS Open Source Edition) 7.2 installation, but should work on earlier versions as well.
I use another script to backup the whole Zimbra installation, but that might be another blog post.


#!/bin/bash -x
# Backup of Zimbra mailboxes using zmmailbox
# Restore of mailbox should be performed using:
# /opt/zimbra/bin/zmmailbox -z -m user@host postRestURL -u https://HOST "//?fmt=tgz&resolve=skip" mailbox-name-date.tgz
BackupFolder="/backup/zimbra"
MailBox="user1 user2 user3 userN"
DateToday=`date -I`
for name in $MailBox
do
sudo -u zimbra /opt/zimbra/bin/zmmailbox -z -m $name@pario.no getRestURL "//?fmt=tgz" > mailbox-$name-$DateToday.tgz
done

The backup files are named mailbox-user1-20120802.tgz mailbox-user2-20120802.tgz …

Tags: , , , , , ,

Posted by

01 Jun 2011 NetBackup 7.x port usage

If you are unsure what ports Symantec NetBackup 7.x master or media Windows server uses, just open the following file

%SYSTEMROOT%\system32\drivers\etc\services

The content in this file could be like this if you have not made any changes to the default configuration

bpcd		13782/tcp
bprd		13720/tcp
vnetd		13724/tcp
vopied		13783/tcp
bpdbm		13721/tcp
bpjobd		13723/tcp
bpjava-msvc		13722/tcp
NB_dbsrv		13785/tcp
vmd		13701/tcp
tldcd		13711/tcp
tl8cd		13705/tcp
tl4d		13713/tcp
tlmd		13716/tcp
tlhcd		13717/tcp
acsd		13702/tcp

Tags: , ,

Posted by