Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Backing up

Quote Reply
Backing up
Some of these may be dumb questions, but I was hoping for a step by step guide to backing up and restoring both Gmail and Gforum. If I do a SQL Dump of Gmail using MySQL Manager, do I leave all the settings left on default? There are 'select tables', 'create table statements' and 'insert statements' options.

How exactly do I perform a restore using this backup? If I reinstall Gmail how do I get the database back up and running?

I've made a tar of the data directory also. Am I right in thinking this just contains messages, templates etc, and not critical data such as user demographics? (It's just that it's easier to backup the database, than to do the lot every time).

Can the SQL Dump be run as a cronjob? If so what's the format or what alternative means are there for backing up the database other than going manually through MySQL Manager?

Hope someone can help.

Jason
Quote Reply
Re: [wickedmoon] Backing up In reply to
Hi,

Sure, to backup Gossamer Mail using SSH/Telnet do:

1. Backup your SQL Data:

mysqldump --add-drop-table -uUSER -pPASS DATABASE > backup_sql.txt

2. Backup your Messages:

tar czpf backup_data.tar.gz /full/path/to/data

where the path is the path to your data directory.

To restore from a backup you would do:

1. Restore your SQL Data

mysql -uUSER -pPASS DATABASE < backup_sql.txt

2. Restore your messages

cd /path/to/data/.. # one directory behind data
tar xzpf backup_data.tar.gz

will extract your data files and restore templates, message bodies, etc.

Hope this helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Backing up In reply to
Perfect, thanks. Running this as a cronjob will the mysqldump and tar overwrite the existing backups?

Is this the same process for Gforum, both with the database and data?

Jason
Quote Reply
Re: [wickedmoon] Backing up In reply to
Yes, but the tar can take quite a while to complete depending on the size of your database. This is really for dumping the data and moving it to a new site. It's not as robust as a proper system backup (usually provided by your ISP).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Backing up In reply to
I've just tried unarchiving a file using "tar xzpf gforum_data.tar.gz" but it returns an error:

gzip: stdin: not in gzip format
tar: child returned status 1

Any ideas why I can't unarchive on the server?

Jason
Quote Reply
Re: [wickedmoon] Backing up In reply to
Sounds like it's not gzipped. Try:

tar tvf gforum_data.tar.gz

which will just list the contents of the tar file, not extract it (use t to list, x to extract). What probably happened is whatever you used to download the file, unzipped it.

Cheers,

Alex
--
Gossamer Threads Inc.