Backing Up

Why Back Up with Web Crossing?
How Web Crossing Backup Works
Making a Backup
How Often Should You Back Up?
Automating Backups
Using Mirroring for Backups
Resources

Why Back Up with Web Crossing?

The Web Crossing database can be lost for a number of reasons. Hardware problems with the server, database corruption, and attacks by hackers are just a few of the many ways database loss can occur.

Most web server network administrators provide automatic tape backups of their web pages. So why back up using Web Crossing's own backup system?

The problem is that if your database is written to (i.e. someone posts or makes a change) while a tape backup or other type of copy is being made, it will produce an unusable backup file. There are two ways to back up without encountering this problem:

Note: Another way to back up is to mirror your entire database on another server. See Scaling, Mirroring, and Distributed Serving.

How Web Crossing Backup Works

If you enable roll-forward logs (and you should!), Web Crossing saves a file called a "roll-forward log" containing all transactions since the last backup. This file is written to every time the database is changed. At backup time, Web Crossing makes a backup copy of the active database, and starts a new roll-forward log. In the event of a database loss, you can ask Web Crossing to combine the corresponding backup database and roll-forward log to create a functional database.

The most recent backup database and roll-forward log are named webxdb.1 and webxroll.1. The next oldest copy is named webxdb.2 and webxroll.2. You can choose to have Web Crossing keep additional backup copies if you desire. Any backup copies older than the number of backups you've chosen will be deleted.

At the time of the next backup, the webxdb.1 file is renamed to webxdb.2, and so on, and a new webxdb.1 file is created.

Since the webxdb.1 and webxdb.2 files and webxroll.2 are never active files, you can copy them to another media or another machine at any time.

Leave the webxroll.1 file in the webx system directory at all times, since the file is written to (in append mode only) each time a change is made to the database.

Making a Backup

(1) To make a backup using Web Crossing's backup function, go to the Control Panel > Backup.

Figure 1 - Backup pane from Control Panel

Backup pane

(2) The number of backup databases to keep is 2, by default. Make sure the roll-forward log checkbox is checked.

Note: The default number of backups to keep is 2. That's also the minimum. If you're running low on disk space and have a large database you may be forced to save some space by keeping only one backup copy. In that case, you'll have to delete your webxdb.1 and webxroll.1 files just before backing up to prevent them from being renamed to webxdb.2 and webxroll.2.

(3) Choose a directory for your backup files, if you don't want them to appear in the Web Crossing program directory itself. You can skip the options for day and time unless you're also setting up automatic backups (see below).

(4) Click Backup.

(5) The page will reload, and every ten seconds you'll be shown an update of backup progress. When the backup is 100% complete, you'll be told.

The Backup with Repack option goes one step further - it rewrites the active database to reclaim space from deleted objects and reduce fragmentation. It is slower than a regular backup (can take several minutes up to several hours), and should be done only occasionally. You can do a backup with repack off-line, if you wish.

Web Crossing will sometimes be unresponsive during a backup. This is normal.

After the backup is finished, the backup files should be copied off the server and kept on removable media, a tape drive, or other backup system. That way if something happens to the disk holding the original database, you won't lose your backups too. It's also wise to keep a backup copy off-site in case of disaster.

Note: Make sure you have enough disk space to rewrite the whole database before you backup with repack.

How Often Should You Back Up?

Backing up every few days should be sufficient, but it depends on the size and activity of your site. Some sites might want to back up every day, but for others once a month would be sufficient. Do what's comfortable for you.

Automating Backups

You can have Web Crossing automatically back up your database on a schedule you set up. In the Control Panel > Backup pane (see above) you can choose Never (meaning you always do a manual backup), or Daily, Weekly, or Monthly. You can choose the time of the day (in server time, expressed as military time) for the backup. For Weekly you can also choose the day of the week. You will probably want to choose whatever time is least busy for your server.

Resources

Sysop Documentation

Sysop Control Panel

Web Crossing FAQ