whole disk backup
UPDATE: Currently NOT compatible with trixbox 2.2x
i am doing a rework of mondo backup scripts that someone else released a while back, it didnt work well for me at the time, so I have done some updates to the script and now it seems to be working. i think the community should have this.
mondoarchive is a whole disk backup solution that builds cd or dvd sized iso files. if your drive ever crashes simply burn and boot, instant restore.
the cron script will allow you to send the isos to a windows share, usb drive, or ftp site.
A wiki guide is now here: http://www.trixbox.org/wiki/whole-disk-backups
Modification: if anyone desires to code up a management gui for this, that would be nice, i am open to any contributions/modifications to the script, and will be keeping to the original GNU General Public License.
Support: I do NOT provide any support for this what-so-ever, support is fully the responsibility of the community, at the same time, if I can do anything for anyone (meaning have the time and knowledge), I will do it. At the moment, I aim to have support originate from this post. Also refer to the docs online www.mondorescue.org
lastly this is USE AT YOUR OWN RISK, and is currently considered beta.
this has been tested on my lab boxes: trixbox 2.4 and 2.6.
run the following commands as root:
--------------------------------------------------------
cd ~
wget http://www.astusers.org/install-mondo.tgz
tar -xzvf install-mondo.tgz
chmod +x install-mondo.sh
./install-mondo.sh
--------------------------------------------------------
reboot once the install completes, then you will need to edit /etc/cron.weekly/mondobackup.cron and turn on one of the various backup methods, instructions are in the cron script itself.
to test run /etc/cron.weekly/./mondobackup.cron
you should see some iso files under /backup and anywhere else you configured the script to send them.
Restoring:
http://www.mondorescue.org/docs/mondorescue-howto.pdf
In the days of tb 2.0 I wrote up a how-to describing using mondo to make iso images of the trixbox server. trixbox 2.0 runs on Centos 4.4 and mondo is fine on that. When trixbox 2.2.x came along and moved to Centos 4.5 mondo refused to work and I get errors about not finding libc.so.6 and libpthread.so.0. I got involved and posted questions on the mondo forum - I was unable to fix the problem with mondo and tb 2.2.9 etc and ran out of time. I understood that there were problem with mindibusybox but I could not see how to fix them. It seems that there is a conflict in where various libraries are put.
Here is the thread that was going at the end of last year. I think mondo works OK with centos 5 so using it with current versions of trixbox would be OK.
thanks John,
ya - they have some versioning problems, i am going to try an older set of mondo/mindi to see if it excepts the older GLIBC 2.3x that centos 4.5 has.
It seems to work great on CentOS 5. I have put it on 3 machines from 2.4-26 so far without issue. My old 1.2.3 test box also worked, but its highly hacked up with lots of mods and updates, I am not sure how well it matches the original install of 1.2.3, so its probably not a good example.
-John Hyde
well it seems to be not very successful - mindi seems to be very hardware dependent, i am finding mindi will error out during boot iso creation on many platforms complaining of:
making 16384KB boot disk...............udev device manager found WARNING: No Hardware support for
- at this point, it seems to be locked up, if you check the log mondo is running mindi in the background (you cant see it) and mindi is asking you to press 'enter', i press enter, and it seems to crash.
however if i run mindi manually, and tell it not to use lilo, it seems to be successfull.
funny - on a dell 860 it even said:
making 16384KB boot disk...............udev device manager found WARNING: No Hardware support for PE860
on others it just says no support for blank.
trying the previous version of mindi:
mindi-2.0.0-1.rhel5.i386.rpm didnt seem to fix this.
hmm -stumbled upon this http://wiki.systemimager.org if you have another nix server on the farm - most of my sites dont:(
the script should have made the file backup automatically, from your command line do:
ls /backup
if it says file not found then the script failed somewhere.
correct this by typing this on your linux prompt:
mkdir /backup
Otherwise its most likely a sharing issue on your windows server, or how you entered the share details in /etc/cron.weekly/mondobackup.cron
Also, make sure you edited the cron job correctly, sometimes its easier to check it out on a windows computer using winscp.
you can also download the cron script fresh by itself here:
wget http://www.astusers.org/mondocron.tgz
tar -xzvf mondocron.tgz
rm /etc/cron.weekly/mondobackup.cron
mv mondobackup.cron /etc/cron.weekly/mondobackup.cron
chmod +x !$
now edit it again
all I get when running this is total 0??
This is how my script looks.
#!/bin/bash
#
##############################################################################
#This is a mondobackup file that will create a complete backup of your server
#and copy it to a USB stick, an ftp site, or a windows share.
#This should work on most CentOS 5 or RHEL 5 compatible systems
#- mileage may vary
#
#This script is for the community, and thus will be by such.
#While there is no guaranteed support, you can post/refer to
#this forum link for support from the community peers:
# http://www.trixbox.org/forums/trixbox-forums/trixbox-projects/who...
# or see docs here: http://mondorescue.org
#
#All credit goes to the community
#"picking up open source where the source got closed"
#
##Scroll down to edit variable until you see "Don't edit below this line"
##############################################################################
##############################################################################
#LICENSE
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
###############################################################################
#
#REVISIONS
#May 5, 2008 rev 0.1
############################VARIABLE DEFINITIONS BEGIN########################
#<<<<<<<<<<<<<<<<<<<<<<
#USB Mount Point
#This can be modified if you understand how
USBMOUNTPOINT="/mnt/usbmondo"<<<<<<<<<<<<<<<<<<<<
#StickDeviceName
#This may have to be modified depending on what
#the OS assigns to your USB Flash Drive
USBDEVICENAME="/dev/sda1"
#<<<<<<<<<<<<<<<<<<<<<<
#<<<<<<<<<<<<<<<<<<<<<<
#This must be an ip address ONLY Machine names are not acceptable
#THIS MUST BE CHANGED
SMBMACHINE="10.10.1.109"<<<<<<<<<<<<<<<<<<<<
#This is the name of the share on the remote machine
#THIS MUST BE CHANGED
SMBSHARE="tbback"
#This is the local mountpoint name and path
#this is created by the install-mondo.sh
#DO NOT CHANGE!
LOCALMOUNT="/mnt/smbmondo"
#This is the User name on the remote machine
#for example your username on the windows machine where you are copying the files to
#THIS MUST BE CHANGED
SMBUSER="Rob"
#This is your password on the remote machine
#For example your password that corresponds to the username on the remote
#windows machine you are copying files to.
#THIS MUST BE CHANGED
SMBPASS="********"
#<<<<<<<<<<<<<<<<<<<<<<
#<<<<<<<<<<<<<<<<<<<<<<
#This should be the user name on the remote ftp machine
USERNAME="ftpuser"<<<<<<<<<<<<<<<<<<<<
#This should be the remote ftp password.Change if needed
PASSWORD="ftppassword"
#this should be the remote directory you wish files to go
#into on the ftp server
#Change if needed
REMOTEDIRECTORY="/"
#this is the IP address or Fully Qualified Domain Name FQDN of the ftp server
#Change to where you are sending your backups
SERVER="ftp.server.ip"
#this is the local directory where files are located
#This must exist!
DIRECTORY="/backup"
#<<<<<<<<<<<<<<<<<<<<<<
#<<<<<<<<<<<<<<<<<<<<<<
#This is what folder/logfile to write logging information to
#CHANGE AS NEEDED
LOGDIRNAME="/var/log/mondobackup.log"<<<<<<<<<<<<<<<<<<<<
#this is a temp log file for mondo output as it tends to
#delete the original log when used
LOGDIRNAME1="/var/log/mondotemp"
#This contains the date/time
#DO NOT CHANGE
LOGDATETIME="$(date +%Y%m%d%k%M)"
#This is a formatting string to make reading the log easier
MPRETTY="======================================================="
#<<<<<<<<<<<<<<<<<<<<<<
#<<<<<<<<<<<<<<<<<<<<<<
#This section will allow you to mail the completed masterbackup.log
#to an external email address. NOTE YOU MUST HAVE YOUR MAIL SERVER
#Correctly configured and running or else this WILL NOT WORK!!!!!!!<<<<<<<<<<<<<<<<<<<<
#This is the external email you wish the logfile sent to
EMAIL="rpotthoff@fetco.com"
#<<<<<<<<<<<<<<<<<<<<<<
#<<<<<<<<<<<<<<<<<<<<<<
#Enable or disable the different backup methods below
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<><<<<<<<<<<<<<<<<<<<<
#Do usb flash drive backups 1=yes 0=no
#Change as needed
CPFLASH="0"
#Copy files to a remote SMB mount For example a windows server
#1=yes 0=no
#Change as needed
CPSMB="1"
#Do ftp backups 1=yes 0=no
#Change as needed
CPFTP="0"
#Remove yesterdays log. 1=yes 0=no
#change as needed Default is to REMOVE previous days log.
REMLOGS="1"
#Mondo Archive Size
#Choose either DVD or CDR for the backup size. This will depend on what your TB has
#as a boot device. Choose the appropriate size. If you are backing up to USB I recommend
#the DVD as the size. Default is CDR =670 mb ISO's DVD=4200mb ISO's
BACKUPTYPE="CDR"
#This choice allows you to specify the USB file system to mount. Most 8gb USB keys
#have a FAT32 fs already installed, however there is a problem with the fs ID bit. I
#recommend you format the key with the information contained in appendix
#One of the installation instructions
#DEFAULT=vfat
USBFS="vfat"
#Send log file via email 1=yes 0=no
#Change as needed Default is 0 or DO NOT SEND EMAIL
SENDLOG="1"
#<<<<<<<<<<<<<<<<<<<<<<
I removed the password for this posting only.

Member Since:
2006-06-02