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

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

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

Post 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? :?:
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post 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.
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post 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.
kipara
Posts: 26
Joined: Thu 16. Sep 2004, 20:48
Location: Bangkok, Thailand

Just skip phpwcms_cache

Post 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
Post Reply