Web based family history software

Question best way for migration from 1.7.20 to 2.1.x

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 4 days ago - 1 week 4 days ago #1 by madargel
I finally have to migrate my old Centos7 server to a new, Docker-based system.After much hesitation, since I have integrated many webtree links into my WordPress pages and always shunned the effort, I will now have no choice but to migrate to webtreees 2.1.x as well.Is there now an elegant and ideal way to preserve the old data including the users, the message panel, the research tasks, etc.?Over the years, quite a bit has accumulated that I don't want to throw away and rebuild.I still have access to the old database, can anything be saved with that?Are there complete and proven instructions for doing this?Sincerely, Marko

-- 
www.myancestry.de
 
Last edit: 1 week 4 days ago by madargel.

Please Log in or Create an account to join the conversation.

More
  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 4 days ago #3 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x
I would never have figured that out. Some answers say more about the author than he would like...

Please Log in or Create an account to join the conversation.

More
1 week 4 days ago #4 by fisharebest
Replied by fisharebest on topic best way for migration from 1.7.20 to 2.1.x
> After much hesitation, since I have integrated many webtree links into my WordPress pages and always shunned the effort

webtrees 2.x has a module "Legacy URLs". Enable this and also "pretty URLs". Now, all your old 1.x style URLs will get redirected so you won't need to find/edit any old links.

> Is there now an elegant and ideal way to preserve the old data including the users, the message panel, the research tasks, etc.?

This data will be retained automatically, as it is in your database. Just upgrade.

> I still have access to the old database, can anything be saved with that?

Everything is either in the database or your data/media folders.

For a 'clean' upgrade, you can delete all the old PHP files/folders first. The old files are harmless, but just take up disk space. The instructions don't tell you to delete them because (a) deleting files is scary, and (b) there will be users who have added custom content here and who will blame me if they delete something I didn't know about.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 4 days ago - 1 week 4 days ago #5 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x
Thank you for this good news, never heard before.

This data will be retained automatically, as it is in your database. Just upgrade.

Since I cannot perform an in-place migration, I am considering how to proceed.

Option 1:
  1. Restore the entire webtrees 1.9.20 installation with all old PHP scripts and the DB
  2. Unzip the new PHP scripts into the existing directory structure
  3. The open question for me: How do I avoid artifacts / file orphans and thus a mix of old and new scripts?
Option 2:
  1. Restoring the DB
  2. Unzip the webtrees 2.1 scripts into the target structure
  3. Replace the../data folder with the old data and the old config.ini.php
  4. Adjust the config.php for Pretty Links
 Thank you very much.
 
Last edit: 1 week 4 days ago by madargel.

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
1 week 3 days ago #6 by bertkoor
Replied by bertkoor on topic best way for migration from 1.7.20 to 2.1.x
Option 2 is simpler, and should just work.
This procedure is not really an upgrade, but more akin a server migration.
webtrees.net/faq/move-server/

stamboom.BertKoor.nl runs on webtrees v2.1.20

Please Log in or Create an account to join the conversation.

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 3 days ago #7 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x

Option 2 is simpler, and should just work.
This procedure is not really an upgrade, but more akin a server migration.
webtrees.net/faq/move-server/
 
That's great. Thank you.

Please Log in or Create an account to join the conversation.

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago #8 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x
follow up:
  1. Installed the new server, all works fine
  2. Installed WordPress and restored my site, all works fine
  3. Restored the webtrees-DB via phpMyadmn-import, no errors
  4. created the directory
    Code:
    /phpgedview
    (for compatibility reasons, as in my previous installation)
  5. chowned /phpgedview
    Code:
    chown -R www-data:staff phpgedview/
  6. Installed the webtrees scripts
  7. chowned all subfolders within
    Code:
    /phpgedview
  8. created 
    Code:
    config.ini.php
    Code:
    ; DO NOT DELETE THIS LINE dbhost="127.0.0.1" dbport="3313" dbuser="DBUSER_NAME" dbpass="DB_PW" dbname="DB_NAME" tblpfx="wt_" base_url="https://FQDN/phpgedview" rewrite_urls="1"
  9. If I want to ooen the URL i get:
    Code:
    RuntimeException: SQLSTATE[HY000] [2002] Connection refused in /app/phpgedview/app/Http/Middleware/UseDatabase.php:119 Stack trace: #0 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process() #1 /app/phpgedview/app/Http/Middleware/BadBotBlocker.php(308): Middleland\Dispatcher->handle() #2 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process() #3 /app/phpgedview/app/Http/Middleware/CompressResponse.php(71): Middleland\Dispatcher->handle() #4 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process() #5 /app/phpgedview/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher->handle() #6 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process() #7 /app/phpgedview/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle() #8 /app/phpgedview/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process() #9 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process() #10 /app/phpgedview/app/Http/Middleware/HandleExceptions.php(89): Middleland\Dispatcher->handle() #11 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process() #12 /app/phpgedview/app/Http/Middleware/BaseUrl.php(73): Middleland\Dispatcher->handle() #13 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process() #14 /app/phpgedview/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle() #15 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process() #16 /app/phpgedview/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle() #17 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process() #18 /app/phpgedview/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle() #19 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process() #20 /app/phpgedview/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle() #21 /app/phpgedview/app/Webtrees.php(275): Middleland\Dispatcher->dispatch() #22 /app/phpgedview/app/Webtrees.php(262): Fisharebest\Webtrees\Webtrees::dispatch() #23 /app/phpgedview/index.php(51): Fisharebest\Webtrees\Webtrees->httpRequest() #24 {main}

    What did I miss, or what could I have done wrong?

    Addition information:
    Code:
    root@lamp:/app/phpgedview/data# ls -lsh total 12K 4.0K drwxr-xr-x 3 www-data staff 4.0K Oct  1 08:15 cache 4.0K -rw-r--r-- 1 www-data staff  229 Oct  1 08:14 config.ini.php 4.0K -rw-r--r-- 1 www-data staff  793 Apr  8 20:07 index.php
    Code:
    root@lamp:/app/phpgedview# ls -lsh total 120K 8.0K -rw-r--r--  1 root     root  5.0K Apr  8 20:07 CONTRIBUTING.md  36K -rw-r--r--  1 root     root   35K Apr  8 20:07 LICENSE.md  16K -rw-r--r--  1 root     root   15K Apr  8 20:07 README.md 4.0K -rw-r--r--  1 root     root  1.1K Apr  8 20:07 SECURITY.md 4.0K drwxr-xr-x 21 www-data staff 4.0K Apr  8 20:07 app  12K -rw-r--r--  1 www-data staff  12K Apr  8 20:07 apple-touch-icon.png 4.0K drwxr-xr-x  3 www-data staff 4.0K Oct  1 08:15 data  16K -rw-r--r--  1 www-data staff  15K Apr  8 20:07 favicon.ico 4.0K -rw-r--r--  1 www-data staff 1.5K Apr  8 20:07 index.php 4.0K drwxr-xr-x  2 www-data staff 4.0K Apr  8 20:07 modules_v4 4.0K drwxr-xr-x  5 www-data staff 4.0K Apr  8 20:07 public 4.0K drwxr-xr-x  7 www-data staff 4.0K Apr  8 20:07 resources 4.0K drwxr-xr-x 31 www-data staff 4.0K Apr  8 20:08 vendor

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago - 1 week 1 day ago #9 by Franz Frese
Replied by Franz Frese on topic best way for migration from 1.7.20 to 2.1.x
can you access your db with phpmyadmin? (you got: Connection refused)

perhaps your first try should be without setting pretty urls (rewrite_urls="0")
 
Last edit: 1 week 1 day ago by Franz Frese.

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #10 by fisharebest
Replied by fisharebest on topic best way for migration from 1.7.20 to 2.1.x
For the DB server, 127.0.0.1 means use a network connection.

It is possible that you'll be using a local socket instead of a network connection.

So, try changing 127.0.0.1 to localhost.

BTW, the webtrees installer would have made this distinction clearer. You can run the installer first, and then restore your database.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago #11 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x
Thank you for your advice.
But yes, I can access to phpMyadmin and can administrate my databases.

I suspect that the DP port has changed on the new server.I'm trying to find out which one it is – not so easy in a container-based server ;-(
 

Please Log in or Create an account to join the conversation.

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago #12 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x
right now I changed the port to 3306.
The error changed to:
Code:
RuntimeException: SQLSTATE[HY000] [1045] Access denied for user 'webtreesadmin'@'localhost' (using password: YES) in /app/phpgedview/app/Http/Middleware/UseDatabase.php:119
It seems I have a problem with the password. But I used the old config.ini.php with the exisiting PW.

What happend here?

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #13 by fisharebest
Replied by fisharebest on topic best way for migration from 1.7.20 to 2.1.x
In MySQL, user accounts have both a username and a host.

Maybe the MySQL account is something like 'webtreesadmin'@'127.0.0.1'?

To see what accounts you have in your database, run this query:

select Host, User from mysql.user;

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago #14 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x
; <?php exit; ?> DO NOT DELETE THIS LINE
dbhost="127.0.0.1"
dbport="3306"
dbuser="webtreesadmin"
dbpass="PW_from_old_Installtion"
dbname="dbwebtrees"
tblpfx="wt_"
base_url="https://FQDN/phpgedview"
rewrite_urls="0"

Please Log in or Create an account to join the conversation.

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago #15 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x

To see what accounts you have in your database, run this query:

select Host, User from mysql.user;

You were on the right track...

I created the the missed user identified by given passwort.
Now I get the error:

RuntimeException: SQLSTATE[HY000] [1044] Access denied for user 'webtreesadmin'@'%' to database 'dbwebtrees' in /app/phpgedview/app/Http/Middleware/UseDatabase.php:119

I'm sure: no typo
 

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #16 by fisharebest
Replied by fisharebest on topic best way for migration from 1.7.20 to 2.1.x
I guess you granted access to the old user account, but not the new one...

Try this:

grant all on dbwebtrees.* to 'webtreesadmin'@'%'

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • madargel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago #17 by madargel
Replied by madargel on topic best way for migration from 1.7.20 to 2.1.x
Oh man, you are right. I grantet the user and all is fine....sometimes you can't see the wood for all of the (web)trees...

Thnky you very much. It was a lot of workload.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum