Home » Posts tagged 'backup'

Tag Archives: backup

The Most Versatile VoIP Provider: FREE PORTING

The Most Important Asterisk Component: It’s the Backups!

blank

You might think Backups are critical in the event of a catastrophic hardware failure. And you’d be right. But there are other equally important reasons to maintain current backups. If you decide to migrate to a new server platform, a current backup makes it a painless exercise. If you need to recover from a FreePBX® module upgrade that hosed your server, a current backup is critical. If you want to migrate to a newer release of Asterisk® or FreePBX, a backup is all that stands in the way of a potential nightmare or days of drudgery.

Depending upon your server platform, there are a number of backup methodologies. The most obvious one is Incredible Backup 16 which was used to build your initial Incredible PBX® 2020 platform. Next is Incredible Backup 2020 which is available on the new Incredible PBX Wiki. A third backup option is the FreePBX Backup & Restore Module which is included in all Incredible PBX 2020 builds. On cloud-based server platforms from CrownCloud, Vultr, and Digital Ocean, there’s a backup or snapshot option built into the platform. On Vultr and Digital Ocean servers, backups are an optional feature for an additional 20% monthly charge. On CrownCloud servers, a free snapshot is included in your $25 annual fee. Other cloud platforms have different backup options. For on-premise virtual machine platforms such as VirtualBox and VMware, there are snapshot and backup options built into the platform. And, of course, there are disk imaging backup options such as Clonezilla, Mondo Rescue and dozens of other Linux backup solutions. Today we want to walk you through which backup alternatives work best depending on platform and the level of protection desired.

Incredible PBX 2020 Backup & Restore

As noted, Incredible PBX 2020 Backup & Restore is the newest release of backup and restore utilities for Incredible PBX 2020 platforms. It’s available for download from the Incredible PBX Wiki. To make a backup, run: /root/incrediblebackup2020. You would typically use it to recover from a catastrophic hardware failure or to migrate your PBX to a new, compatible platform such as moving from CentOS 7 on-premise hardware to a cloud-based CentOS 7 platform or migrating a VirtualBox installation to dedicated hardware. It backs up the entire web directory tree as well as all MySQL databases in addition to Asterisk files that you may have customized. It is well suited for restoration of an Incredible PBX 2020 server setup onto the same operating system platform from which the backup was made. In other words, you wouldn’t use it to restore an Incredible PBX 2020 server from a CentOS 7 platform to a Raspberry Pi platform or vice versa. Before restoring an Incredible PBX 2020 backup, you must first build the new server with the same operating system, Asterisk, and FreePBX versions as the backup image, i.e. a new Incredible PBX 2020 installation for CentOS 7 or Raspbian 10. Next, install the Incredible PBX 2020 Backup & Restore components. Finally, copy your Incredible Backup 2020 image to the /backup folder of the new server and then run: /root/incrediblerestore2020.

FreePBX Backup & Restore Module

The FreePBX Backup & Restore Module is included in all Incredible PBX 2020 servers. It is accessed by logging into the FreePBX GUI as admin and navigating to Admin -> Backup & Restore after creating a Storage Location with Settings -> Filestore. For example, to create a backup directory in /var/spool/asterisk, the Local filestore entries would look like this:

blank

The typical use case would be to recover from a module update scenario that went awry, to migrate from one FreePBX 15 platform to a new one with an incompatible operating system, e.g. to move from a Raspberry Pi to a CentOS 7-based server. It is also useful for upgrading from an Incredible PBX 13-13 platform to Incredible PBX 2020 but, for this to work, you must first remove the OSS Endpoint Manager module on the Incredible PBX 13-13 server.

To restore a FreePBX backup onto a new platform, repeat the steps above to set up the FileStore on the new server. Then copy the backup image from /var/spool/asterisk/backup to your desktop. Next, run the Restore option on the new platform and upload the backup image from your desktop.

Cloud Server Backups & Snapshots

Depending upon your cloud hosting provider, the procedure to create backups and snapshots may differ. The important point to stress is that these backups and snapshots are extremely easy to create but typically are housed in the same network operations center and often on the same server as your PBX. The risks in using these backup and snapshot options as your sole recovery mechanism from a catastrophic failure should be obvious. When combined with an off-site Incredible Backup 2020 image, you’re protected from a NOC catastrophic failure.

VirtualBox Backups & Snapshots

On the VirtualBox platform, you’ll find the Snapshot utility under Machine -> Tools. The other option is a full backup which is accomplished in one of two ways. For an external backup, choose File -> Export. For a backup in place, choose Machine -> Clone. The usual warnings about storing your backup images off-site apply.

VMware ESXi Backups & Snapshots

On the VMware ESXi platform, you’ll find the Snapshot utility under Actions -> Snapshots. To make an external backup, go to Actions -> Export. The usual warnings about storing your backup images off-site apply.

Installing Mondo Rescue for CentOS 7

The Mondo Rescue install for CentOS 7 is dependent upon a repository that is difficult to ascertain to put it charitably. Here is the correct installation procedure for CentOS 7:

cd /etc.yum.repos.d
wget ftp://ftp.mondorescue.org/centos/7/x86_64/mondorescue.repo
yum install mondo

For the backup and restore process using Mondo Rescue, follow this TecMint tutorial once you complete the install above.

Cloning a Raspberry Pi microSD Card

Our Incredible PBX 2020 for Raspberry Pi tutorial documents the easiest method for backing up your Raspberry Pi. We are repeating it here for completeness.

blank

rpi-clone is a utility that makes it easy to make a bootable image of the microSD card used to start your Raspberry Pi. You’ll need a USB-to-microSD adapter to begin. Insert a backup microSD card large enough to hold all of the data on the primary microSD card (df -h). Insert the USB stick with the card. Identify the backup microSD card, usually sda (fdisk -l). Format the backup microSD card: mkfs.vfat /dev/sda1 && mkfs.ext4 /dev/sda2. Then issue the following command to clone the primary microSD card: rpi-clone -f sda. Tutorial here.
 

Originally published: Monday, November 23, 2020


blank
Need help with Asterisk? Visit the VoIP-info Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

blankBOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

blankThe lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

blankVitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

blankSpecial Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



blank

Incredible PBX Backup & Restore for Cloud-Based Servers

blank

One of the perplexing realities with VoIP-based servers is how few people actually back up their systems. For anyone who has ventured into the IT world over the past 40 years, there’s one maxim worth remembering: "It’s not a question of whether your server will fail. It’s only a question of when." Incredible PBX® always has provided a backup mechanism in standalone servers to recover from disasters. But then cloud-based computing came along. Two of our favorite providers, Digital Ocean and Vultr, offer a backup snapshot option for 20% of the monthly cost of your platform. But many others do not. And snapshots in the same facility only insulate you from catastrophic failures that don’t take down the entire facility. Think: DNS, bombs, floods, earthquakes, hurricanes, and disgruntled employees.

We obviously can’t solve all of the world’s problems. But what we can do is provide a generic backup mechanism that will work with most cloud implementations of Incredible PBX. It allows you to make a complete backup of your server, copy the image off site, and restore it at another cloud location or by deploying a virtual machine in your home or office with VirtualBox®. Today we’ll show you how.

blank

Methodology. We’re assuming you are using the latest Incredible PBX 13-13 platform with either CentOS® or Scientific Linux™ 6 or 7 running Asterisk® 13. We’re also assuming your primary server is cloud-based. Your backup server can be cloud-based or a virtual machine running under VirtualBox on a desktop PC. The trick is to build the backup platform at or near the creation time of your primary server so that both are using nearly identical Linux components, the same version of Asterisk, the same version of Incredible PBX, and the same versions of the 1,000+ packages that comprise an Incredible PBX VoIP platform. This is easy at the time you create your primary server. It’s much more difficult 5 or 10 years down the road. So don’t be a procrastinator. Build your backup platform. And do it now! In the case of VirtualBox, you can create the virtual machine and turn it off until that rainy day occurs. It won’t cost you a dime other than a little disk storage space.

Overview. Here are the 5 Steps to put your backup implementation plan into place:

  1. Build & Configure Incredible PBX 13-13 Primary Server in the Cloud
  2. Build Barebones Incredible PBX 13-13 Server at Secondary Site
  3. Make a Backup of Your Primary Server Every Week
  4. Copy Weekly Backup Image to One or More Off-Site Locations
  5. Periodically Test Restoring Backup to Secondary Server

1. Build & Configure Primary Server

We’ve covered the procedure for building an Incredible PBX 13-13 server starting from a CentOS platform or from the Incredible PBX 13-13 ISO. We continue to recommend the CentOS or Scientific Linux 6.9 platform. Whether to create a Lean, Mean implementation or the Whole Enchilada is your call to make. Configure your Extensions, Trunks, and Routes, and you’re ready for business.

2. Build a Barebones Secondary Server

The hardest part of Step #2 is deciding where to build your secondary Incredible PBX 13-13 server. It doesn’t need to be in the cloud unless you prefer that option. Part of this decision may turn on how many servers you actually support. If you have a dozen primary servers, then it probably makes sense to add #13 as your backup server. Then it will be available in case of a failure of any of the other servers. Just make sure it’s in a location 1,000+ miles away from the primary server which should provide ample protection from North Korea’s Rocket Man. You can install the Lean, Mean version of Incredible PBX 13-13 with no additional configuration. Make sure the version of CentOS or Scientific Linux matches your primary server. As noted, VirtualBox is a perfectly adequate backup platform.

3. Make a Weekly Backup of Primary Server

We’re offering the following script for your use pursuant to the GPL2 license. By using the script at no cost, you agree to assume all risks and absolve us from any liability regarding bugs, performance, or any other failure in the code. If that’s acceptable to you, copy the commands below and create a backup-full script in the /root folder of your primary server. After saving the script, make it executable: chmod +x backup-full.

#!/bin/bash
# backup-full for Incredible PBX, Copyright (c) 2008-2018, Ward Mundy & Associates, LLC
# Licensed pursuant to GPL2. See /root/COPYING on any Incredible PBX server for details
amportal stop
service mysqld stop
service httpd stop
service sendmail stop
cd /
tar -cf /tmp/backup.tar /bin /etc /home /lib /lib64 /media /mnt /opt /root /sbin /usr /var
service sendmail start
service httpd start
service mysqld start
amportal start
tar --delete -f /tmp/backup.tar etc/udev/rules.d
tar --delete -f /tmp/backup.tar etc/sysconfig/network-scripts
tar --delete -f /tmp/backup.tar var/lib/dhclient
tar --delete -f /tmp/backup.tar etc/fstab
tar --delete -f /tmp/backup.tar etc/resolv.conf
tar --delete -f /tmp/backup.tar etc/hosts
tar --delete -f /tmp/backup.tar etc/hostname
gzip /tmp/backup.tar
echo "Your backup is available: /tmp/backup.tar.gz"
echo "Copy it and test it in a safe place OFF SITE"
echo " "


To run the script, execute the following command: /root/backup-full

We recommend running the backup-full script during hours when your PBX is not in active use since Asterisk and other services typically are shut down for 5-10 minutes. Depending upon the size and performance of your server, the backup typically takes 15-20 minutes. Once the backup script finishes, copy /tmp/backup.tar.gz to a safe place away from the primary server every week. You can automate the backup and the copying procedure with a cron job if desired. If your primary PBX doesn’t change regularly, alter the backup schedule.

UPDATE: As many of you appreciate, VMware platforms are a very different beast. The same is true of some cloud platforms which don’t play nicely with full backups from other environments. The telltale sign is abrupt reboots when you attempt to login to the web GUI using a browser. If you will be backing up FROM or restoring TO a VMware virtual machine or some other incompatible platform, here’s a workaround. The backup methodology needs to be adjusted to collect all of your PBX configuration data without messing with the underlying operating system configuration. This is similar to the original Incredible Backup methodology. You may also find it handy whenever you have a backup cloud server that is similarly configured to your main cloud server.

First, you need to assure that your versions of the major components are the same on both your primary and backup server. As noted before, the easiest way to do this is to build the two platforms simultaneously. If you plan to use either the Full Enchilada or Incredible Fax add-ons on your primary server, then they also need to be installed and configured on your backup server. Once the two servers are operational, you can shut down the backup server for the time being. Then make your customizations on the primary server and make a backup. The backup script above will work with the exception of the tar command line which should be replaced with the following (as a single line command):

tar -cf /tmp/backup.tar /var/www /var/lib/mysql /var/lib/asterisk /root /etc/asterisk /etc/crontab /etc/pbx /var/spool/asterisk /etc/freepbx.conf /etc/amportal.conf

The restore scenario outlined below will be the same for VMware-style backups except your passwords on the restored platform will be your original backup server passwords with the exception of your FreePBX® GUI and Apache web passwords which will be inherited from the primary server at the time of the backup image.

4. Copy Backup Image to Off-Site Location(s)

Once the backup script finishes, copy /tmp/backup.tar.gz to a safe place away from the primary server every week. You can automate the backup and the copying procedure with a cron job if desired. If your primary PBX doesn’t change regularly, alter the backup schedule.

5. How to Restore Backup to Secondary Server

Before patting yourself on the back from having made a successful backup, let’s try restoring it to your secondary server to be sure everything still works. Here are a couple of tips before we get started. First, in the event of an actual emergency, you will find recovery is simplified if you use fully-qualified domain names in registering extensions to your primary server. In this way, you can simply alter the IP address of the FQDN in your DNS server to point to the backup server without having to reconfigure every extension on your PBX. Second, trunks that are registered from your primary PBX will automatically be registered from your secondary PBX when you bring it on line. For that reason, test your secondary server during non-working hours and always be sure to shut down Asterisk on the primary server (amportal stop) before bringing up your secondary server. Finally, trunks that are supported by IP address configuration rather than registration will need to be manually reconfigured with the secondary IP address before they will be available for use.

We’re offering the following script for your use pursuant to the GPL2 license. By using the script at no cost, you agree to assume all risks and absolve us from any liability regarding bugs, performance, or any other failure in the code. If that’s acceptable to you, copy the commands below and create a restore-full script in the /root folder of your backup server(s). After saving the script, make it executable: chmod +x restore-full.

#!/bin/bash
# restore-full for Incredible PBX, Copyright (c) 2008-2018, Ward Mundy & Associates, LLC
# Licensed pursuant to GPL2. See /root/COPYING on any Incredible PBX server for details
amportal stop
service mysqld stop
service httpd stop
service sendmail stop
chattr +i /etc/resolv.conf
cd /
tar zxvf /tmp/backup.tar.gz
echo "Shut off Asterisk on primary server now."
read -p "Press any key to continue with reboot..."
reboot

To restore the backup, begin by copying the backup.tar.gz file to /tmp on your backup server. Then run the script you created above: /root/restore-full.

Once the restore is completed, your server will reboot. Log back in using the credentials from your primary server and make sure everything is working.

NOTE: If your primary server is using eth0 for its Ethernet connection and your backup server is using venet0, then you’ll need to modify /etc/sysconfig/knockd and then restart PortKnocker on the backup platform: service knockd restart. The command to add looks like this:

OPTIONS="-i venet0:0"

If you’re backing up from a venet0 platform and restoring to an eth0 platform, then you’d need to reverse the process by removing the above entry from /etc/sysconfig/knockd and restarting PortKnocker. Enjoy!

Published: Tuesday, January 23, 2018



blank

NEW YEAR’S TREAT: If you could use one or more free DIDs in the U.S. with unlimited inbound calls and unlimited simultaneous channels, then today’s your lucky day. TelecomsXChange and Bluebird Communications have a few hundred thousand DIDs to give away so you better hurry. You have your choice of DID locations including New York, New Jersey, California, Texas, and Iowa. The DIDs support Voice, Fax, Video, and even Text Messaging (by request). The only requirement at your end is a dedicated IP address for your VoIP server. Once you receive your welcome email with your number, be sure to whitelist the provider’s IP address in your firewall. For Incredible PBX servers, use add-ip to whitelist the UDP SIP port, 5060, using the IP address provided in your welcoming email.

Here’s the link to order your DIDs.

Your DID Trunk Setup in your favorite GUI should look like this:

Trunk Name: IPC
Peer Details:
type=friend
qualify=yes
host={IP address provided in welcome email}
context=from-trunk

Your Inbound Route should specify the 10-digit DID. Enjoy!


blank
Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

blankBOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

blankThe lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

blankVitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

blankSpecial Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



Some Recent Nerd Vittles Articles of Interest…

Sleep Well: Create a $10.50 Incredible Backup Server in the Cloud with WebDAV

With the impending demise of Copy.com, it seemed like a good time to revisit the subject of backups and to do a little advance preparation for that rainy day when your Incredible PBX™ server decides it’s taken its last breath. We recently documented how to build an Incredible PBX in the Cloud for a one-time cost of $10.50. And we showed you how to build a Linux Sandbox in the Cloud for the same bargain-basement price. Today, we’re adding a third way to spend one day’s lunch money with our new Backup Server in the Cloud at CloudAtCost. And, like the other two, a one-time investment of $10.50 gets you a 10GB cloud repository to store your most important Asterisk® files for life!1 If you’re feeling really adventurous, you can double or quadruple your resources and your storage capacity at the same great 70% off rates with CloudAtCost coupon code: TAKE70. Some have asked us for a referral code to give credit where credit is due. Thanks for thinking of us, but we already have all of the CloudAtCost resources we could ever use. So this one, like the two before it, is on us!


https://youtu.be/INVaNT1R_jE

We recommend you start by building an Incredible PBX platform at CloudAtCost using our previous tutorial. Is it production-ready? Probably not. Is it a good standby server which can swing into action when your primary server croaks? Absolutely. Can it be used for off-site storage of backups from your primary Incredible PBX server? You bet. And today we’ll show you how. It’s about a 10-minute process once you have Incredible PBX up and running in the Cloud. We’ll also provide an updated Incredible Backup script to transparently upload backup images to your new CloudAtCost backup server.

Got DAV?It’s been quite a while since we first explored WebDAV back in 2005. Today we’re going to bolt on WebDAV to your existing Incredible PBX platform so that some of that spare storage space in the Cloud can be used to house snapshot images of your Incredible PBX production server. Since this will be a fully-functioning Incredible PBX server in addition to serving as a backup server, it can perform double-duty as a hot standby on a moment’s notice. When disaster strikes, restore the latest backup which happens to be colocated on your Cloud server, and you’ll be back in business.

Overview. As you probably know, WebDAV is an acronym for Web-based Distributed Authoring and Versioning. Simply put, it is an HTTP protocol extension that allows people anywhere on the Internet to edit and manage documents and other files using the same protocol and port used for surfing the web. In the Mac and Linux worlds, WebDAV provides a Disk Volume that “looks and feels” like any other networked hard disk. In the Windows world, WebDAV is called Web Folders. They can be used like any other mapped drive in Network Neighborhood. If you’re still a little fuzzy about the WebDAV concept, think of how you link to another drive on your local area network. WebDAV gives you the same functionality across the entire Internet with virtually the same ease of use. Depending upon user privileges, of course, you can copy files to and from a WebDAV volume, and the protocol imposes versioning control through file locking to assure that multiple people with access rights don’t change the same file at the same time.

Initial Setup of WebDAV in the Cloud. For today, we’re assuming you already have a functioning Incredible PBX server at CloudAtCost running under CentOS 6.7. If not, start with our tutorial here. If you’d prefer to use the Linux Sandbox configuration for your WebDAV platform, skip down to the next section. To keep things simple, we’re going to set up a separate dav directory within your existing Incredible PBX cloud server to use for WebDAV storage. This means files and folders managed with WebDAV will appear in /var/www/html/dav on your server. We’ll password-protect the directory using Apache web credentials for the admin user. You first must set up these credentials by issuing the following command while logged into your server as root:

htpasswd /etc/pbx/wwwpasswd admin

To activate WebDAV on your Incredible PBX server at CloudAtCost, while still logged into your server as root, issue the following commands:

mkdir /var/www/html/dav
chown asterisk:asterisk /var/www/html/dav
chown asterisk:asterisk /var/lib/dav
cd /etc/pbx/httpdconf
wget http://incrediblepbx.com/dav.conf
service httpd restart

Keep in mind that WebDAV is running on an Incredible PBX server which means that remote HTTP access will require that your remote IP address be in the IPtables WhiteList. You can add it easily using the add-ip or add-fqdn utilities in /root. Don’t forget, or none of this will work.

Setting Up WebDAV on a CloudAtCost Linux Sandbox. If you’d prefer to set up WebDAV on a Linux Sandbox at CloudAtCost rather than the Incredible PBX platform, begin by installing the sandbox by following along in the Nerd Vittles tutorial. Once you’re up an running, issue the following commands to activate WebDAV:

mkdir /etc/pbx
htpasswd -c /etc/pbx/wwwpasswd admin
mkdir /var/www/html/dav
chown apache:apache /var/www/html/dav
cd /etc/httpd/conf.d
wget http://incrediblepbx.com/dav.conf
service httpd restart

You won’t have to whitelist the IP address of your local Incredible PBX server in the IPtables firewall running on your WebDAV server at CloudAtCost because port 80 already is whitelisted in the default Linux Sandbox setup.

Accessing WebDAV in the Cloud. As installed, you’ll need your username (admin) and your Apache password assigned above to access your WebDAV server in the Cloud. Use a browser for read only access to the dav directory at the IP address of your server, e.g. http://23.45.67.89/dav. Or establish a network share to the WebDAV resource for read and write access.

Configuring a Local CentOS/SL Server for WebDAV Access. Linux needs something special in order to treat remote WebDAV resources as part of your local file system. Fortunately, there is a packaged solution that does all the heavy lifting for you. On every CentOS/Scientific Linux server from which you want to access remote WebDAV resources, issue the following commands while logged into the server as root:

yum -y install davfs2
mkdir /dav
cd /root
wget http://incrediblepbx.com/incrediblebackup-dav
chmod +x incrediblebackup-dav

Configuring a Local Debian/Ubuntu/Raspbian Server for WebDAV Access. The setup drill is much the same as it is for CentOS except the package installation syntax needs to be adjusted. On every Debian, Ubuntu, or Raspbian (Raspberry Pi) server from which you want to access remote WebDAV resources, issue the following commands while logged into the server as root:

apt-get -y install davfs2
mkdir /dav
cd /root
wget http://incrediblepbx.com/incrediblebackup-dav
chmod +x incrediblebackup-dav

Connecting to Your WebDAV Server in the Cloud. The new Incredible Backup script, /root/incrediblebackup-dav, will automatically make a connection to your new WebDAV server in the Cloud once you’ve entered your admin credentials and the IP address of your WebDAV server. Do this by editing incrediblebackup-dav. Just plug in your admin password and the IP address of your WebDAV server in the Cloud. Then save the file.

In case you’re curious, here is the command to access WebDAV as a file system from your local server. Assuming admin:passwd555 were your remote Apache credentials and 23.45.67.89 was the IP address of your CloudAtCost server, the mount command would look like this:

echo passwd555 | mount.davfs http://23.45.67.89/dav /dav -o username=admin

All of the /dav files on the WebDAV server in the Cloud then would be accessible in the /dav directory on your local server until the WebDAV connection was closed/unmounted. You can add, edit, and delete files and directories. All of your local changes will automatically be synchronized with your WebDAV server in the Cloud.

To close the WebDAV connection, issue the following command:

umount.davfs /dav

Making a Backup to Your WebDAV Server in the Cloud. This is the easy part. Once everything is in place and you have configured the Incredible Backup script with your admin credentials and WebDAV server’s IP address, you’re ready to kick off a backup. Just issue the following command while logged into your server as root:

/root/incrediblebackup-dav

Restoring a Backup from Your WebDAV Server in the Cloud. There are two ways to do this. If your local server and Cloud-based server are running identical versions of Incredible PBX, then you can restore the backup image to your Cloud server and run Incredible PBX in the Cloud. Simply move the desired backup file from /var/www/html/dav on the Cloud server to /backup and then run incrediblerestore from the /root folder. Once the restore completes, reboot your Cloud server, reconfigure the IP addresses of your phones, and you’re back in business.

If you’d prefer to restore a backup from the Cloud to a local server, then you would first build a new server to match the one from which the backup was originally made. Next, configure the new server to support WebDAV access to your Cloud-based server following the tutorial above. Then execute the following commands after logging into your local server as root. Use the credentials, IP address, and actual backup filename saved on your Cloud server:

mkdir /backup
cd /root
echo passwd555 | mount.davfs http://23.45.67.89/dav /dav -o username=admin
cp /dav/backupfilename.tar.gz /backup/.
umount.davfs /dav
./incrediblerestore /backup/backupfilename.tar.gz
rm /backup/backupfilename.tar.gz

WebDAV Cautionary Notes and Gotchas. First, WebDAV does a lot of heavy lifting under the covers because its intended for use as a collaboration tool by multiple people accessing and updating the same resources. So synchronization is important. When we’re moving huge files from a local server to the WebDAV cloud, this synchronization activity can give the appearance that your server has hung either during the backup procedure or thereafter. It hasn’t. So, after you run the Incredible Backup script to upload a new backup image, leave your server alone for a while. On your local server, don’t attempt to list /dav or otherwise use it for about an hour to be safe. On a Raspberry Pi, just be patient while the backup procedure completes. After that, you should be good to go. Depending upon the Linux flavor of your local server, the Incredible Backup script may not dismount your WebDAV resource successfully. You can do this manually LATER although it won’t hurt anything to leave the connection in place. As noted above, the dismount command is umount.davfs /dav.

Second, be very careful in configuring Incredible Backup to make certain that you specify the correct IP address for your WebDAV server in the Cloud. WebDAV will try to connect to any IP address, and you don’t want to inadvertently upload your backup files to someone else’s server. Third, ALWAYS use a web browser to access your WebDAV server in the Cloud after your backup completes to make certain that a backup with the current date and time is shown in the directory listing. Particularly with RedHat OS flavors, it may take some time for the entire tarball upload to complete even though the script will indicate it has finished. Again, patience is a virtue. Don’t reboot. Things will get sorted out in due course.

Finally, as with other network connections, if the WebDAV connection fails for some reason, your backup would be stored locally in the /dav folder rather than on WebDAV in the Cloud. That’s obviously not too helpful in the event of a local disk crash. So don’t forget to check your WebDAV server in the Cloud to verify successful completion of the backup.

Enjoy!

Republished: Monday, April 25, 2016




blank
Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

blankBOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

blankThe lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

blankVitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

blankSpecial Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



Some Recent Nerd Vittles Articles of Interest…

  1. The lifetime promise is, of course, in the eye of the beholder. It may be your lifetime but, more than likely, it’s the lifetime of CloudAtCost. The two are not necessarily the same so plan accordingly. 🙂 []

Incredible PBX Now Does Incredible Backups… and Restores

blankAlong with many of you, we have wrestled with getting reliable backups of our Asterisk®-based PBXs since the Asterisk@Home days. Flawless backups, of course, are worthless unless there's an accompanying flawless restore to get you back in business. Therein lies the rub. The number of minefields we've discovered along Restoration Way is legendary. A quick list includes incompatible hardware, changing device drivers, incompatible file storage systems, and on and on.

Update: Just released Incredible Backup 2 for PIAF2 systems.

What's really disturbing about all of this is that lack of adequate backups is the single component, in our opinion, that has kept open source PBXs from being a true match for commercial systems. People can't live without their phone systems... even if they're old and out of date. So, regardless of age, there has to be a way to bring your system back from the dead, or it's of little use in a production environment.

When we set out to create The Incredible PBX, one of our primary design goals was to come up with a system architecture that would let you use this new system for a decade. Yes, a decade! Not six months, not next year, but ten years from now your Incredible PBX would still be humming along. One way was to totally insulate the system from the Internet. Another key ingredient was rock-solid dependability. Remember that black phone in your grandma's house. It wasn't designed for replacement every six months. Nor was its underlying phone system. As the old adage goes: "If it ain't broke, don't fix it!"

In order to reach these design goals, we not only needed a backup system but also a way to separate your critical data from the underlying hardware. Why? Because the hardware continues to change every six months. What this backup solution is not is a full disk backup. Every full system backup solution we've tried simply isn't reliable unless the hardware on the new system is virtually identical to the hardware on the old one, a most unlikely scenario two or more years down the road.

blankHow It Works. The Incredible Backup and Restore works like this. You built a working Incredible PBX from a base PBX in a Flash install so we start there. To restore a system, you'll first reinstall PBX in a Flash on your new server. The actual version doesn't really matter so long as it works. And newer versions with the latest CentOS releases support newer hardware. This avoids most of the hardware pitfalls that usually accompany a failed restore process.

The next slippery slope was incompatible versions of FreePBX between your original system and your current server. We can always update Asterisk from source after the restore, but FreePBX was problematic because the structure of the MySQL database tables associated with different versions of FreePBX changes frequently. And your backup MySQL data might very well be in MySQL tables that don't match your original PBX in a Flash build. So Incredible Restore provides the option of first restoring the version of FreePBX that existed at the time you made your last backup.

Then there's the problem of incompatible network and email implementations. Incredible Restore provides options to let you choose whether to restore your old network and email settings. If your newly built PBX in a Flash server has functioning network and email connectivity, don't restore the old settings. Simple as that.

What we really care about is getting your data back including a functioning PBX. There's got to be a catch, right? For a pure VoIP PBX, everything should be fine. The gotcha is that there are hundreds of add-on cards to support all sorts of proprietary hardware as well as to access Ma Bell's PSTN network. You're on your own there. Just be sure you have copies of the software pieces needed to make your special hardware function again once we've completed the restore to your new server. The same goes for custom software such as Cepstral TTS and Amazon S3. The components necessary to reinstall these add-ons should still be in your /root directory after the restore so it's not really a big deal to put Humpty back together again. Our tutorial links are just above.

blank

Before we get to the installation, we want to put in a plug for PogoPlug. Not only is this the best thing since sliced bread, but it doesn't cost much more. You add this $99 (if you hurry) device to your LAN at home, at your office, or at a friend's house. Then connect one to four USB hard drives, and you have your own Cloud Computing Solution that also happens to be absolutely perfect for Incredible Backups and Restores. In fact, the setup software can be installed as part of the restore process. And the software already is included with every Incredible PBX. Just insert your login credentials, and the PogoPlug disk drives (regardless of location) are transparently added in the /mnt/pogoplug directory tree.

blankIt's GPL2! Last but not least, we've released both Incredible Backup and Incredible Restore as GPL2 open source modules. That means you not only can learn some bash scripting in your spare time but you also can embellish the scripts in any way you like to support your favorite add-ons. All we'd ask is that you upload a copy with your enhancements so that we can share your good deeds with the rest of the Asterisk community and incorporate your good ideas into the next release. Keep an eye on the comments to this article and the PIAF Forum for the most recent additions. Better yet, subscribe to the RSS Feed for Comments at the top of this page, and they'll be delivered to your door as they occur.

Overview. Here's the quick step-by-step to get things working:

1. Download the software onto Incredible PBX
2. Install your PogoPlug (optional)
3. Create a directory for backups
4. Enter directory location in IncredibleBackup script
5. Run IncredibleBackup to make backup
6. Purchase Machine #2 OR create new Proxmox KVM
7. Install latest PBX in a Flash
8. Run update-scripts and update-fixes
9. Download the software onto Machine #2
10. Create a directory to house backups AND
11. Copy backup tarballs to directory OR
12. Use PogoPlug and skip #10 and #11
13. Enter directory location in IncredibleRestore script
14. Run IncredibleRestore to restore backup

Using Incredible Backup. Installation couldn't be easier. On your Incredible PBX server, log in as root and issue the following commands:

cd /root
wget http://incrediblepbx.com/incredible.tar.gz
tar zxvf incredible.tar.gz

Once you decompress the tarball, you'll be left with two files: incrediblebackup and incrediblerestore. With both scripts, you'll need to edit them and insert the location of your backup directory. Before doing that, you need a dedicated backup directory which is not in the /root or /var/www directory trees. We don't need to tell you what a dumb idea it is to store your backups on the same machine you're backing up... so we won't. As noted, our recommendation is to use a PogoPlug and preferably at a location different from the site of your server. Whatever directory you choose, it needs to be accessible from your server. SAMBA also is available on PBX in a Flash systems to access other drives in your LAN, but it needs to be activated. Incredible PBX systems are totally insulated from the Internet by a hardware-based firewall so you're safe using SAMBA provided you trust other users on your LAN. Once the directory exists, edit the scripts and insert the location in backuploc: nano -w incrediblebackup. Save your change: Ctrl-X, Y, then Enter. Repeat process for incrediblerestore. To create an Incredible Backup, execute this command: /root/incrediblebackup. All of the backups are stored in compressed tarballs with a current time stamp, e.g. 1273067177.tgz. You can decipher the actual time of the backup with a command like this: date -d "@1273067177" --> Wed May 5 09:46:17 EDT 2010

REMINDERS: If you're using a PogoPlug, don't forget to run pogo-start.sh before running incrediblebackup.

If you wish to run incrediblebackup as a cron job, remember to comment out the following line in the script with a leading #:

read -p "To proceed at your own risk and agree to license, press Enter. Otherwise Ctrl-C."

Don't forget to also activate your PogoPlug as a cron job before the time that incrediblebackup is scheduled to run!

What To Back Up? As we mentioned previously, backups are the easy part. It's the restore process that causes premature aging. The best time to plan your restore strategy is before you need it! Always assume the worst case, i.e. that nothing is recoverable from your primary server. Then ask yourself whether the backup is capturing and saving in a safe location everything you'll need to put Humpty back together again. Currently, Incredible Backup captures the following files and directory trees:

/var/www/html /var/lib/asterisk /var/lib/mysql /root /etc/asterisk /tftpboot
/etc/pbx /etc/wanpipe /etc/sudoers /etc/odbc.ini /etc/odbcinst.ini
/var/lib/asterisk/sounds/tts /var/lib/asterisk/sounds/custom
/var/spool/asterisk /etc/amportal.conf /etc/wanpipe
/etc/hosts /etc/resolv.conf /etc/sysconfig/network-scripts/ifcfg* /etc/sysconfig/iptables /etc/sysconfig/network /etc/mail
/usr/local/bin /usr/local/sbin /usr/src and portions of /usr/sbin

Keep in mind that an Incredible Restore always begins with a functioning PBX in a Flash server. And you will have the option of restoring all Incredible PBX applications. With the exception of these applications, ask yourself whether the backup list above captures everything you've added to your server and is sufficient to meet your needs. With most Incredible PBX implementations, it should adequately restore an existing Incredible PBX together with your FreePBX customizations. But the beauty of open source software is that you can and should customize it to meet your specific needs. You can add any additional directories... so long as you do it and save the backup to some off-site location before your server dies. 😉

blank

The other important question to ask yourself is what is your Incredible PBX as presently configured worth to you. If the answer is more than $200, perhaps the time is ripe to purchase a second system for emergencies and test your restore strategy in advance.

Using Incredible Restore. Let's get the cautionary notes out of the way up front. First, by using this software, you have agreed to assume all risks including the risk of losing all your data. Second, don't experiment with restores to your primary system. Third, in the most emphatic way we can, we encourage you to test a restore before D-Day arrives... but not on your live system! If it means borrowing a friend's old clunker for the afternoon, then by all means do so. If you can afford a second system, that's even better. If you have a virtual platform at the office, borrow a little space for the weekend and try a restore. Proxmox works and so does VMware and most other virtual platforms. We don't mean to be all doom and gloom about this, but unfortunately backups are all about doom and gloom. Now's the time to find out something didn't work quite right, not when you really, really need it.

The first step in using Incredible Restore is to install PBX in a Flash on the new server. We recommend you also run update-scripts and update-fixes once the PIAF install is complete. As with Incredible Backup, the next step in using Incredible Restore is to log into your new server and download the application:

cd /root
wget http://incrediblepbx.com/incredible.tar.gz
tar zxvf incredible.tar.gz

Unless you're using a backup tarball from external location supported by SAMBA or PogoPlug, Step #3 is to create a directory on your new server and copy the backup tarball to that directory. Step #4 is to configure the incrediblerestore script with the directory location of the backup tarball to be restored. Once you've saved the location, run the script: /root/incrediblerestore. You'll be given the following options to tailor how the restoration process should proceed:

1. Whether to enable PogoPlug functionality on the server
2. Whether to restore FreePBX application from the backup
3. Whether to restore Incredible PBX apps to new server
4. Whether to restore Network Settings from the backup
5. Whether to restore SendMail Setup from the backup
6. Whether to restore Asterisk binaries and source code
7. Whether to disable outbound SIP/IAX connectivity

1. Enabling PogoPlug. If you're using a PogoPlug for your backups, you'll be prompted whether to install the PogoPlug software as first option when you run the IncredibleRestore script. Choosing Y will load the necessary software. Then it's a simple matter of entering your login credentials in pogo-start.sh and running pogo-start.sh to activate the PogoPlug. Then just rerun the IncredibleRestore script to continue.

2. Restoring FreePBX Application. Unless you are absolutely certain that the version of FreePBX in your backup matches the version on your new server, choosing Y for this option is highly recommended. Otherwise, the structure of the FreePBX MySQL tables may differ and cause all sorts of difficult to diagnose problems.

3. Restoring Incredible PBX Applications. If your backup was made on an Incredible PBX server, then the Incredible PBX apps should be restored to your new server. We've made this optional only to accommodate those who may wish to tailor the scripts to support other Asterisk distributions.

4. Restoring Network Configuration. If you're recovering from a catastrophic failure and want to make certain that a static IP address is preserved when you restore your backup, then you obviously would want to restore your network configuration. If you're building a duplicate system to be kept off line or if you're moving your server to a virtual machine platform, then you probably do NOT want to restore the network configuration from your primary machine. A good rule of thumb probably goes like this. If network connectivity already is working on your new server, don't restore the network setup from your backup.

5. Restoring SendMail Setup. The only situation in which you would want to restore the SendMail setup from your primary server is if you have specially tailored SendMail on the primary server in order to send email. This typically would happen where an Internet service provider blocks outbound SMTP traffic, e.g. Comcast residential Internet service.

6. Restoring Asterisk Binaries and Source. This functionality is EXPERIMENTAL AND BARELY TESTED!! It only works (at all) with Asterisk implementations still using Zaptel, not DAHDI. Unless your primary server was running a version of Asterisk that differs from the default PBX in a Flash build, the correct answer to this prompt is N. Never use this option if you are restoring from a catastrophic failure. Instead, run update-source and update-fixes on the newly restored server. It's safer! We'll keep you posted on future developments.

7. Disabling Outbound SIP/IAX Connectivity. This option allows you to disable outbound SIP and IAX traffic on the new server. Typically, you would use this if the server on which the backup was made is still on line. The reason is to avoid having two identical servers compete for connections to SIP and IAX providers. If this option is chosen and you subsequently take your primary server off line, then you will need to enable SIP and IAX connectivity on the newly restored server before it can take over primary duties. To do this, log into your new server as root and issue the following commands:

cd /etc/sysconfig
cp iptables.sip iptables
service iptables restart

To again disable SIP and IAX outbound traffic, issue the following commands:

cd /etc/sysconfig
cp iptables.nosip iptables
service iptables restart

Feedback and Suggestions Encouraged. Incredible Backup and Incredible Restore are still very much works in progress. A number of folks on the PBX in a Flash Forums have assisted us in getting version 1.0 out the door today, but don't bet the farm on this software until you have carefully tested it using a redundant server! We will continue to improve/enhance the functionality for weeks and perhaps months to come. And, until the kinks are all worked out, we would strongly encourage you to download the latest and greatest version each time you make a backup or undertake to restore a backup to a new system. During this development period, we also would encourage you to make suggestions and to offer enhancements. After all, that's what open source is all about. Enjoy!


blank
Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


whos.amung.us If you're wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what's happening. It's a terrific resource both for us and for you.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

blankBOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

blankThe lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

blankVitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

blankSpecial Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

Introducing PogoPlug: Cloud Computing for $100 per Terabyte

Introducing PogoPlug

Ever wished you could build and manage your own Cloud Computing Center with minimal cost and no recurring charges… ever? Well, today’s your lucky day.

It takes a lot to get us excited about a new product offering. But this one is a real winner! For under $130, Cloud Engines provides you your very own PogoPlug 2.0 device that connects to your router and shares up to four USB drives over the Internet. At today’s prices and ignoring sales tax, that means you can put eight terabytes of Cloud Storage on line for a one-time cost of about $100/terabyte. To give you a point of reference, Google will rent you the same space for $256/terabyte… per year. And Google is one of the least expensive Cloud Computing resources out there. Here’s the math for naysayers:

4 – WalMart1 2TB WD MyBook Drives @ $169 each = $676
1 – PogoPlug 2.0 Device @ $129 each = $129
ONE-TIME, NON-RECURRING COST: $805/8TB or $100/TB

For those that don’t need 8 terabytes, the 2 terabyte setup including the drive and PogoPlug device is still just over half the one-year rental rate of equivalent storage from Google. And, just to be clear, this isn’t merely a storage device (like Amazon S3) requiring downloads before the files can actually be used. PogoPlug’s software makes these USB drives an integral part of your Desktop just like any other attached storage devices. Think WebDAV! So it makes a perfect home for your music, movie, and photo collections. There also are loads of Open Source applications for PogoPlug for those that like to tinker. And you can use PogoPlug to keep synchronized backups of your important files.

Other Options. Be aware that for about $50 less, you can purchase the Seagate FreeAgent DockStar Network Adapter which includes a single year of PogoPlug Internet support. After that, it’s $30 annually. Translation: By the end of the second year, you’re better off with the PogoPlug. So the choice is a No-Brainer in our book. But, the fact that Seagate is also standing behind the PogoPlug design should make everyone sleep more soundly.

Deployment. After a one-minute, one-time setup over the Internet, you can securely access all of your USB drive resources via PogoPlug using either a web browser or one of several free desktop applications that are available for Windows, Mac OS X, Linux as well as Android phones, iPhones, and (earlier today) Blackberrys. And you get free support and a terrific forum. The device works flawlessly behind either a DSL or cable modem AND a NAT-based router so there are no firewall issues to address. Just enter the serial number on the bottom of your device when you access the PogoPlug web site, and configuration is automatic.

Uploading Files. One of PogoPlug’s slickest features is its automatic cataloging of files which are uploaded. Once uploaded, you can view your Music, Movies, and Pictures by simply clicking on one of the buttons. Photos are cataloged into directories by the month in which the photos were taken. Music is indexed by artist, album, and genre. In addition, music by artist, album and genre as well as photo albums can be shared by entering email addresses for those that can access the materials, by enabling public viewing (assuming you have legal rights to do so), or by sharing items using your Twitter, Facebook, and MySpace credentials. We’ve shared a photo album just to give you an idea of how this works. The security and logistical nuts and bolts all are managed by Cloud Engines’ servers. You can review and modify the materials you’re sharing by clicking on the Files I Share link in your browser. Finally you can automatically alert those with share privileges when folder content is updated. Very slick!

Give PogoPlug a try. By clicking on one of our links, you also help support the Nerd Vittles project. We think you’ll be as thrilled as we are with this terrific new creation. Enjoy!


blank
Need help with Asterisk®? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


whos.amung.us If you’re wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what’s happening. It’s a terrific resource both for us and for you.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

blankBOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

blankThe lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

blankVitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

blankSpecial Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest…

  1. The in-store pricing at WalMart is actually cheaper than on line for these particular drives. []

Meet The iPhone Terminator: The World’s Best Mobile Phone

Photo courtesy of HTC and androidcommunity.com

With apologies to Arnold’s infamous line, all we can say to iPhone enthusiasts of the world is that once you try this Android phone, you won’t ever go back. Google has done for the mobile phone what Apple did with Mac OS X except Google also opened up the hardware platform. Unfortunately, Apple opted for locked and proprietary hardware and software in rolling out its iPhone. Now that the second-generation Android phones are appearing, the difference is palpable.

Update. There’s now a third-generation Android phone that’s even better than this one. You can read all about it in our latest article.

Choosing the World’s Best Cell Phone is obviously fraught with peril. All other things being equal we would have bestowed the honor on Nokia’s E71 which we reviewed recently and have personally used until a month ago. That’s when we jumped into the Android World which we will tell you up front is still a bit of a work in progress. But, all we can say is WOW! The openness, the technology, and the creativity showcased in the new Android phones point to an inescapable conclusion. Google once again has struck the Mother Lode. Seeing is believing as they say. And today we’ll digress from our usual format to bring you a pictorial tour of the HTC Magic. No. You don’t have to carry a white one like Arnold. Heh. A shiny black one is readily available. We actually had planned to walk through the process of rooting the phone, but we’ll leave that for another day primarily because this mobile phone provides sufficient flexibility in its native state to deliver an almost perfect cellphone experience even without root access.

blank

We’ve already covered our objections to the iPhone in a previous article so we won’t repeat them here other than to note that SIP clients can’t run in the background on an iPhone which makes them next to worthless for inbound calls. Yes, there are kludgey workarounds, but these open yet another can of worms. We’ll dispose of the Nokia product line by telling you they’re headed in the wrong direction just like Microsoft with the wrong operating system(s), the wrong product design, and the wrong technology mix. Just when the world is finally looking for a mobile platform that provides flexibility in transitioning between the cellular networks, WiFi, and WiMax, Nokia kills the SIP stack and SIP client on its entire line of new cellphones. So a company that once was THE innovative cell phone manufacturer in the world suddenly is looking a bit like Yahoo, lots of thrashing around but no cigar. Sadly, it’s mostly the result of self-inflicted wounds. But we’re not going to dwell on the past today. We’re going to look at what the future holds in mobile communications. And the one word that best sums up our hopes for future mobile telephony is Google… more precisely, Google’s totally open source Android Platform.

blankSo let’s again go about this by the book… with a requirements analysis! You can match it to your own wish list. We want a cellphone that makes cellular calls from most locations, and we want the ability to decide which cell provider we use depending upon where we are. We want the option to make phone calls through our own SIP provider, or Asterisk® server, or Google Voice whenever we feel like it with or without a Wi-Fi connection. And, of course, we want VoIP Prioritization. This means we want our cell phone to prioritize incoming and outgoing calls by attempting to use VoIP services first, cellphone carrier second. We also want to be able to check our email using gMail, POP3 and IMAP servers at 3G data speeds. For the business community, we also think Microsoft Exchange support is indispensable. When we need to send or receive something on our notebook computer and there’s no WiFi around, we want our cellphone to provide data connectivity. We’re not going to be downloading movies and 1,000-page books all day long. We just want to get an important file attachment from the office so we can read it on a normal screen. If the cellphone provided a PDF viewer, so much the better. And, finally, we’d like a QWERTY keyboard for messaging, and we want to be able to change our own battery, add a memory chip, and swap out SIM cards whenever we’d like. We also want the ability to gain root access should we ever wish to do so. After all, it’s our phone! Bluetooth for phone calls and A2DP for music in the car would be great, and a good camera as well as GPS functionality would be nice to have on the phone as well. For those in the U.S., we’d add one additional requirement: support for AT&T’s 3G network so you’re not stuck with T-Mobile’s dog-slow (and incompatible) wireless data network. Most of the Android phones currently flunk this test leaving you with nothing but EDGE service if you use a provider other than T-Mobile. Of course, with T-Mobile, you get mostly EDGE service in the U.S. as well. 🙄

And the winner is…

blankOur pick is the unlocked Rogers HTC Magic phone, the only Android phone that we could find which supported rooting and AT&T’s 3G network in the U.S… albeit from a Canadian provider. That’s the price U.S. consumers pay for a government that continually rewards the telephone oligopoly with exclusivity rip-offs. So how does the HTC Magic stack up to our wish list? We’d give it a 94. It does everything on our Wish List… and more. The images which follow incidentally were taken using the screen capture utility that’s part of the Android 1.5 SDK. It is easily installed on either a Windows or Linux PC or your favorite Mac (except Snow Leopard for the moment). There’s a great tutorial on how to install the Android SDK as well as a YouTube video and tutorial on rooting the Rogers HTC Magic phone should you desire further information on those topics.

Getting Started. Before proceeding, set yourself up a Gmail account if you don’t already have one. As with most provider-specific cellphones, this HTC Magic phone is hard-coded to the Rogers network in Canada. Assuming you want to use AT&T’s network in the U.S., step #1 is to enter AT&T APN settings when you first turn on the phone. After inserting the AT&T SIM and booting the phone, press the Menu key before doing anything else. Next click Add APN. Enter the following values leaving the remaining fields blank:

Name: att
APN: wap.cingular
Password: CINGULAR1

Now press the Menu button again and choose Save. For other providers, try this Google Search.

blank

Main Screen. Once you’ve entered your Gmail credentials, the phone will boot and display a Main menu. It actually is three screens wide. You can move to the other screens by swiping your finger to the left or to the right. You’ll notice a thumb tab at the bottom of the display. By dragging this up, you can access all of the other applications on the phone. Move it back out of the way by dragging it back down or pressing the Back button (←) which is the third from the left button just below the screen display.

blank Applications. Here’s the first page of our Applications. You scroll through the list using the trackball, or you can drag your finger vertically on the screen to reposition the display up or down. Tapping on an entry starts the application. Pressing the Home button on the far left just below the screen display returns you to the Main Screen. Every app is displayed in this listing except for Widgets. Widgets are more like scripts and typically are used to toggle functions on and off. In the left Main screen above are four widgets to toggle WiFi, BlueTooth, GPS, and Ringer/Vibrate/Silent functions of the phone.

blank Android Market. All of these applications didn’t necessarily come with the phone. Google’s Android Market has been set up for developers to display their wares. You can become a developer, too. And, unlike the iPhone apps, most of the Android apps still are free. Just another advantage to open source technology. To access the Market from your phone, just choose the Market app and follow the intuitive menus. There’s a great Search function. Again, unlike the iPhone, these applications get stored on a MicroSD card. A 2GB card comes with the phone. Do yourself a favor and start with a $50 16GB card.

blank

Messaging. As you might expect from Google, the Android platform excels at messaging of all flavors. Whether it’s text messaging, Gmail, or POP3/IMAP email connectivity, Android has you covered (see above). And the support for Microsoft Exchange is nothing short of brilliant. In the social networking department, there’s full-featured support for Twitter and Facebook, among others. Using the Search function in the Android Market, you can have your phone set up with your favorite tools in just a few minutes.

blank Android Security. Securing your phone is also nothing short of brilliant on the Android 1.5 platform. Simply draw an unlock code pattern using your finger, and that becomes the signature for future access to your cellphone. Also works pretty well as a sobriety test. 🙂 If you can’t unlock your phone, don’t unlock your car! You also can lock your SIM card to your phone and set a password if you’re nervous about losing your $500 crown jewel. What the security system really demonstrates is that the open source community has nothing to apologize for. The quality of this software is every bit as good if not better than the software produced by the other cellphone players.

blank

Placing Calls. Yes, we hear you. What about making phone calls? You’ll be pleased to know that the HTC Magic can do that, too. We were just saving the best for last. In fact, this phone can make calls in three different ways: through your cellphone provider, through SIP using your Asterisk server or another provider, and through Google Voice. Once you install the Google Voice application from the Android Market, simply configure it with either your cellphone number or an intermediate provider such as SIPgate or IPkall. You then have a choice of whether to make Google Voice the primary or secondary calling source. Or you can choose to be prompted for each call as shown above. Google Voice calls that go out through your WiFi data network connection incur no charges in the U.S. and Canada.

blank SIP calls are placed using the SIPdroid application which also is available in the Android Market. Shown to the left is a sample setup for SIPdroid to connect to your Asterisk server on a private home network. In the SIPdroid Call Options, specify whether to use WiFi and/or 3G/EDGE for the SIP calls. And set a preference for how your calls should be placed, i.e. cellphone carrier or SIP. The only tricky part is the Extension Settings on your Asterisk server. Just create an extension in the usual way using FreePBX. But make sure your settings include the following entries: canreinvite=no, nat=yes, and qualify=no.

To route outbound calls through SipDroid instead of your cellphone provider, just append + to the end of the phone number. You can generate a + symbol on your phone keypad with a long press of the 0 button.

blank

Android Backups. No article would be complete without some mention of backups. The Android platform currently supports four options: Android images, MyBackup, and Google and Exchange Synchronization. Android images can only be created if you gain root access to your phone or load a different image on your phone. MyBackup is a $9.95 app from the Android Market that lets you backup your Applications and Data separately onto your MicroSD card. Unless you’re a techie, it’s well worth the money. Google and Exchange Synchronization you will find under Settings, Data Synchronization. With Google Sync, you can back up your Gmail, Calendar, and Contacts data automatically and as a background task. Be sure to activate it. Finally, you’ll see displayed above a browser display from mundy.org/whereib that you may find helpful from time to time. It displays not only a map of your current location based upon your IP address, but also shows your public IP address.

blank Android 3Gtest. We’ll leave you with a hot tip about one additional application: 3Gtest. Just download and install it from the Android Market and then run it. You’ll be amazed by the results. Not only will it tell you how good your upload and download speeds are, it also will tell you some interesting tidbits about whether your provider is living up to their oft-repeated promise of Net Neutrality. Our download 3G speed in Charleston, South Carolina was actually close to T-1 performance. Interestingly, our upload speed was pitiful… about as fast as a circa 1860’s telegraph machine.

Android System Backup. We said we weren’t going to cover rooting your phone, but we do want to point you in the right direction and also show you how to get a perfect image backup of your phone. If you’re not comfortable entering system commands, stop here! We are Mac snobs so what follows is the Mac way of doing things which is incredibly simple compared to the hassle with Windows in getting the correct USB driver loaded to make things function properly. If you’re determined to use Windows, be sure to install the Android SDK before you connect your phone to your PC. And read up on how to install the appropriate USB driver for Windows. With a Mac, all of this just works… out of the box. As we mentioned previously, we’ve only tested this with Leopard and Snow Leopard, and Snow Leopard does NOT work!

Before proceeding, you must enable USB Debugging on your phone. You’ll find it here: Settings->Applications->Development->USB Debugging

To get your Mac set up with the proper toolkit, do the following. There’s nothing tricky here. Just don’t skip any steps. And you only have to do this once! First, download the Android 1.5 SDK for the Mac from here. Unzip android-sdk-mac_x86-1.5_r3.zip on your Desktop and rename the folder to android-sdk. Now drag that folder into your Applications directory. Next, open a Terminal window and create/edit .bash_profile: nano -w .bash_profile. Add the following entry: export PATH=${PATH}:/Applications/android-sdk/tools. Then save the file: Ctrl-X, Y, Enter. Now run the same command from the CLI prompt to update your PATH now: export PATH=${PATH}:/Applications/android-sdk/tools. Next, download fastboot-mac onto your Desktop from the HTC Support site. Unzip the file and rename the file to fastboot. Then, download recovery-new.img to your Desktop. Drag both fastboot and recovery-new.img into the Applications/android-sdk/tools folder.

Now we’re ready to make your backup. Plug your phone into your Mac using the USB cable that came with the phone. Open a terminal window on your Mac and change to the SDK tools directory: cd /applications/android-sdk/tools. Run the following command and make certain your phone shows up in the listing: adb devices. You should get a display with the serial number of your phone:

List of devices attached
HT95RNK02843 device

Assuming your phone shows up in the list, you’re ready to proceed with a backup. Turn off your phone. Then, while pressing the Volume Down button, turn your phone back on. Hold down both buttons until you see a screen that says <BACK> FastBoot Mode with dancing Androids on skateboards at the bottom of the display. Press the BACK button (←) and the FASTBOOT USB menu will display. In your computer’s Terminal window (NOT on your phone), type: fastboot boot recovery-new.img. Your phone will reboot and display a screen with several options in blue. Use your phone’s trackball to carefully scroll down to the Nandroid Backup 2.1 option. Then depress the Trackball button to begin the backup. You’ll see a yellow display message indicating that the backup is proceeding. When the backup completes, choose the Reboot System Now option to restart your phone normally.

You’ll find the new backup on the SD card. To copy it to a safe place on your Mac, drag down the Message Bar at the top of the display after your phone has rebooted. Tap the USB Connected Select to copy files to/from your computer option. Then tap the Mount button. A new drive NO NAME will appear on your Desktop. Double-click on it and drag the nandroid folder to a safe place for permanent storage of your backup. To unmount the phone, do it on your Mac desktop first. Then reverse the mount process we initially used on the phone to mount it. Simple!

Rooting Your Phone. We have NOT done this so you’re on your own. You’ll probably void the warranty on your phone by proceeding. The best article we could find on the procedure for rooting and restoring your phone is here. But it doesn’t have the correct backup image. If you restore the wrong image, your phone’s radio may no longer work on your provider’s network. The consensus seems to be that the proper image for a rooted Rogers HTC Magic is here. The best tutorial for actually performing the magic appears to be here. But we would stress again that we have not actually tried this, and you really, really are on your own if you proceed past reading this article. It’s your $500 phone… or brick as the case may be. Before doing anything further, we would strongly recommend you make several backup images as outlined above and also spend some time doing a careful review of the postings in this forum until you are very comfortable with all of the wrinkles and procedures. If something goes wrong, post your problems there, not here. 🙂 We’re handing you the map, but it’s your choice whether to jump off the cliff. Enjoy!

Update: The unlocked Rogers HTC Magic phone used for this review is now available for purchase from Nerd Vittles. It supports 3G networks of both Rogers in Canada and AT&T in the United States. Just make us an offer we can’t refuse. It’s still a terrific phone!


blank

The Future of Android. For a glimpse of what the future holds for Android, see this Giga OM article published on October 7.


blankWeb Site of the Week. For all of your favorite Nerd gifts, don’t miss the new Mashable collection.

Articles of the Week. For another excellent technical review of the HTC Magic, check out TechRadar UK’s review. And be sure to check out Justin West’s Free Homebrew VoIP with Google Voice and Intel Atom.


Enhanced Google Maps. In case you haven’t noticed, we’ve added yet another Google Map to Nerd Vittles. Now, in addition to showing our location with Google Latitude, we also are displaying your location based upon your IP address. We’ll show you how to add something similar to any LAMP-based Linux system in coming weeks. It’s a powerful technology that has enormous potential. If you’re unfamiliar with Google Maps, click on the Hybrid and Satellite buttons and then check out the scaling and navigation options. Double-click to zoom. Incredible!


whos.amung.us If you’re wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what’s happening. It’s a terrific resource both for us and for you.


blank
Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

blankBOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

blankThe lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

blankVitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

blankSpecial Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest…


Cloud Computing 101: Using Amazon’s S3 (Simple Storage Service) for Off-Site Asterisk Backups

blank
When we began the PBX in a Flash project, one of our key design requirements to distinguish our product from other Asterisk® aggregations was to include an automated, rock-solid reliable, backup solution that backed up not only Asterisk but your entire server in a way that could be restored painlessly without manually reinstalling the initial PBX in a Flash image. After almost a year in production, PBX in a Flash remains the only distribution with a complete backup solution. In the Orgasmatron builds of PBX in a Flash, we've gone a step further. Automated weekly backups to a flash drive are preconfigured. All it takes to get started is a $15 flash drive. Insert the stick and run the usbformat.sh script. Thereafter, a full backup is run each Sunday night, and the self-booting ISO images are conveniently placed on the flash drive for easy restoration of your entire system should the need ever arise.

We appreciate, however, that others running Asterisk and FreePBX need backup solutions as well. And, while today's tutorial won't get you a full system backup which is comparable to what's available on PBX in a Flash systems, what it will do is provide an automated off-site backup storage solution for all of your critical FreePBX data for pennies a day. Beginning last year, FreePBX started offering a backup solution for FreePBX data as an integral part of the FreePBX web interface. The FreePBX solution lets you define a schedule for backing up your voicemail, system recordings, system configuration, CDR, and operator panel. What the restore process won't do is put Humpty back together again without first reinstalling your operating system and Asterisk environment. For those using PBX in a Flash, you've got the best of all worlds with these two backup solutions. For everyone else, the FreePBX backup alternative is certainly better than nothing. It also is a terrific tool for moving from one distribution to another (hint!) or to a new server environment. So long as the versions of FreePBX on both systems match, users have reported excellent results.

In addition to the need to recreate your server environment from scratch, there's an additional problem with the FreePBX backup solution. It gets stored on the same drive as your Asterisk server. That works great until your hard disk dies or your house catches on fire. Backups are written to /var/lib/asterisk/backups and placed in subdirectories matching the Schedule Name you assign to the backup procedure. For reasons which will become obvious, it's a good idea to name your schedules without any spaces in the name, e.g. DailyBackup. The only thing we've really found missing in the FreePBX solution is an off-site storage option to protect you in the event of a catastrophe.

A Picture Is Worth A Thousand Words. We recently were reminded of the importance of off-site storage when a neighbor's house caught fire in the middle of the night. Fortunately, the entire family escaped without injury. But all of the contents of the home were destroyed either by the fire or by the water used to put out the fire. After being awakened by a neighbor in the middle of the night, there was less than 5 minutes to extract mom and dad and four young children from the house before it was totally engulfed in flames. Moving computers out of harm's way most assuredly was the furthest thing from their minds. Enter: Amazon S3 aka Cloud Storage. A recent InformationWeek poll found that "storage--including archiving and disaster recovery--was cited as the service category most likely to be outsourced to the cloud, ahead even of business applications."

If this is all news to you, here's a quick thumbnail on Amazon S3 from the Wikipedia:

"Amazon S3 (Simple Storage Service) is an online storage web service offered by Amazon Web Services. Amazon S3 provides unlimited storage through a simple web services interface. Amazon launched S3, its first publicly-available web service, in the United States in March 2006 and in Europe in November 2007. Since its inception, Amazon has charged end users $0.15 per gigabyte-month, with additional charges for bandwidth used in sending and receiving data. As of November 1, 2008, pricing will move to tiers where end users storing more than 50 terabytes per month will receive discounted pricing. Amazon claims that S3 uses the same scalable storage infrastructure that Amazon.com uses to run its own global e-commerce network. Amazon S3 is reported to store more than 29 billion objects as of October 2008. This is up from 14 billion objects as of January 2008, and from 10 billion in October 2007. S3 uses include web hosting, image hosting, and a back-up system. S3 comes with no guarantee that customer data will not be lost."

To give you some idea of pricing, our current FreePBX daily backups are roughly 50 megabytes in size. A new PBX in a Flash install yields a 20MB FreePBX backup. Using a cable modem connection, uploading our 50MB daily backup to Amazon S3 takes about 5 minutes and costs 2¢. Storage of a full month's worth of rotating backups would add another quarter to the monthly cost. Thus, the tab to upload and store 30 backups a month runs less than one dollar, pretty cheap insurance by any measure. And, unless you tinker with your system as much as we do, daily backups probably are overkill. The tab for weekly uploads and storage on Amazon S3 would run less than 25¢ a month assuming you remove all but the last five backups from S3 in each subsequent month. So... what are you waiting for?

Configuring Weekly Backups with FreePBX. The first step is to set up the automated backup process in FreePBX. Using a browser, open FreePBX and choose Tools, Backup & Restore. Click Add Backup Schedule and name the schedule WeeklyBackup. Select all of the radio buttons to backup everything possible with FreePBX. For the time of the backups, leave the Follow Schedule Below option selected. Choose a time for the backup by clicking on the appropriate settings. We recommend 3:05 a.m. which means you click on 5 in the minutes column and 3 in the hours column. Finally, click the Selected option button under Weekdays and then click Wednesday. Click Submit Changes to save your settings.

Creating an Amazon S3 Account. Before you can create backups on Amazon S3, you'll obviously need an account. Here's the link to sign up: http://www.amazon.com/s3. Once you sign up, you'll receive an email with this link to manage your new account. Log in using your Amazon username and password. Write down your Access Key ID. Next click on the button to generate a new Secret Access Key. Once it's generated, click on the link provided to display it. Write it down, too. You'll need both your Access Key and your Secret to use Amazon's S3 service.

Installing s3cmd to Manage Your S3 Backups. There are a number of tools available to interact with Amazon S3. We've chosen s3cmd which happens to be free and uses python which is preconfigured on PBX in a Flash systems. Another great tool is JungleDisk, but it costs $20. It uses s3sync and Ruby which you'd need to install: yum install ruby. It also requires SSL certificates which complicates things a bit. For an excellent tutorial, see Chris Sherwood's writeup. Of course, time marches on, and today we can do all of the same things at no cost. So let's get started.

To install and configure s3cmd, log into your server as root and issue the following commands:1

cd /root
wget http://downloads.sourceforge.net/s3tools/↩
s3cmd-0.9.8.3.tar.gz?modtime=1217338796&big_mirror=0
tar zxvf s3cmd*
mv s3cmd-0.9.8.3 s3cmd
cd s3cmd
./s3cmd --configure

You'll be prompted to enter your Access Key and Secret Key to access Amazon S3. Next you'll be asked to provide an encryption password to protect your data while being transmitted to Amazon. Make up a random collection of letters and numbers. For the path to the GPG program, press Enter to choose the default: /usr/bin/gpg. Choose whether to use HTTPS to transmit your data. It's a little slower, but it's secure so we recommend choosing it. We're going to automate the backup process so you're not going to be watching the file transmission process anyway. Next, you'll be asked whether to test S3 access using the credentials you've supplied, Type y and be sure you get a success message. Otherwise, recheck your Access Key and Secret Key for typos. Finally, you'll be asked whether to save the settings. Choose Y. Your settings will be saved in /root/.s3cfg. Be sure to erase the file if you give your server to someone else!

Using the s3cmd Command Line Interface. s3cmd is a command line tool so we'll walk you through the basics before we automate the weekly backup process. There's an excellent tutorial for s3cmd that is available here, and more S3 tools are on the way. What you really need to know about S3 file storage is that files are stored in disk volumes which S3 calls buckets. You can have up to 100 buckets. Wildcards don't work the way Linux wildcards do, and S3 is picky about the use of periods. Our recommendation: don't use them for the time being. Also be aware that bucket names are like domain names. They must be unique across the S3 cloud. So... daily-backup and weekly-backup won't work on your system because we already own those buckets. The easiest naming convention is probably to use your full name or company name for the bucket name and then create directories below there for your data. For other tips, see the S3 FAQ. Now let's run down the basic list of commands in the order you typically would use them:

Create a New Bucket: s3cmd mb s3://weekly-backup (Unique on S3!)
List Your Buckets: s3cmd ls
List Bucket Contents: s3cmd ls s3://weekly-backup
Upload a File: s3cmd put file.xyz s3://weekly-backup/file.xyz
Download a File: s3cmd get s3://weekly-backup/file.xyz file.xyz
Delete a File: s3cmd del s3://weekly-backup/file.xyz
Delete a Bucket: s3cmd rb s3://weekly-backup (NOTE: Bucket must be empty!)

Automating the Off-Site Backups to Amazon S3. We now have all the pieces we need build a weekly cron script to automate the backup process to our new Amazon S3 storage facility. So let's build the script. For purposes of this example, we will assume that you have followed our instructions above in setting up the backup process with FreePBX. We obviously need to know when new backups are made so that we can configure a cron script at the proper time to copy the backup file up to the Amazon S3 server. We also need to know the name of the FreePBX directory with the backups and will assume that it's /var/lib/asterisk/backups/WeeklyBackup. Finally we need to know the name of the bucket to be created on Amazon S3 to store the backups and we'll assume it's s3://weekly-backup as we used in the examples above.

Step 1 is to build the script. Using your favorite editor, create a file and name it /root/s3backup.sh: nano -w /root/s3backup.sh. Here's what should go in it:2

#!/bin/bash
cd /var/lib/asterisk/backups/WeeklyBackup
thisbackup=`find *.gz -mtime -1 | tail -n 1`
/root/s3cmd/s3cmd put ↩
/var/lib/asterisk/backups/WeeklyBackup/$thisbackup ↩
s3://weekly-backup/$thisbackup

Save the file: Ctrl-X, Y, then Enter and make the script executable: chmod +x s3backup.sh. Note that, for this script to actually work, you must run it on the same day AND after FreePBX has first generated a backup.

Step 2 is to create a cron job that will execute the above script shortly after 3:05 a.m. on Wednesday morning making sure we leave enough time for FreePBX to complete the backup task. To be safe, we'll set it up for 4 a.m. every Wednesday. Edit /etc/crontab and add an entry at the bottom of the file that looks like the following:

0 4 * * 3 root /root/s3backup.sh > /dev/null

If you just wanted a basic backup system using Amazon S3, congratulations! You've graduated. But there's so much more if you don't mind getting your hands a little dirty.


blankWe're Getting Close. Before we tackle the techie stuff, let us pause for a moment and provide a progress report on the VPN in a Flash project. Thanks primarily to Tom King, we've made enormous progress in the last couple weeks. And, again, the accompanying picture says it better than words. We're also nearing completion of the documentation. The idea behind this project was to provide a mobile and transportable, full-featured VoIP PBX for under $500. For those with satellite offices or remote construction sites or branch offices, the Acer Aspire One is ideal. But it also can serve as a secure traveling companion for those that are often on the road. And, of course, it's an almost perfect fit for a home, a home office, a vacation home, or any hotel room with WiFi. Not only does it have an incredibly small footprint, but it also has computing power to spare with the new Intel Atom motherboard, a gig of RAM, and a 120GB hard disk. Yes, it's got wired AND wireless covered seamlessly, and it offers the Orgasmatron II build including fax capability plus the Hamachi VPN for secure connections within your own private network of servers and PCs. And our custom build offers the very latest KDE GUI with the brand-new Fedora 10 and performance to spare. The 1024x600 screen resolution you've simply got to see to believe. This photo doesn't do it justice. Plus we've added the Zoiper softphone which works nicely with the integrated microphone and speaker to let you place secure calls back through your home office PBX or directly through the fully-functional Asterisk 1.4 PBX which runs silently in the background with the new FreePBX 2.5 web interface. We hope to begin taking orders on or before the first anniversary of PBX in a Flash, November 14. For more details, click here or check out our forum posting. We now return you to your regularly scheduled program...


Using Fuse, s3fs, and Rsync with Amazon S3. At the outset, we want to express our special thanks to John Eberly for his article laying the foundation for much of what follows. The S3 technology has advanced dramatically since it first was introduced. So much so that you now can mount an Amazon S3 bucket as a local device on your server and use it like any other mounted device. This means you can use standard Linux tools to copy, list, delete, and move files. And you can use the built-in intelligence of tools such as rsync to actually keep directories in sync without recopying data that already exists in both locations and without manually deleting data which already has been removed from the source directory. For long time readers of Nerd Vittles, you know that rsync is one of our favorite Asterisk tools. It works flawlessly!

Unfortunately, with CentOS 5, the Linux Fuse file system installation process is a bit quirky, but here we go anyway. First, you'll need the Dag Wieers YUM repository to install some of these applications. The easiest way to activate the repository is to just execute the following commands while logged into your server as root. When we're finished with the repository, we'll delete /etc/yum.repos.d/dag.repo so that you don't accidentally use it unintentionally for other yum updates down the road:

cd /root
wget http://nerd.bz/q77p30
rpm -ivh fuse-devel*
wget http://downloads.sourceforge.net/fuse/fuse-2.7.4.tar.gz?↩
modtime=1217019944&big_mirror=0
tar zxvf fuse-2.7*
cd fuse-2.7.4
./configure
make
make install
cd ..

If you're a Linux whiz kid, you're probably scratching your head wondering why we would install an RPM version of fuse and then turn around and install it again by compiling it from source. The short answer is "hell if I know." The longer answer is that fuse won't work unless you do it this way. Sorry. If you really are a whiz kid, you can educate all of us as to why this is necessary by posting a comment.

Now that the Linux fuse file system is installed, we need one more application. It's the glue between Linux fuse and Amazon S3: s3fs. So let's download, compile, and install the s3 file system application:

cd /root
wget http://s3fs.googlecode.com/files/s3fs-r177-source.tar.gz
tar zxvf s3fs*
cd s3fs
make -f Makefile
mkdir /mnt/s3fs
cp s3fs /usr/bin/.
cd ..

Finally, to simplify mounting of your S3 file system, we need to store your Access Key and Secret Key in a config file just as was done with s3cmd above. So create a new file named /etc/passwd-s3fs and add your AccessKey:SecretKey in the file, e.g. 12345:67890


Mount S3 bucket (the unique one): s3fs weekly-backup /mnt/s3fs

Check available storage space: df -h /mnt/s3fs

Synch Backup directory with S3: rsync -avz --delete ↩
/var/lib/asterisk/backups/WeeklyBackup /mnt/s3fs

Dismount your S3 bucket: umount /mnt/s3fs

For the steps to integrate this directly into FreePBX to assure that your backups are automatically saved to S3, see Comment #1 below.


Hosting Provider Mega Deal. Just an FYI that the Nerd Vittles hosting provider, BlueHost, has raised the bar again on hosting services. For $6.95 a month, you can host unlimited domains with unlimited web hosting disk storage and unlimited monthly bandwidth. Free domain registration is included for as long as you have an account. It really doesn't get any better than that. And their hosting services are flawless! Just use our link. You get a terrific hosting service, and we get a little lunch money.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

blankBOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

blankThe lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

blankVitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

blankSpecial Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

  1. Where you see ↩ means that you should join the text on the following line to the original line as a single line of text (usually with no intervening space). []
  2. In the following code, the ↩ character means to join the three lines of text into a single line with a single space between the code on each line. The difference in the two examples is you don't usually have spaces in http: requests while commands issued on the command line obviously have spaces between different parts of command. []