- Posts: 85
Question best way for migration from 1.7.20 to 2.1.x
- madargel
- Topic Author
- Offline
- New Member
--
www.myancestry.de
Please Log in or Create an account to join the conversation.
- Franz Frese
- Offline
- Elite Member
Please Log in or Create an account to join the conversation.
- madargel
- Topic Author
- Offline
- New Member
- Posts: 85
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
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
- Posts: 85
Since I cannot perform an in-place migration, I am considering how to proceed.This data will be retained automatically, as it is in your database. Just upgrade.
Option 1:
- Restore the entire webtrees 1.9.20 installation with all old PHP scripts and the DB
- Unzip the new PHP scripts into the existing directory structure
- The open question for me: How do I avoid artifacts / file orphans and thus a mix of old and new scripts?
- Restoring the DB
- Unzip the webtrees 2.1 scripts into the target structure
- Replace the../data folder with the old data and the old config.ini.php
- Adjust the config.php for Pretty Links
Please Log in or Create an account to join the conversation.
- bertkoor
- Offline
- Platinum Member
- Greetings from Utrecht, Holland
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
- Posts: 85
That's great. Thank you.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/
Please Log in or Create an account to join the conversation.
- madargel
- Topic Author
- Offline
- New Member
- Posts: 85
- Installed the new server, all works fine
- Installed WordPress and restored my site, all works fine
- Restored the webtrees-DB via phpMyadmn-import, no errors
- created the directory
Code:/phpgedview
- chowned /phpgedview
Code:chown -R www-data:staff phpgedview/
- Installed the webtrees scripts
- chowned all subfolders within
Code:/phpgedview
- created
Code:config.ini.phpCode:; 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"
- 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.phpCode: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.
- Franz Frese
- Offline
- Elite Member
perhaps your first try should be without setting pretty urls (rewrite_urls="0")
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
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
- Posts: 85
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
- Posts: 85
The error changed to:
What happend here?
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
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
- Posts: 85
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
- Posts: 85
You were on the right track...To see what accounts you have in your database, run this query:
select Host, User from mysql.user;
I created the the missed user identified by given passwort.
Now I get the error:
I'm sure: no typoRuntimeException: SQLSTATE[HY000] [1044] Access denied for user 'webtreesadmin'@'%' to database 'dbwebtrees' in /app/phpgedview/app/Http/Middleware/UseDatabase.php:119
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
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
- Posts: 85
Thnky you very much. It was a lot of workload.
Please Log in or Create an account to join the conversation.