restoring backups and restore_backup.php

Started by Trekkie101, April 07, 2005, 04:10:25 PM

Previous topic - Next topic

Trekkie101

Recently i was restoring a backup for MrFlicks, first I had to re-install SMF to have a database and tables and such made, but then I had trouble, I continually got errors about duplicate tables, restore_backup done the same thing, so I had to truncate the tables, all of them just about on a fresh install. So maybe a piece for feedback for either the SMF backup process to add at the top of its backup and maybe for restore_backup to include is to truncate all the tables first. I had to do it table by table

MySQL didnt like

TRUNCATE `smf_*`
I guess * isnt the same in SQL.

Just my two pennys.

EDIT:

Incase anyone needs to do this too, run the following code in the SQL window

TRUNCATE `smf_attachments`;
TRUNCATE `smf_banned`;
TRUNCATE `smf_board_permissions`;
TRUNCATE `smf_boards`;
TRUNCATE `smf_calendar`;
TRUNCATE `smf_calendar_holidays`;
TRUNCATE `smf_categories`;
TRUNCATE `smf_collapsed_categories`;
TRUNCATE `smf_im_recipients`;
TRUNCATE `smf_instant_messages`;
TRUNCATE `smf_log_actions`;
TRUNCATE `smf_log_activity`;
TRUNCATE `smf_log_banned`;
TRUNCATE `smf_log_boards`;
TRUNCATE `smf_log_errors`;
TRUNCATE `smf_log_floodcontrol`;
TRUNCATE `smf_log_karma`;
TRUNCATE `smf_log_mark_read`;
TRUNCATE `smf_log_notify`;
TRUNCATE `smf_log_online`;
TRUNCATE `smf_log_polls`;
TRUNCATE `smf_log_search`;
TRUNCATE `smf_log_topics`;
TRUNCATE `smf_membergroups`;
TRUNCATE `smf_members`;
TRUNCATE `smf_messages`;
TRUNCATE `smf_moderators`;
TRUNCATE `smf_permissions`;
TRUNCATE `smf_poll_choices`;
TRUNCATE `smf_polls`;
TRUNCATE `smf_sessions`;
TRUNCATE `smf_settings`;
TRUNCATE `smf_smileys`;
TRUNCATE `smf_themes`;
TRUNCATE `smf_topics`;


Thats only if you are using the prefix smf_


Advertisement: