Page 1 of 1

Which tables to backup (I don't want to do them all)

Posted: Sat 30. Sep 2006, 19:13
by Peekay
I have been testing a backup utility called phpMySQLAutoBackup that creates a MySQL dump, zips the SQL file and emails it to you. It's really cool, runs with crontab and gives you an off-site backup.

Check it out at http://www.dwalker.co.uk

My question is, I really don't want to backup the entire PHPWCMS database every day - I just want to do the tables that change with the addition of new articles and new uploads to the image manager. AFAIK these are:

phpwcms_article
phpwcms_articlecontent
phpwcms_file
phpwcms_userlog

Can anyone advise me if I have missed out any critical tables? :?:

Posted: Sun 1. Oct 2006, 00:17
by Peekay
Well I just ran a test just using those tables and it seemed to work when I re-imported the SQL (plus of course an FTP update of phpwcms_filestorage). My test site has about 12 categories with one page per category. Each page has 2 or 3 images and there's a contact form.

Full site raw SQL export is 1.9 MB

Selected table export only is 195 KB :)

The phpMySQLAutoBackup script will zip that even lower before emailing it to me.

Would still welcome a heads-up to any table inclusions that I may have missed.

Posted: Sun 1. Oct 2006, 16:14
by Peekay
OK, updated my list of tables that (AFAIK) are likely to change daily:

phpwcms_address = newsletter subscribers
phpwcms_article = article (list)
phpwcms_articlecat = site categories
phpwcms_articlecontent = article (content)
phpwcms_file = file centre
phpwcms_user = user login details
phpwcms_userdetail = user profile/personal data
phpwcms_userlog = login history
phpwcms_message = private messages

Tried this on another site and got:

Full site SQL export: 3.5 MB
Above tables only: 239 Kb
Zip email attachment: 72 Kb

I now have a filter in my email app that routes incoming backups to a separate folder.

Just skip phpwcms_cache

Posted: Tue 3. Oct 2006, 15:09
by kipara
Hi,

You will find that most space in the PHPWCMS tables is taken by the cache table (especially after a long time). Delete or skip phpwcms_cache and your database will always be 'small'.

That way you never miss out on any important info.

Thanks for the MySQLAutoBackup tip. I'll try that!

Cheers,

Kipara