Sunday, January 20, 2008

Advertising

Check out the March 2008 issue of Smart Computing. We have the entire back cover! There is also a "redeem code" there for an extra $25 off our already discounted Ahsay prices.

Linux Plesk Backup

This is a continuation of our Linux command line backup blog post from January 2008.

Plesk has its own set of utilities for backup. So, simply run a pre-command with Ahsay's OBM client, backup the Plesk native file(s), and you're done.

Here's what to do:

#mkdir /pleskbackup

In the backup set, run this pre-command without the quotes:
"/usr/local/psa/bin/pleskbackup all /pleskbackup/pleskbackup"

In the backup set, you only need to backup this directory without the quotes:
"/pleskbackup"

NOTES:
--You don't need to enable in-file delta. The way Plesk writes the file causes 80-100% of the file to change. So, every backup will be a full backup.
--Backing up Plesk this way enables a full backup of files; customers; databases; spam settings; and so on. It's very comprehensive
--Read more on pleskbackup command if you need to backup a single account versus the entire server.
--We do not keep the Ahsay service running on any command line Linux server. We recommend running from crontab.

Saturday, January 12, 2008

Linux Server Causing Missed Backups

Some time back we had missed backup sets being sent out. Turns out the timezone on the Linux OBS was wrong. This could be the case for any OS server. Below is the quick timezone fix for linux:

--identify tmizone location from /usr/share/zoneinfo
--copy this file to /etc/localtime (replacing the file there) - that's it
--example, #cp -f /usr/share/zoneinfo/Europe/Vienna /etc/localtime

Another way if you're lucky: #system-config-date

This will make your online backup software reporting more reliable--with the correct timezone.

Saturday, January 5, 2008

OBM Client and Command Line Linux

Here are some nice to knows about running online backup software, Ahsay's OBM, client on a linux machine without X (GUI/Desktop). All actions are performed as user with root-level access below.


1. Create the backup account on OBS (backup server). Encryption key will be set later in this guide.
2. Create a backup set using the web console. Be sure to minimally fill out:
--Name
--Type
--Backup Source
--Backup Schedule
--"Run scheduled backup on computers named" ________ (use #hostname on the linux machine if you don't know the name)
--Retention Customization Policy
--After clicking update, click back on backup set to ensure everything is as you expect.


Staging
1. Place the install tar.gz on the linux machine
IE, #wget http://IPofOBS/obs/download/obm-nix.tar.gz where OBS is the main backup server.

Extract Install Files
1. #mkdir /usr/local/obm
2. #cd /usr/local/obmgunzip obm-nix.tar.gz
3. #tar -xf obm-nix.tar

Install
1. #./bin/install.sh >install.log
2. Look for any install issues #cat install.log
3. Ensure obm is now running. Should be output from: # ps -ef grep obm

Start Configurator to Associate Backup Account with Linux Machine
1. #sh /usr/local/obm/bin/Configurator.sh

NOTE: If you receive any java heap errors, the application is trying to use more physical memory than you have available.

HEAP Workaround: #cd /usr/local/obm/bin Use vi or whatever you like to replace Xmx512m or Xmx256m in both Configurator.sh and RunBackupSet.sh (only one entry in each). We've used Xmx32m in both files and it works fine.

2)
Login Name: username (account name that you created in the console)
Password: ******************* (password of account name)
Backup Server URL: backup.ahsaypro.com (for example)
Which Protocol ? (1) Http (2) Https : 2 (use https, ssl, unless there's a good reason not to)
Use proxy ? (Y)es or (N)o : N NOTE: if you enter N, the following will not show
Proxy Type ? (1) Http/Https Proxy (2) SOCKS : 1
Enter proxy server : aaa.bbb.comEnter proxy port : xxx
Enter proxy username (optional) : administrator
Enter proxy password (optional) : *******************

Encryption and Running on Computer

Found new backup set 'xxx' where xxx is the name of your backup set
Please enter the following values for this backup set:

Encrypting Algorithm ?(1) Twofish (2) AES (3) Triple DES (4) No encryption : 2 (personal preference)
Encrypting Key: *******************
Re-Enter Encrypting Key: ******************* NOTE: Never forget this password! Encrypting Mode ? (1) ECB (2) CBC : 1 (personal preference)
Run scheduled backup on this computer ? (Y)es or (N)o : Y NOTE: If you select N, the backup set will not run on a schedule on this computer.

Optional Running Backup Set

You don't have to run this now; however, it'll get your data protected now, and it'll prove all above worked.

# sh /usr/local/obm/bin/RunBackupSet.sh [BACKUP_SET]
where [BACKUP_SET] is the name of backup set to be run. IE, if you created BackupSet-0:

#sh /usr/local/obm/bin/RunBackupSet.sh BackupSet-0

Stopping and Starting Processes

If you need to manually stop / start process, create an executable file name.

Stop

#cat stop.sh
sh "/etc/init.d/obmscheduler" stop
sh "/etc/init.d/obmaua" stop

Start
#cat start.sh
sh "/etc/init.d/obmscheduler" start &
sh "/etc/init.d/obmaua" start &

------------------------------------------

If you don't want to use resources with leaving the scheduler running, use native cron in linux:

#crontab -e
0 0 * * * /usr/local/obm/bin/RunBackupSet.sh BackupSet-0

where first five entries are
minute
hour
day
month
week of year

and BackupSet-0 is the name of your backup set.