Calendar Friday, July 30, 2010

Search This Site

WordPress Sidebar

WordPress Latest Posts


Backing Up Your Site With the JoomlaPack Extension Part 1

February 25th, 2009 by 4SightDS

Part I - Installation

joomlapack_main_control-panel

Introduction

After looking at several of the available backup extensions for Joomla we have decided to run with JoomlaPack as the backup solution for all our website projects. The reason for this is that not only does JoomlaPack back up the a sites entire database but it also has the ability to backup all of the websites files into a zip file that can be used to restore the whole site to either its original location, a new location on the same server or even a whole different server! JoomlaPack can also be scheduled to run in the cron so that the backup process can be automated.

JoomlaPack is delivered as a Joomla Component and is available in both 1.0 Native as well as 1.5 Native versions.

Installation

Installation is straight forward. All you have to do is to grab a copy from the JoomlaPack website which you can do here: http://www.joomlapack.net/download/JoomlaPack-Components-download.html, save it somewhere to your local computer and then install it from the Extensions|Install|Uninstall menu in the Joomla Administrators back end control panel.

Once the extension has been installed it will let you know on the front page of its control panel (found under the Components menu in the Joomla Administrators back end) whether or not there were any issues with its installation that you need to attend to.

Backup Folder Permissions

On some systems we have found that the default folder permissions set on the backup folder (the folder your backups are stored in when they are created) are not sufficient to allow the system to actually create the backup file. In such a case you will be alerted that there is a problem via a message on the JoomlaPack control panel as seen below.

backupdirincorrectpermissions

At a minimum the backup directory folder permissions should be set to:

  • User:  Read/Write/Execute
  • Group: Read/Write
  • Other: None

In Linux terms this means that you need to set the file permissions to 760.

(If you don’t have a good understanding of *nix file permissions a good article on them can be found in the “How Linux File Permissions Work” article on nixCraft.)

If you use a hosting service for your website this can be accomplished either via whatever control panel they provides for you (such as Plesk or CPanel) or, if you have an account that is Secure Shell (SSH) enabled you can ssh into your server, log in as root,  and change the folders permissions by changing  directories to the /joomla15/administrator/components/com_joomlapack directory under your websites root install folder and  issuing the command “chmod 760 backup” .    If your system does not allow you to ssh in as root then, if sudo is configured correctly you should be able to accomplish the same task by issuing the command “sudo chmod 760 backup”. In either case this gives the folders user full control, group read and write permissions only and no permission to other (everyone else).

Changing the Backup Folder Permissions in Plesk

To make the permission change using the Plesk control panel first log into Plesk and then click on the “Domains” link in the upper left corner of the control panel:

create-new-backup-directory-01

Next select the domain your web site is on by clicking  on the domain name  at the bottom of the page.

creatnebackupdir-02

Then click on the file manager in the bottom right of the control panel:

creatnebackupdir-025

Then select the root folder your web site resides under:

Select the root folder your site resides in

Now browse to the administrator/components/com_joomlapack directory. If your site is a sub domain and  is not in the root of your web server then you will have to select the sub-folder from which it runs otherwise start with the administrator directory:

creatnebackupdir-052

Then the components directory:

creatnebackupdir-06

And then click on the com_joomlapack folder:

creatnebackupdir-07

Once you’ve clicked on the JoomlaPack directory you will see the backup folder. Set the backup folders rights by clicking on the link for its permissions to open the permission dialog box:

creatnebackupdir-08

Permissions at a minimum should be set as follows:

creatnebackupdir-091

Changing the Backup Folder Permissions via SSH

First,  fire up your favorite SSH client and log into your hosting server. We like to use Putty.

puttylogin

Then change directories to the com_joomlapack directory

puttychangebackupdirperms1

Now chmod the folders permissions:

puttychangebackupdirperms2

No run the ls -l command to see your changes:

puttychangebackupdirperms3

In some cases we have found that the permissions have  to be set to 766 and we have see posts from users on other boards that that had to set the permissions to 770 or even 777.  Unfortunately permissions are not an exact science because of the multitude of combination’s of layers of software a site may or may not be running (PHP version , web server and web server version, cgi, etc) .

If you would like a more in depth look into how web servers work and how permissions affect Joomla! installations there is a very good discussion of it in the JoomlaPack online documentation which can be found here: http://www.joomlapack.net/help-support-documentation/joomlapack-2x-documentation/pt03.html

Security

You will also, if your site is running under an Apache web server,  want to make sure that the installer wrote a .htaccess file into the backup directory. It is supposed to be written there by default but it is always good to double check as, if your site is running under an Apache web server then this file will prevent prying eyes from looking at your backup directory. If your site is not running under an Apache web server then this file will not do anything.

The .htaccess file should have only one line int it:  “deny from all”

By placing this file in the backup directory, under an Apache web server, anyone who tries to browse directly to the JoomlaPack backup directory on your web site will be greeted with the familiar Access Denied page like so:

apacheforbiddenpage

Better Security

Since this is a well known plug-in the default directory for system backups is no big secrete and as such we recommend, as do JoomlaPack themselves, that before you start making backups you move the backup directory to a different location. Preferably this would be somewhere below the root of your web servers root directory (usually the HTTP directory).

This won’t be a problem if you are on a dedicated or even a VPS (virtual private server) but you may not have access below your web servers HTTP directory if you are on a shared hosted server.  I do know from experience however that if your site is on a shared hosted server on GoDaddy that if you enable SSH for your site then you will be able to shell in and create a backup directory below the HTTP root of your web server.

To accomplish this through a control panel I’ll give an example in Plesk.

Creating a Backup Directory Below Your Root HTTP Directory Using Plesk

Again, as above, log in to Plesk, select your domain and open the file manager.  once the file manager is open you should already be in the directory below your HTTP root folder. On this system the HTTP root folder is called httpdocs.

Click on the Add Directory link.

pleskaddbackupdirbelowhttproot-1

Enter a name for your backup directory and click the “OK” button

pleskaddbackupdirbelowhttproot-2

If you don’t have permission to create files and folders in this directory you will  see the an error similar to the following:

pleskaddbackupdirbelowhttproot-error

If you can not create a directory here then your service provider may not allow you to by design. You will have to contact your hosting provider and see what, if anything, can be done.

If you were able to create the directory then change the permissions on it as described above in the section “Changing the Backup Folder Permissions in Plesk” , then go back into your Joomla! Administrator back end control panel and open up the JoomlaPack! control panel from Components menu (Components|JoomlaPack).

Once there click on the Configuration button:

pleskaddbackupdirbelowhttproot-3

Now edit the default backup directory path to reflect your new backup folder location:

pleskaddbackupdirbelowhttproot-31

Finally, click the apply button in the top right corner:

pleskaddbackupdirbelowhttproot-4

Creating a Backup Directory Below Your Root HTTP Directory Using SSH

Again, as described above in the section “Changing the Backup Folder Permissions via SSH”, log into your web server.

By default you should end up logged in to the folder below your web servers HTTP root directory. Run ls-l to see what folders are there. If you see your HTML root directory (here it is just html) the you are in the right place. If you don’t see your HTTP root directory you will have to browse around for it.

sshaddbackupdirbelowhttproot-11

Now create a directory for your backups:

sshaddbackupdirbelowhttproot-21

Next use chmod to change the permission on the newly created backup directory to 760:

sshaddbackupdirbelowhttproot-3

Now all that is left to do is to change the backup location in the JoomlaPack control panel:

pleskaddbackupdirbelowhttproot-32

And then save your changes by clicking apply in the upper left hand corner:

pleskaddbackupdirbelowhttproot-41

And Now you are ready to start backing up your Joomla! site with JoomlaPack.

Backups will be covered in a day or so in the next installment of this article.

Collecting Web Statistics on Your Joomla Website with Firestats

December 17th, 2008 by 4SightDS

Considering the main bread and butter around here is based on custom Crystal Reports design with an emphasis on custom QuickBooks reports design I suppose it is somewhat ironic that my first technology related post to the blog since installing it would be about something other than report writing. That said; since I spent a good part of this evening looking for a good web statistics collection tool for our Joomla based 4Sight website I decided I would share what I have learned. After all, what business today doesn’t have a website and who runs a website without wanting to know how well it is drawing attraction to their business?

I actually started this process several days ago while researching SEO (Search Engine Optimization techniques. SEO is a science and a profession unto itself and I could write an entire blog entry on just that subject alone (I probably will at some point down the road) and only just scratch the surface. For now, suffice it to say that SEO is the art of making your website more visible to search engine web crawlers so that your site shows up higher (closer to the top of the returned results) when someone searches for website that offers your particular services, products, or whatever it is you are trying to promote with your website.

BIGSHOT Google Analytics Joomla Extension

That said, let me just briefly mention that I actually settled, for now, on two separate web statistics solutions. The first, which I implemented several days ago, was Google Analytics. I did this with the BIGSHOT Google Analytics extension for Joomla 1.5 (there is no Joomla 1.0 version and, besides, if you are still on Joomla 1.0 you REALLY ought to upgrade to Joomla 1.5). The installation was pretty straight forward and I’ll post a blog entry concerning it and my experiences with it once I dig a little deeper into what it provides - and it provides a LOT of information on who has been visiting your website and from where.

FireStats Web Statistics Joomla Extension

The second web statistics solution I implemented was FireStats and it is actually the main subject of this particular blog posting. There are currently twenty different web statistics listed in the Joomla Extensions Directory to choose from so I’ll tell you why it is I settled on FireStats.

  1. It is accessible from anywhere, via a web interface, without the need to login to the Joomla backend.
  2. It can use it’s own database OR the Joomla database and I prefer to keep the two separate.
  3. It is capable of tracking more than one websites traffic statistics
  4. It has an AJAX interface to view the statistics so there is no need to refresh the page to update them.
  5. It appears to be quite flexible (time will tell)
  6. It has it own plug-ins available so, if you want, you can put selected statistics on your Joomla site itself for users to see.

So, it is flexible, powerfull and extensible. What’s the downside? Well the downside is that, while *most* Joomla extensions (be they modules or plugins) are relatively easy to install via the Joomla Administrators Extensions Manager Page, FireStats takes a little more technical savvy to install than most other extensions.

Preparing to Install FireStats for Joomla 1.5

You are going to need a few things before you can install FireStats:

  1. The admin user name and password for FTP Access to your website
  2. Access to FTP via your web hosting provider or a standalone FTP program
  3. The FireStats Installer

Downloading the Installer

Before we begin, lets go download the FireStats Installer. To do that we want to open up a web browser and surf to http://firestats.cc/wiki/FireStatsInstaller (or just click on the link!). Fined the section labeled “Download” and click on the link it point to (currently the text reads: Download FireStats installer 1.0.3-stable from here - and yes that is a direct link to the installer if you want to skip seeing the FieStats page though I recommend you go take a look so you know where it is). Regardless of which way you decide to grab the file save it somewhere where you know you’ll be able to find it again. If you are not comfortable with Windows Explorer and file directories then the Desktop or the My Documents folder are always a safe bet.

The installer is a zip file containing a folder with all the installation files in it. You will need to extract this folder and all its contents from the zip file so that you can copy it to your website.

Unzipping FireStats on a Windows OS

If you are running Windows XP or later then your OS is capable of extracting the file. If you have an earlier version of Windows you really ought to think about upgrading but, in the meantime, go get a trial version of WinZip if you don’t already have it. You can find Win zip at http://www.winzip.com/index.htm. Go to the download menu and either buy it ($29.95 as of this writing) or download a free evaluation copy and install it.

Unzipping FireStats on a Mac OS

If you are running on a newer Mac then you ought to have a program called Stuffit Expander and if you have OSX I believe there is a program called BOMArchiveHelper built in that will allow you to expand the installer by double clicking it. If you have Stuffit then you can right click the file and select Stuffit to expand it. If you have an older Mac and you don’t curently have an unZip utility there is one called BetterZip that you can download a free trial of from http://macitbetter.com/.

Unzipping FireStats on a Linux OS

If you are running on a Linux box then you ought to have gzip or at least tar available to you. I’m going to assume that the majority of the folks out there with Linux boxes probably don’t need this guide and if they do that they most probably know how to unZip a file even if they don’t quite know how to install FireStats for Joomla. Either way, there are so many flavors fo Linux out there these days that it would take me quite a while to track down and list all the different possibilities for what unZip program each has available and where to find one if you don’t have it for some odd reason. I’ve never actually seen a Linux system without at least tar or gzip as all of the Linux install packages are TARed or gzipped to begin with. Suffice it to say that, if for some reason your Linux box is lacking an unZip utility, Google for one.

Getting the FireStats Installer on Your Website

As I have already mentioned, it is not as simple to install as most other modules/plug-ins. You can’t just point to the FireStat zip file from the Extension Managers install tool to automatically upload and install it. You have to manually place the FireStats files on your website via FTP (File Transfer Protocol) with either an FTP utility built into or supplied by your web hosting service or a stand alone FTP program.

If you are running your own web server in house then you can copy the files to root of your web site using windows explorer or FTP them there, what ever you find more convenient for your setup. In either case I assume that if you are running your own in-house server that you probably know what you are doing or have someone close by who does.

If your web hosting service provider does not provide you with an FTP service or program then there are MANY FTP programs out there to choose from. Just Google “free FTP client” an you’ll see what I mean. Personally I recommend WS_FTP from ipSwitch. They have both a home as well as a professional version which are both moderately priced ($34.95 and $54.95 respectively as of this writing) and you can download a free trial of either version from http://www.ipswitchft.com/store.asp.

In order to connect to your website via an FTP program to copy the FireStats installer to your Joomla website (I suppose I ought to mention that FireStats works with a whole host of other CMS packages as well as with WordPress) you are going to need to know the sites administrative login (user name and password). Once you have tracked that down either fire up the FTP utility your web hosting provider supplies (you are going to have to call their support to find out how to access this if you don’t know how) or install and launch your FTP client.

If you have anything other than WS_FTP you’ll need to check the docs or call their help desk if you can’t figure out how to connect to your website. If you have WS_FTP, launch it and you’ll see something that looks like the following:

Running the FireStats Installer

Now that you have the FireStats installer directory and all its contents copied to your website you need to open up a web browser and point it at the installer directory to begin the installation process.

Welcome to the 4SightDS Technology Blog

December 17th, 2008 by 4SightDS

Hello and welcome to the 4Sight Digital Services Technology Blog. The intent of this Blog is to provide insight into not only technologies relevant to the services we provide here at 4Sight but also into technologies we use to support the company internally in its day to day operations. To that end I will be writing about everything from the tools we use to create custom Crystal Reports, custom QuickBooks reports and custom SalesForce.com reports to the tools and services we use to run our business such as our webhosting services and web design tools, our PBX software and our productivity tools.

With all the asks and projects  have going on around here it will be hard, if not impossible, for me to blog about said things on a daily basis but I will do my best to post one or two entries each week in an attempt to keep the content fresh.

Hopefully you’ll find something I post here to be of value to you and your business processes from time to time!

Best Regards,

Daniel A Raphael
President/CEO
4Sight Digital Services, Inc.