Backup and Restore

You can transfer the tables and the user related files with the Backup and Restore module in the Admin panel.
The source and the target version of WackoWiki should be the same as well as the table prefix.


Steps in Admin panel

  1. Backup module: Run an backup of the entire wiki including the files.
    1. ensure that the folder file/backup/ exists and is writable
    2. The backup is stored under file/backup/[date_time].
  2. Move the folder to your new installed wiki and put it there at the same location, e.g. file/backup/
  3. Restore module: Run restore.
    1. The restore process can take a considerable amount of time depending on the volume of your backup.

15:50:06 - Initiated Restoration
================================================
Using parameters:
	Ignore duplicated keys: no
	Ignore duplicated files: no

Saved cluster: no
	Assume DROP TABLE


15:50:06 - Restoring the structure of the table
================================================
Perform SQL-instructions:

DROP TABLE IF EXISTS `lab_acl`;
CREATE TABLE IF NOT EXISTS `lab_acl` (
	`page_id` int(10) unsigned NOT NULL,
	`privilege` varchar(10) NOT NULL,
	`list` mediumtext NOT NULL, 
	UNIQUE `idx_page_id` (`page_id`, `privilege`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_auth_token`;
CREATE TABLE IF NOT EXISTS `lab_auth_token` (
	`auth_token_id` int(10) unsigned NOT NULL auto_increment,
	`selector` char(12) NOT NULL,
	`token` char(64) NOT NULL,
	`user_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`token_expires` datetime, 
	PRIMARY KEY (`auth_token_id`), 
	UNIQUE `idx_selector` (`selector`), 
	KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_cache`;
CREATE TABLE IF NOT EXISTS `lab_cache` (
	`cache_id` int(10) unsigned NOT NULL auto_increment,
	`name` char(40) NOT NULL,
	`method` varchar(20) NOT NULL,
	`query` varchar(100) NOT NULL,
	`cache_lang` varchar(2) NOT NULL,
	`cache_time` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL on update CURRENT_TIMESTAMP, 
	PRIMARY KEY (`cache_id`), 
	KEY `name` (`name`), 
	KEY `idx_cache_time` (`cache_time`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_config`;
CREATE TABLE IF NOT EXISTS `lab_config` (
	`config_id` int(10) unsigned NOT NULL auto_increment,
	`config_name` varchar(100) NOT NULL,
	`config_value` mediumtext,
	`updated` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL on update CURRENT_TIMESTAMP, 
	PRIMARY KEY (`config_id`), 
	UNIQUE `name` (`config_name`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_category`;
CREATE TABLE IF NOT EXISTS `lab_category` (
	`category_id` int(10) unsigned NOT NULL auto_increment,
	`parent_id` int(10) unsigned NOT NULL,
	`category_lang` varchar(2) NOT NULL,
	`category` varchar(100) NOT NULL,
	`category_description` varchar(255) NOT NULL, 
	PRIMARY KEY (`category_id`), 
	UNIQUE `idx_categories` (`category_lang`, `category`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_category_assignment`;
CREATE TABLE IF NOT EXISTS `lab_category_assignment` (
	`assignment_id` int(10) unsigned NOT NULL auto_increment,
	`category_id` int(10) unsigned NOT NULL,
	`object_type_id` int(10) unsigned NOT NULL,
	`object_id` int(10) unsigned NOT NULL, 
	PRIMARY KEY (`assignment_id`), 
	UNIQUE `idx_assignment` (`category_id`, `object_type_id`, `object_id`), 
	KEY `idx_object_type_id` (`object_type_id`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_external_link`;
CREATE TABLE IF NOT EXISTS `lab_external_link` (
	`link_id` int(10) unsigned NOT NULL auto_increment,
	`page_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`link` text NOT NULL, 
	PRIMARY KEY (`link_id`), 
	KEY `idx_page_id` (`page_id`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_file`;
CREATE TABLE IF NOT EXISTS `lab_file` (
	`file_id` int(10) unsigned NOT NULL auto_increment,
	`page_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`user_id` int(10) unsigned NOT NULL,
	`file_name` varchar(250) NOT NULL,
	`file_lang` varchar(2) NOT NULL,
	`file_description` varchar(250) NOT NULL,
	`caption` text NOT NULL,
	`author` varchar(250) NOT NULL,
	`source` varchar(250) NOT NULL,
	`source_url` varchar(255) NOT NULL,
	`license_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`uploaded_dt` datetime,
	`modified_dt` datetime,
	`file_size` int(10) unsigned DEFAULT '0' NOT NULL,
	`picture_w` int(10) unsigned DEFAULT '0' NOT NULL,
	`picture_h` int(10) unsigned DEFAULT '0' NOT NULL,
	`file_ext` varchar(10) NOT NULL,
	`mime_type` varchar(255) NOT NULL,
	`hits` int(10) unsigned NOT NULL,
	`deleted` tinyint(1) unsigned DEFAULT '0', 
	PRIMARY KEY (`file_id`), 
	KEY `user_id` (`page_id`), 
	KEY `idx_deleted` (`deleted`), 
	KEY `idx_page_id` (`page_id`, `file_name`), 
	KEY `idx_page_id_2` (`page_id`, `uploaded_dt`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_file_link`;
CREATE TABLE IF NOT EXISTS `lab_file_link` (
	`file_link_id` int(10) unsigned NOT NULL auto_increment,
	`page_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`file_id` int(10) unsigned DEFAULT '0' NOT NULL, 
	PRIMARY KEY (`file_link_id`), 
	KEY `idx_page_id` (`page_id`), 
	KEY `idx_file_id` (`file_id`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_log`;
CREATE TABLE IF NOT EXISTS `lab_log` (
	`log_id` int(10) unsigned NOT NULL auto_increment,
	`log_time` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL on update CURRENT_TIMESTAMP,
	`level` tinyint(1) NOT NULL,
	`user_id` int(10) unsigned NOT NULL,
	`ip` varchar(15) NOT NULL,
	`message` mediumtext NOT NULL, 
	PRIMARY KEY (`log_id`), 
	KEY `idx_level` (`level`), 
	KEY `idx_user` (`user_id`), 
	KEY `idx_ip` (`ip`), 
	KEY `idx_time` (`log_time`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_menu`;
CREATE TABLE IF NOT EXISTS `lab_menu` (
	`menu_id` int(10) unsigned NOT NULL auto_increment,
	`user_id` int(10) unsigned NOT NULL,
	`page_id` int(10) unsigned NOT NULL,
	`menu_lang` varchar(2) NOT NULL,
	`menu_title` varchar(100) NOT NULL,
	`menu_position` smallint(2) unsigned NOT NULL, 
	PRIMARY KEY (`menu_id`), 
	UNIQUE `user_id` (`user_id`, `page_id`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_page`;
CREATE TABLE IF NOT EXISTS `lab_page` (
	`page_id` int(10) unsigned NOT NULL auto_increment,
	`version_id` int(10) unsigned DEFAULT '1' NOT NULL,
	`tag` varchar(250) NOT NULL,
	`supertag` varchar(250) NOT NULL,
	`menu_tag` varchar(250) NOT NULL,
	`created` datetime,
	`modified` datetime,
	`body` longtext NOT NULL,
	`body_r` longtext NOT NULL,
	`body_toc` mediumtext NOT NULL,
	`formatting` varchar(20) DEFAULT 'wacko' NOT NULL,
	`owner_id` int(10) unsigned NOT NULL,
	`edit_note` varchar(200) NOT NULL,
	`minor_edit` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`page_size` int(10) unsigned DEFAULT '0' NOT NULL,
	`license_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`ip` varchar(15) NOT NULL,
	`user_id` int(10) unsigned NOT NULL,
	`latest` tinyint(1) DEFAULT '1' NOT NULL,
	`handler` varchar(30) DEFAULT 'page' NOT NULL,
	`comment_on_id` int(10) unsigned NOT NULL,
	`comments` int(4) unsigned DEFAULT '0' NOT NULL,
	`files` int(4) unsigned DEFAULT '0' NOT NULL,
	`revisions` int(10) unsigned DEFAULT '0' NOT NULL,
	`hits` int(11) unsigned DEFAULT '0' NOT NULL,
	`theme` varchar(20) NOT NULL,
	`page_lang` varchar(2) NOT NULL,
	`title` varchar(250) NOT NULL,
	`depth` int(10) unsigned DEFAULT '0' NOT NULL,
	`parent_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`commented` datetime,
	`description` varchar(250) NOT NULL,
	`keywords` varchar(250) NOT NULL,
	`footer_comments` tinyint(1) unsigned DEFAULT '1',
	`footer_files` tinyint(1) unsigned DEFAULT '1',
	`footer_rating` tinyint(1) unsigned DEFAULT '0',
	`hide_toc` tinyint(1) unsigned,
	`hide_index` tinyint(1) unsigned,
	`reviewed` tinyint(1) unsigned DEFAULT '0',
	`reviewed_time` datetime,
	`reviewer_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`tree_level` tinyint(1) unsigned DEFAULT '0',
	`show_menu_tag` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`allow_rawhtml` tinyint(1) unsigned,
	`disable_safehtml` tinyint(1) unsigned,
	`noindex` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`deleted` tinyint(1) unsigned DEFAULT '0' NOT NULL, 
	PRIMARY KEY (`page_id`), 
	UNIQUE `idx_tag` (`tag`), 
	KEY `idx_supertag` (`supertag`), 
	KEY `idx_created` (`created`), 
	KEY `idx_title` (`title`), 
	KEY `idx_minor_edit` (`minor_edit`), 
	KEY `idx_modified` (`modified`), 
	KEY `idx_commented` (`commented`), 
	KEY `idx_user_id` (`user_id`), 
	KEY `idx_owner_id` (`owner_id`), 
	KEY `idx_comment_on_id` (`comment_on_id`), 
	KEY `depth` (`depth`), 
	KEY `idx_deleted` (`deleted`), 
	FULLTEXT KEY `body` (`body`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_page_link`;
CREATE TABLE IF NOT EXISTS `lab_page_link` (
	`id` int(10) unsigned NOT NULL auto_increment,
	`from_page_id` int(10) unsigned NOT NULL,
	`to_tag` varchar(250) NOT NULL,
	`to_page_id` int(10) unsigned NOT NULL,
	`to_supertag` varchar(250) NOT NULL, 
	PRIMARY KEY (`id`), 
	KEY `idx_to` (`to_tag`), 
	KEY `idx_from_page_id` (`from_page_id`), 
	KEY `idx_from_tag` (`from_page_id`, `to_tag`(78))
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_poll`;
CREATE TABLE IF NOT EXISTS `lab_poll` (
	`poll_id` int(10) unsigned NOT NULL,
	`v_id` tinyint(3) unsigned NOT NULL,
	`text` varchar(255) NOT NULL,
	`user_id` int(10) unsigned NOT NULL,
	`plural` tinyint(1) NOT NULL,
	`votes` smallint(5) unsigned NOT NULL,
	`start` datetime,
	`end` datetime, 
	KEY `idx_poll_id` (`poll_id`), 
	KEY `idx_time_frame` (`start`, `end`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_rating`;
CREATE TABLE IF NOT EXISTS `lab_rating` (
	`page_id` int(10) unsigned NOT NULL,
	`value` int(11) NOT NULL,
	`voters` int(10) unsigned NOT NULL,
	`rating_time` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL on update CURRENT_TIMESTAMP, 
	PRIMARY KEY (`page_id`), 
	KEY `idx_voters_rate` (`voters`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_referrer`;
CREATE TABLE IF NOT EXISTS `lab_referrer` (
	`referrer_id` int(10) unsigned NOT NULL auto_increment,
	`page_id` int(10) NOT NULL,
	`referrer` char(150) NOT NULL,
	`referrer_time` datetime, 
	PRIMARY KEY (`referrer_id`), 
	KEY `idx_time` (`referrer_time`), 
	KEY `idx_page_id` (`page_id`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_revision`;
CREATE TABLE IF NOT EXISTS `lab_revision` (
	`revision_id` int(10) unsigned NOT NULL auto_increment,
	`page_id` int(10) unsigned NOT NULL,
	`version_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`tag` varchar(250) NOT NULL,
	`supertag` varchar(250) NOT NULL,
	`menu_tag` varchar(250) NOT NULL,
	`created` datetime,
	`modified` datetime,
	`body` longtext NOT NULL,
	`body_r` longtext NOT NULL,
	`formatting` varchar(20) DEFAULT 'wacko' NOT NULL,
	`owner_id` int(10) unsigned NOT NULL,
	`user_id` int(10) unsigned NOT NULL,
	`edit_note` varchar(100) NOT NULL,
	`minor_edit` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`page_size` int(10) unsigned DEFAULT '0' NOT NULL,
	`reviewed` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`reviewed_time` datetime,
	`reviewer_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`ip` varchar(15) NOT NULL,
	`latest` tinyint(1) DEFAULT '0' NOT NULL,
	`handler` varchar(30) DEFAULT 'page' NOT NULL,
	`comment_on_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`page_lang` varchar(2) NOT NULL,
	`title` varchar(100) NOT NULL,
	`description` varchar(250) NOT NULL,
	`keywords` varchar(250) NOT NULL,
	`deleted` tinyint(1) unsigned DEFAULT '0' NOT NULL, 
	PRIMARY KEY (`revision_id`), 
	KEY `idx_tag` (`tag`), 
	KEY `idx_supertag` (`supertag`), 
	KEY `idx_latest` (`latest`), 
	KEY `idx_minor_edit` (`minor_edit`), 
	KEY `idx_modified` (`modified`), 
	KEY `idx_approved` (`reviewed`), 
	KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_user`;
CREATE TABLE IF NOT EXISTS `lab_user` (
	`user_id` int(10) unsigned NOT NULL auto_increment,
	`user_name` varchar(80) NOT NULL,
	`real_name` varchar(80) NOT NULL,
	`account_lang` varchar(2) NOT NULL,
	`password` varchar(255) NOT NULL,
	`salt` varchar(40) NOT NULL,
	`email` varchar(50) NOT NULL,
	`account_status` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`account_type` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`enabled` tinyint(1) unsigned DEFAULT '1' NOT NULL,
	`signup_time` datetime,
	`change_password` varchar(100) NOT NULL,
	`user_ip` varchar(40) NOT NULL,
	`user_form_salt` varchar(40) NOT NULL,
	`email_confirm` varchar(64) NOT NULL,
	`last_visit` datetime,
	`last_mark` datetime,
	`login_count` int(10) unsigned DEFAULT '0' NOT NULL,
	`lost_password_request_count` smallint(6) unsigned DEFAULT '0' NOT NULL,
	`failed_login_count` smallint(6) unsigned DEFAULT '0' NOT NULL,
	`total_pages` int(10) unsigned DEFAULT '0' NOT NULL,
	`total_revisions` int(10) unsigned DEFAULT '0' NOT NULL,
	`total_comments` int(10) unsigned DEFAULT '0' NOT NULL,
	`total_uploads` int(10) unsigned DEFAULT '0' NOT NULL,
	`fingerprint` varchar(40) NOT NULL, 
	PRIMARY KEY (`user_id`), 
	UNIQUE `idx_user_name` (`user_name`), 
	KEY `idx_signuptime` (`signup_time`), 
	KEY `idx_enabled` (`enabled`), 
	KEY `account_type` (`account_type`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_user_setting`;
CREATE TABLE IF NOT EXISTS `lab_user_setting` (
	`setting_id` int(10) unsigned NOT NULL auto_increment,
	`user_id` int(10) unsigned NOT NULL,
	`theme` varchar(20),
	`user_lang` varchar(2) NOT NULL,
	`list_count` int(10) unsigned DEFAULT '50',
	`menu_items` int(2) unsigned DEFAULT '5' NOT NULL,
	`dont_redirect` tinyint(1) unsigned,
	`send_watchmail` tinyint(1) unsigned DEFAULT '1',
	`show_files` tinyint(1) unsigned,
	`show_comments` tinyint(1) unsigned DEFAULT '1',
	`doubleclick_edit` tinyint(1) unsigned DEFAULT '1',
	`show_spaces` tinyint(1) unsigned DEFAULT '1',
	`typografica` tinyint(1) unsigned DEFAULT '1',
	`allow_intercom` tinyint(1) unsigned,
	`allow_massemail` tinyint(1) unsigned DEFAULT '0',
	`autocomplete` tinyint(1) unsigned,
	`numerate_links` tinyint(1) unsigned DEFAULT '1' NOT NULL,
	`diff_mode` tinyint(1) unsigned DEFAULT '2' NOT NULL,
	`notify_minor_edit` tinyint(1) unsigned DEFAULT '1' NOT NULL,
	`notify_page` tinyint(1) unsigned DEFAULT '1' NOT NULL,
	`notify_comment` tinyint(1) unsigned DEFAULT '1' NOT NULL,
	`hide_lastsession` tinyint(1) unsigned,
	`validate_ip` tinyint(1) unsigned,
	`noid_pubs` tinyint(1) unsigned,
	`session_length` tinyint(3) unsigned,
	`timezone` varchar(32),
	`dst` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`sorting_comments` tinyint(1) unsigned DEFAULT '0' NOT NULL, 
	PRIMARY KEY (`setting_id`), 
	UNIQUE `idx_user_id` (`user_id`), 
	KEY `idx_send_watchmail` (`send_watchmail`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_usergroup`;
CREATE TABLE IF NOT EXISTS `lab_usergroup` (
	`group_id` int(10) unsigned NOT NULL auto_increment,
	`group_name` varchar(100) NOT NULL,
	`group_lang` varchar(2) NOT NULL,
	`description` varchar(255) NOT NULL,
	`moderator_id` varchar(25) NOT NULL,
	`created` datetime,
	`is_system` tinyint(1) unsigned NOT NULL,
	`open` tinyint(1) unsigned NOT NULL,
	`active` tinyint(1) unsigned NOT NULL, 
	PRIMARY KEY (`group_id`), 
	UNIQUE `idx_group_name` (`group_name`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_usergroup_member`;
CREATE TABLE IF NOT EXISTS `lab_usergroup_member` (
	`group_id` int(10) unsigned NOT NULL,
	`user_id` int(10) unsigned NOT NULL, 
	UNIQUE `idx_group_id` (`group_id`, `user_id`)
) ENGINE=InnoDB CHARSET=latin1;
DROP TABLE IF EXISTS `lab_watch`;
CREATE TABLE IF NOT EXISTS `lab_watch` (
	`watch_id` int(10) unsigned NOT NULL auto_increment,
	`user_id` int(10) unsigned NOT NULL,
	`page_id` int(10) unsigned NOT NULL,
	`comment_id` int(10) unsigned DEFAULT '0' NOT NULL,
	`pending` tinyint(1) unsigned DEFAULT '0' NOT NULL,
	`time` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL on update CURRENT_TIMESTAMP, 
	PRIMARY KEY (`watch_id`)
) ENGINE=InnoDB CHARSET=latin1;


15:51:03 - Completed. Processed instructions: 44


15:51:03 - Restore the contents of tables
================================================
Just download and process tables dump
(Instruction INSERT):

	15:51:03 - lab_acl
	==========================
		records:   1192

	15:55:46 - lab_auth_token
	==========================
		records:   1

	15:55:46 - lab_cache
	==========================
		records:   7

	15:55:48 - lab_config
	==========================
		records:   200

	15:56:34 - lab_category
	==========================
		records:   26

	15:56:40 - lab_category_assignment
	==========================
		records:   109

	15:56:40 - lab_external_link
	==========================
		records:   0

	15:56:40 - lab_file
	==========================
		records:   32

	15:56:48 - lab_file_link
	==========================
		records:   20

	15:56:52 - lab_log
	==========================
		records:   148

	15:57:26 - lab_menu
	==========================
		records:   91

	15:57:47 - lab_page
	==========================
		records:   331

	15:59:31 - lab_page_link
	==========================
		records:   90

	15:59:53 - lab_poll
	==========================
		records:   17

	16:00:00 - lab_rating
	==========================
		records:   0

	16:00:00 - lab_referrer
	==========================
		records:   1

	16:00:00 - lab_revision
	==========================
		records:   175

	16:00:49 - lab_user
	==========================
		records:   25

	16:00:56 - lab_user_setting
	==========================
		records:   23

	16:01:02 - lab_usergroup
	==========================
		records:   4

	16:01:03 - lab_usergroup_member
	==========================
		records:   6

	16:01:05 - lab_watch
	==========================
		records:   215

16:01:57 - Completed. Total entries: 2604


16:01:57 - Restoring files
================================================
Decompress and store the contents of directories
(homonymic files: replace):

	16:01:57 - file/global
	==========================
		File: 10
		restored: 10
		skipped: 0

	16:01:57 - file/perpage
	==========================
		File: 23
		restored: 23
		skipped: 0

16:01:57 - Completed. Total files:
	all: 33
	restored: 33
	skipped: 0


================================================
16:01:57 - RESTORATION COMPLETED