Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » migrating

#1 2012-04-27 07:02:49

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

migrating

I am in the process of migrating our sites and I have some tables which are over 100Mbs (size larger than what phpMyAdmin allows for upload). Can anyone post here a step by step method I which I could use to move those tables to the new server?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2012-04-27 10:13:55

trenc
Plugin Author
From: Amsterdam
Registered: 2008-02-27
Posts: 571
Website GitHub

Re: migrating

Hi Yiannis,

I am in the process of migrating our sites and I have some tables which are over 100Mbs (size larger than what phpMyAdmin allows for upload). Can anyone post here a step by step method I which I could use to move those tables to the new server?

  1. Connect via SSH on Server OLD.
  2. Connect to your db with mysql – MySQL Command Line Tool
  3. Create a dump with mysqldump
  4. Move the dump to your Server NEW (via sftp, ftp, scp, fish etc. pp.).
  5. Connect via SSH on Server NEW.
  6. Connect to your DB with mysql – MySQL Command Line Tool
  7. Import the db dump with mysqlimport

I guess, that should do the job.

Please note, I refer to the docs of MySQL 5.1.

Offline

#3 2012-04-27 12:06:11

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: migrating

trenc wrote:

bq.# Connect via SSH on Server OLD.

Hi Tommy,

Many thanks for your response

I use a mac should I do that with the terminal? If so what commands should I use?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2012-04-27 13:21:56

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: migrating

colak wrote:

SSH … I use a mac should I do that with the terminal? If so what commands should I use?

You can interact with OpenSSH with ssh command. For see all the available CLI options type in just ssh and press enter. To connect to a server you would pretty much just give ssh an address and/or user. I.e.

ssh user@hostname

Also, Terminal has a pane for bookmarking and building remove connections, which you can open with Shit+CMD+K.

Last edited by Gocom (2012-04-27 13:24:19)

Offline

#5 2012-04-27 15:24:06

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: migrating

colak wrote:

I use a mac should I do that with the terminal? If so what commands should I use?

Get Sequel Pro and you can do all you want (and more) with your MySQL database. Even back it up or migrate it or create an SSH-tunnel :)

Last edited by stephan (2012-04-27 15:24:56)


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#6 2012-04-27 15:48:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: migrating

Thanks soo much guys. I’ll dive into it and let you know what happens here.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2012-04-28 03:38:38

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 164
Website

Re: migrating

I discovered you can cut down the size a lot by leaving out the logs. I got under the limit that way.


Mark

Offline

#8 2012-04-28 07:08:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: migrating

OK, I have moved everything thanks to your advice but I am having a problem with pages not rendering.

I have 4 domains but I’ll start with the main one: NeMe. My diagnostics below check out just fine but the front page on www.neme.org/ does not show at all whereas the other pages appear OK.

Can anyone shed some light to this?

Textpattern version: 4.4.1 (r3575)
Last update: 2011-07-05 18:12:52/2012-04-27 06:53:50
Document root: /users/home/yiannis/web/public
$path_to_site: /users/home/yiannis/web/public
Textpattern path: /users/home/yiannis/web/public/textpattern
Permanent link mode: id_title
upload_tmp_dir: /users/home/yiannis/tmp
Temporary directory path: /users/home/yiannis/web/public/textpattern/tmp
Site URL: www.neme.org
PHP version: 5.3.5
GD Image Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server TZ: GMT
Server local time: 2012-04-28 07:03:52
DST enabled?: 1
Automatically adjust DST setting?: 0
Time zone: Asia/Nicosia (7200)
MySQL: 5.1.54-log
Locale: en_GB.ISO_8859-1
Server: Apache
PHP server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: SunOS 5.11
Active plugins: zem_redirect-1.2.1m, fha_time_diff-0.23m, mdn_count-2.1.1, glx_countdown-0.1, glx_admin_ping-0.1m, sed_afu-0.6m, wet_slimpattern-0.4.1m, wet_opensearch-0.1, ike_slideshow-0.02m, wlk_qt-0.9.7, the_video-0.7, rvm_privileged-0.4, yab_image-0.3, act_if_mobile-0.1, zem_contact_lang-4.0.3.6, zem_contact_reborn-4.0.3.20, rah_repeat-0.6, smd_calendar-0.53, glx_admin_image-2006.1, rss_admin_db_manager-4.3m, upm_savenew-0.4.2, zem_article_info-0.1, bas_locate_me-0.1, rvm_css-0.7, rah_sitemap-0.9, rah_external_output-0.5, rah_unlog_me-0.1, mem_postmaster-1.0.10m, adi_matrix-0.3m, adi_notes-1.1.1, spf_js-0.1, mem_postmaster_library-1.0.10, ied_plugin_composer-0.83, smd_where_used-0.2, smd_prefalizer-0.12, msd_textile_link-0.1
Admin-side theme: remora 4.4.1

.htaccess file contents:
————————————
ErrorDocument 403 /403.php
Header append X-FRAME-OPTIONSSAMEORIGIN

RewriteCond %{HTTP_HOST} ^neme.org [NC]
RewriteRule ^(.*)$ http://www.neme.org/$1 [L,R=301]

#RewriteRule ^/sitemap/ /texts/ [R=301,L]
RedirectMatch 301 ^/main/?(.+)?$ http://www.neme.org/$1
RedirectMatch 301 /forum/?(.+)?$ http://forum.neme.org/$1
#Redirect /category/calls /calls

RewriteEngine On
#SecFilterSelective REMOTE_ADDR ^87.228.151.198$ nolog,allow
SecFilterSelective “REQUEST_URI” “http://forum.neme.org/post.php” “allow,nolog”
SecFilterSelective “REQUEST_URI” “http://forum.neme.org/edit.php” “allow,nolog”

#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

————————————


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2012-04-28 07:12:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: migrating

>Edit. Forget it. It is my “includes”. I’ll get back to you:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2012-04-29 08:08:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: migrating

Just in case anybody else needs it. All my sites broke as I was using rah_external to link the site contents together. The code I was using can be found here. The problem was solved by following Jukka’s advice here.

All is up and working as expected now:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2012-05-08 07:22:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: migrating

I just discovered a problem with the site on hblack.net

On the previous server set up, the home page was displaying a random image in the background. For that I was using a script and was calling it with background: url('<?php include("ri.php");?>');. Now that includes are not accepted I tried using background: url(<?php echo file_get_contents('ri.php');?>); but again, nothing is parsed.

this is the php script

<?php
$your_dirname="rando/";

$your_alt_tag="hb";
//
/*

*/
p. function displayAaPHPrandomImage($dirname, $alt){
  $dirhandle = opendir($dirname);
  while (false !== ($file = readdir($dirhandle))) {
    if ($file != "." && $file != ".." && !@is_dir($file)) {
      $filelist[] = $file;
    }
  }
  closedir($dirhandle); 

  if(sizeof($filelist) ==0) { 
    echo "No file was found in the directory!";
    exit;
  }

  srand((double)microtime()*1000000);
  $picnum = @rand(0, sizeof($filelist) - 1);
  $imageName=$dirname.$filelist[$picnum];
  $imageSize = getimagesize($imageName);

$result="$imageName";
return $result;

  }
?>
<?=displayAaPHPrandomImage($your_dirname)?>

Can anyone point me as to what might be going wrong?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#12 2012-05-08 08:14:32

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: migrating

Sorted :)

Note to self: Don’t use any third party scripts when a combination of native txp tags and a trusted txp plugin can do the job just as well and possibly in a safer way.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

  1. Index
  2. » How do I…?
  3. » migrating

Board footer

Powered by FluxBB