Backing Up your Database

The underlying database engine for espCRM is SQLite3.

https://www.sqlite.org/

Your SQLite3 database is stored in a single file on your server.

If your database database file is not too large you can download a copy of it using the option in the 'Administrator Tools" menu.

N.B. The operation will take several seconds so be patient. While it is taking place, other users will not be able to save changes to your database.

Check your backup file.

The file you download is a zip file. Open the file (double-click it) to examine the contents. There should be one single file called 'database.sql3'.

As your database file grows larger, this operation will take longer and eventually it will fail - but by then you will be relying on espCRM.

FTP Access

Most Internet Server Providers allow FTP access to your web page directories (folders). If you have FTP access to your server you should be able to navigate to the folder where the espCRM files and your database files are stored.

If you have no other way of getting your espCRM system backed up you should get your IT person to move it onto an in-house server or a cloud server with a reliable backup schedule. Refer that person to the next section of this document.

espcrm Installation.

The host computer should have an HTTP server installed (Apache or IIS)

The espCRM system is a collection of html, js and php files in a single directory within the public folder of the HTTP server.

Actual database files are also stored in this folder. They have names that start with a . (dot character) to deny public access. The default database name is '.database.sql3'. The system also maintains a small database called '.useraccounts.sql3' which holds user names and password digests.

There may also be other database files added by clients who require more than one.

Scheduled Backups.

Bearing in mind that a database might be 'hot' - your backup regime needs to backup all the files in the directory - including the hidden files (names starting with a dot).

Hot Databases.

In common with other database engines, the SQLite3 engine has mechanisms that deal with the situation when the application or host computer crashes before the transaction completes,

The espCRM folder might contain rollback journals or write-ahead logs that contains information needed to restore main database files to a consistent state. When a rollback journal or write-ahead log contains information necessary for recovering the state of the database, they are called a "hot journal" or "hot WAL file". Hot journals and WAL files are only a factor during error recovery scenarios and so are uncommon, but they are part of the state of an SQLite database and so cannot be ignored.

https://www.sqlite.org/fileformat.html

Ideally, your backup regime will stop the HTTP service before backing up the folder (and restart it afterwards). This will probably ensure that journal and/or WALL files do not exist but if not, they will also be backed up and valid. Following restoration, next time the SQLite engine opens an affected database it will be rolled back successfully to a consistent state.

espCRM CardDesign Page

Resizing Cells

Stretch or shrink single line cells by dragging the bottom right corner.

Multi-line cells and image cells can also be resized vertically in the same way.

Pick-list cells.

Some cells in your database might be pick-lists. Back in the record card screen, pick-list widths depend on the configure options. A bit of trial-and-error is needed.

Moving Cells and Buttons

Move a single item by dragging it with your mouse.

For extra precision, click the item to give it the focus then use the left, right, up, down keyboard buttons.

From time to time you may need to move groups of cells.

There are several ways to select a group of items.

Selected items are highlighted.

  1. Hold down your keyboard shift key and click the each of the items you need.
  2. Create a selecting box. Left mouse button down on a blank area of screen and drag right and down.
  3. There are also options in the 'Edit' menu.

Move the group by dragging one of the selected items or using the left, right, up, down keyboard buttons.

Cell Properties and Button Properties

The 'Properties' option in the menu will present a properties box for the focused item. Alternatively, right-click the item you wish to change.

Cell Properties

The label position can be changed ("to left" or "above").

The tab-index can be changed

Tab-Index.

If you're using the layout for data entry the tab-index of each cell is important.

Set the tab-index numbers to order the cells in the same way as your typical input data. As you enter each piece of data, press the keyboard tab key to take you to the next cell. This can speed up data entry considerably - much quicker than using the mouse.

Button Properties

You can change the text of the button.

You can change the 'hover' text that appears when your mouse pointer hovers over the button.

You can change the script that runs when the button is clicked (advanced topic).

Insert Existing Cell

There may be cells in each of your database records which are not displayed in your layout.

Use the option in the 'Insert' menu to place one of these cells.

Initially, the new cell will appear in the top left corner of your screen. You'll need to move it into position.

Add New Mother Column to Database

This option in the 'insert' menu allows you to add a new column to your database mother table (maintained on your server).

Think carefully before adding new columns. Once added, it cannot be removed. (In general, nothing is ever deleted from the database).

Choose the name carefully. Ideally it will be a name that is easily understood by the users of your database.

Names must consist of letters and numbers. The first character must be a letter. Spaces and punctuation are not permitted.

You'll be asked to set the 'type' of the new database column. If you're adding a new 'picklist' column you'll need to set some options for it (Administration Tools/Configuration).

Add New Child Column to Database

This option in the 'insert' menu allows you to add a new column to your database child table. Follow the guidance for your mother table above.