Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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?
- Connect via SSH on Server OLD.
- Connect to your db with mysql – MySQL Command Line Tool
- Create a dump with mysqldump
- Move the dump to your Server NEW (via sftp, ftp, scp, fish etc. pp.).
- Connect via SSH on Server NEW.
- Connect to your DB with mysql – MySQL Command Line Tool
- Import the db dump with mysqlimport
I guess, that should do the job.
Please note, I refer to the docs of MySQL 5.1.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
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
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
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 theme • Minimum 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
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
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
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-OPTIONS “SAMEORIGIN”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 /callsRewriteEngine 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
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
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
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
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
Re: migrating
colak wrote:
Now that
includes are not accepted
Are not accepted where? Includes are accepted, valid. If you are referring to previous mentions concerning rah_external_output, those where about non-local filesystem files, where actual content where transferred over internet.
file_get_contents
File_get_contents is a file function and just merely reads files. include on the other hand is for evaluating PHP source code. file_get_contents will not evaluate (i.e. execute) any code, it just reads files.
<?php […] ?>
Let’s start with the tags. Use of raw PHP is deprecated, and the support will be removed in the next release, Textpattern v4.5.0. Instead of those, please see and use <txp:php> tags when working with PHP block in page and form templates.
nothing is […] what might be going wrong?
Try to turn Debugging mode on. Potentially one the file paths could be incorrect (using absolute paths might not hurt), or you may not have rights to the directory.
As the random image script goes, you probably could minify it something much more smaller and put it into a single PHP in your page template. For example:
background: url('/rando/<txp:php>
$f = array_filter((array) glob(txpath.'/../rando/*.{png,jpg,gif}', GLOB_NOSORT|GLOB_BRACE), 'is_file');
echo $f ? basename($f[mt_rand(0, count($f)-1)]) : '';
</txp:php>');
Edit. glad you got it sorted. Seems you migrated to Textpattern’s own image management and <txp:images /> tag or similar :)
Last edited by Gocom (2012-05-08 08:34:51)
Offline
Re: migrating
Gocom wrote:
Hi Jukka
Are not accepted where? Includes are accepted, valid. If you are referring to previous mentions concerning rah_external_output, those where about non-local filesystem files, where actual content where transferred over internet.
My new server at joyent does not like includes and it initially broke all my pages which were using the include function
File_get_contents is a file function and just merely reads files. include on the other hand is for evaluating PHP source code.
file_get_contentswill not evaluate (i.e. execute) any code, it just reads files.
It is nevertheless this code which solved my problems a few days ago
Edit. glad you got it sorted. Seems you migrated to Textpattern’s own image management and <txp:images /> tag or similar :)
Yes :) I used <txp:images limit="1" category="random_images" sort="rand()"><txp:image_url /></txp:images> and added body{background: url(<?php echo file_get_contents('path_to_ext_output/?rah_external_output=myextTxpTags');?>); and all was sorted.
Thanks soo much for your intervention nevertheless
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: migrating
OK… :) There are still problems.
On forum.neme.org I have a little file which calls for rah_external_output.
I used to be able to get it by using <?php include($DOCUMENT_ROOT . "http://mysite.tld/?rah_external_output=bar"); ?> but not any more.
// does not work (the whole forum page goes white)
<?php include($DOCUMENT_ROOT . "http://mysite.tld/?rah_external_output=bar"); ?>
// same as above
<?php include 'http://mysite.tld/?rah_external_output=bar'; ?>
//same as above
<?php include("http://mysite.tld/?rah_external_output=bar"); ?>
// semi works as the forum page is rendering but the external output is not fetched
<?php echo file_get_contents('http://mysite.tld/?rah_external_output=bar'); ?>
any advice would be appreciated
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline