Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Backup Procedure

Quote Reply
Backup Procedure
I must thank PugDog and Alex for helping me with all my minor problems. I nearly have Links working the way I want it. All it needs now is entries.

What I need to ask is what is the best way to backup the whole database. I don't want to rely on the company hosting my website and want to be able to store a backup locally. Is this possible from telnet and what are the commands. I am using MySQL. I have seen a backup (export) feature in the admin will this delete the current database or just export an extra copy of it.


Quote Reply
Re: Backup Procedure In reply to
Thanks Smile

The database is backed up every time you do a "build".

The files that are exported are all you really need to rebuild the database, but to make life easier, you should have a current copy of the entire /cgi-bin/links tree -- especially the Links.pm file, the templates and def files (for all changes you've made) and the HTML_templates.pm file (if you add to the global variables hash).

Beyond that, copying the files in the "backup" directory should cover you.

I do a weekly backup of the entire directory, but I have a fast line, and I can put up with 7 or 14 copies of the database in the backup area. If time was a concern, I'd make sure I kept a current copy of the various scripts as above, then download a set of the database back ups once a week.

If you have access to cron, you could probably set a cron job to run to gzip the most current versions and mail them to you every sunday or something like that.

I've said it before, and there's no teacher like experience... ANY CHANGES YOU MAKE TO THE DATABASES ADD TO THE SQL.MYSQL file!!!

That way, if you have to rebuild your database, you have a current copy with all the fields, defaults, etc that you have changed.

If you have PHP installed, you can use the PHPmyAdmin program to do a database structure dump, and save that. That, plus a copy of your current defs directory can rebuild your MySQL database and the defaults Links SQL uses to access it.

The command to dump the database structure from mysqladmin escapes me at the moment.... Once you use the PHPMyAdmin program, you really don't want to be without it... No arcane commands to remember, point/click access, etc.

From what I understand WebMin now has a MySQL module. For those of you running your own servers you can install this program --


And gain _FULL_ access to your server through the web. You MUST MUST MUST protect the directory it's in, don't leave your passwords in MSIE, etc, and chose an ID/password that is 2x as obscure as your 'root' password, because anyone who cracks this program, has access to your entire server as root! (there's no real difference than someone banging away via telnet to crack your passwords, but people are much more lax about HTTP passwords than root/telnet ones... DON'T BE if you use this!)

But, It can do a lot of things easily, including manage sendmail, qmail and apache, as well as cron, running processes, user accounts, disc quotas, network status, reboot, etc.

If you are very compulsive, you can only start it when you know you need remote access, such as when you are on vaction, at a convention, etc. This way you can disable FTP/Telnet from any but trusted IP's (such as a dedicated DSL number) and still give yourself root access from the outside if you need to.

The other advantage of webmin for those less security paranoid, is that you can manage your whole webserver (physical unix box too) from a web browser.... which means you can use almost any computer -- including a webTV terminal (though I've never tried) to access or fix your server. You don't have to rely on the computer you are using to have telnet, ftp or other fancy access.

For those of you who are the SysAdmin for your company... this program is a great asset! It lets you have a life! Smile

POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Backup Procedure In reply to
pugdog thanks for the reply

I have phpAmyAdmin setup already and just created a dump of all tables and data works fine. Im finding out how to setup cron so that it will send me all the def files to my email address. I will run a weekly dump to ensure I can bring the database upto date if the unthinkable happens. I've seen it before on NT servers and it wasn't nice trying to fiddle around with 5 3gig backup tapes.

Thanks pugdog and your Faq is really good aswell.