Loading...
 
This should merge with Move Tiki using SSH

Migrate a Tiki to a new server with SSH

These instruction are more tips/reminders for developers than step by step instructions for end-users


Context

  • You need to move a Tiki site from server A to server B
  • Both servers have SSH and rsync
  • Tiki may have been installed by SVN or CVS
  • You are not upgrading (you can do this later)
  • Downtime is OK while you move the site and change the DNS



Close site

  • tiki-admin.php?page=general -> navigation -> Site Access -> Close site (except for those with permission)


DB

You can use PhpMyAdmin if you have it on both servers, but often, files are too big for web interface or you could get "#1153 - Got a packet bigger than 'max_allowed_packet' bytes ". You can also get this via the command line.

Backup DB


Go to a non web accessible directory and create a new directory

cd ..
mkdir mysqlbackup
cd mysqlbackup


Get the db, user and password from db/local.php
mysqldump -u old_db_user -p --opt old_tiki_db > databasebackupfile.sql

Check the file to be sure it contains the last table: users_users
tail --lines=200 databasebackupfile.sql

Move DB

SFTP

You may want to compress before you migrate

use bzip2
bzip2 databasebackupfile.sql


This will create a file databasebackupfile.sql.bz2 which will be much smaller. Also, if you migrate a compressed file, and there is a transmission problem, you will get a warning when you uncompress at the other end.

Move the file via SFTP and then, uncompress:

use bunzip2
bunzip2 databasebackupfile.sql.bz2


rsync

You can adapt rsync instructions below

Restore DB

Create a new DB via your control panel. This a good opportunity to change the password, so don't use the same as before.

mysql -u new_db_user -p new_tiki_db < databasebackupfile.sql


It's not unlikely that you get an error like

ERROR 1153 (08S01) at line 219147: Got a packet bigger than 'max_allowed_packet' bytes

If so, delete your partially created database, search for the solution for your server to increase this value, and try again.

After you restore, compare both databases via PhpMyAdmin to double check all was well transferred. The number of tables and records should be identical, however, the size in megs can vary, and that's OK.


Files in web directory

Check for differences

This is a good time to check if the Tiki has been modified. The following commands will show you if files were modified.
It's good to detect if you've been hacked or if their are modifications to Tiki that you need to account for (and reproduce when you upgrade later)

CVS

export CVS_RSH=ssh
cvs diff

SVN

  • svn st
  • svn diff

Security check

  • tiki-admin_security.php -> Check all tiki files

Migrate files

Rsync

SSH in the new site. From here, we'll pull the files

Create some directories

cd ..
mkdir temp_directory_to_receive_files
cd temp_directory_to_receive_files

Do a test run

rsync --dry-run --verbose -avz oldusername@olddomain.example.com:/home/oldusername/public_html /home/newusername/temp_directory_to_receive_files/

Do it for real

Remove --dry-run from above

Once this works, you can move the files from
/home/newusername/temp_directory_to_receive_files/*.*
to
/home/newusername/www/*.*

Zip & (S)FTP

  • It's better to compress the files (zip/gzip) before you migrate them to make sure nothing is lost on the way...

Adjust the file permissions

sh setup.sh

Files outside the web directory


Check tiki-admin_system.php

And where attachments are stored for wiki, file gallery, trackers, forums, etc. Ex: tiki-admin.php?page=wiki

Make sure to move these as well...

Update database connection


You can do this via tiki-install.php or by editing db/local.php (Edit this file to use new db name/username/password)

Switch the DNS

  • Ask whoever controls the domain name to switch the DNS


Add an alternate domain to the old site

  • You can do this via cPanel (park domain)
  • It is useful to keep a functioning (and closed) version of the old site so admins can go and check if something is fishy on the new site


Open the new site

  • tiki-admin.php?page=general -> navigation -> Site Access -> Close site (except for those with permission)




Optional but it can't hurt: log in as an admin and
Admin → Tiki Cache/Sys Admin → Clear all Tiki caches

doc.tiki.org

Bootstrap AdminGuide UserGuide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Trackers
Transitions
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki
Show PHP error messages