Manual Backup3 en
Manual Backup3 en
February 2010
2
Copyright c iPortalMais
All rights reserved. February 2010.
The information contained in this document is subject to alterations without prior notice. Statements,
technical data, configurations and recommendations found in this document are supposedly precise and
reliable, but are presented without expressed or implicit warranties.
This document intends to demonstrate a couple of ways of doing backup on IPBrick, should there be
no backup drive. These are the two ways:
• Backup to USB disk;
• Backup to a shared folder in a Windows based machine.
In this first scenario there’s a USB disk connected to an IPBrick. First, it’s necessary to know in
which device is the USB disk. After establishing the connection between the USB disk to the IPBrick,
the console of the IPBrick will show the following messages:
usb 1-3: new high speed USB device using ehci hcd and address 2
scsi4 : SCSI emulation for USB Mass Storage devices
usb.agent[6670]: usb-storage: already loaded
Vendor: SKYMEDI Model: USB 2.0 Rev: 1.00
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 254208 512-byte hdwr sectors (130 MB)
sda: Write Protect is off
SCSI device sda: 254208 512-byte hdwr sectors (130 MB)
sda: Write Protect is off
sda: unknown partition table
Attached scsi removable disk sda at scsi4, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi4, channel 0, id 0, lun 0, type 0
sd mod: loaded sucessfully (for disk)
Written in bold is the indication of which device you’ll need for the next step. This same information
can be obtained through the command dmesg.
After knowing the device of the USB disk, it’s necessary to take these following steps:
3. Mount USB disk at /home1/ backupusb (where /dev/sda is the device formerly mentioned). Com-
mand:
mount /dev/sda /home1/ backupusb
4. Transfer the script rsync USB.sh to the IPBrick (ftp, samba,..);
5. Make it certain that you have permission to execute. Run:
chmod 755 rsync USB.sh;
6. Run the script sh rsync USB.sh.
• /opt;
• /etc;
• /var/lib/ldap;
• /var/lib/postgres;
• /var/lib/postgres2.
The benefit of this method is to allow incremental backups, the first backup to be done copies all the
data, i.e. total backup. If on the following day another backup is done, only the altered data is transfered.
The second method permits you to save a shared folder in Windows the data in the IPBrick. The
following directories are preserved:
• /etc;
• /var/lib/postgres*;
• /var/lib/ldap
• /opt;
• /home1;
• /home2.
1. Transfer the file win backup.tgz to the IPBrick (via FTP, Samba, etc)
• /opt/ipbox/backupSYS/ip+backupWIN;
The first step is to remove the comment from the following blocs of text. If you intend using
smbfs to connect to the shared folder, the comment should be removed from the last 5 lines of
the first bloc. If you intend to use cifs it’s necessary to remove the comment from the 5 lines
of the last bloc.
#SMBFS
#SRVTYPE=smbfs
#OUTSHARE=//server/sharename
#USER=domain\\login
#PASSE=password
#MNTOPTS=" -o username=${USER},password=${PASSE} "
#CIFS
#SRVTYPE=cifs
#OUTSHARE=//server/sharename
#USER=domain\\login
#PASSE=password
#MNTOPTS=" -o username=${USER},password=${PASSE} "