Transfer from one machine to another

47 views
Skip to first unread message

Andrew Blyth

unread,
Apr 21, 2021, 3:25:10 PM4/21/21
to TracksApp
Hi

Does anyone have any tips for moving installed version to another machine.

Currently using an old bitnami version in a VM, so will have to figure out how to upgrade that to current and then transfer to a new install of current.on a different machine.  Haven’t decided on whether to use docker or standalone (another VM) for the new instance.

I haven’t found it so I assume there isn’t an “export all” “ import all” button somewhere

Best Regards 
Andrew

Jyri-Petteri Paloposki

unread,
Apr 21, 2021, 3:30:19 PM4/21/21
to trac...@googlegroups.com
I would do this by dumping the database from the current server and
importing it as-is to the new server. There is an export functionality,
but it only includes each user's own information and I'm not sure if it
includes all metadata so the imported data could be less complete than
with a simple DB migration.

After you've copied the database to the new server, do the same steps
you would with a normal upgrade and everything should work properly.

Best regards,
--
Jyri-Petteri ”ZeiP” Paloposki
Tracks principal maintainer

Daniel Calcoen

unread,
Apr 21, 2021, 3:40:10 PM4/21/21
to TracksApp
Dear Andrew,
In this issue https://github.com/TracksApp/tracks/issues/2441 is mentioned that the export (yml) works but not the import.
I was in the same situation as you and this is why I found myself reading the issue #2441...
As mentioned by Jyri-Petteri for the moment you should dump the database, I put the commands I used in the wiki
look for import and export in this page
for other databases the commands are very similar (the syntax for MariaDB is almost identical to MySQL).
If you mention which database you use may be we can help you with the commands.
Regards
Daniel

Andrew Blyth

unread,
Apr 21, 2021, 3:43:28 PM4/21/21
to TracksApp
Thanks for that.

Did you mean to dumping database at the current version (so skipping updates on the old server)

Andrew Blyth

unread,
Apr 21, 2021, 3:44:45 PM4/21/21
to TracksApp
Hi it’s currently running MySQL. It’s a single user system.Me!

Daniel Calcoen

unread,
Apr 21, 2021, 4:04:58 PM4/21/21
to TracksApp
Dear Andrew,
after have done your new installation (the full procedure following all the steps like described here https://github.com/TracksApp/tracks/wiki/Install-Tracks-2.5-on-Ubuntu-20.10) and having Tracks running (with an empty database)
you import your dabatase and you run again
>bundle exec rake db:migrate RAILS_ENV=production
then Tracks will run with your new content.
Regards
Daniel

Jyri-Petteri Paloposki

unread,
Apr 21, 2021, 4:17:16 PM4/21/21
to trac...@googlegroups.com
On 21.4.2021 22.43, 'Andrew Blyth' via TracksApp wrote:
> Thanks for that.
>
> Did you mean to dumping database at the current version (so skipping
> updates on the old server)

The updates should work fine both ways, the information on which updates
have been applied is kept in the database and is therefore migrated as
well. I would migrate the old database without updates and then run the
migrations on the new server just to avoid any annoying compatibility
problems with libraries or Ruby versions, for example.

Daniel pointed out good resources and tips for migration and making the
new installation. Another option for the installation is, as you already
mentioned in your first post, the Docker image. I personally like it
because installing and configuring everything needed for a working Ruby
application can sometimes be a bit tricky, but it's more important to
choose the solution you like better yourself and you're more familiar with.

Daniel Calcoen

unread,
Apr 21, 2021, 4:28:50 PM4/21/21
to TracksApp
Dear Andrew,
If you use the docker image the person who built the image has already followed all the steps I described in the installation procedure (I'm not referring to the exact syntax but the logical steps and the sequence).
You'll need the information y asked below to Jyri-Petter.

Dear Jyri-Petter,
For the docker image, do you know where to find the information about the database used, the user/users declared for that database and the privileges assigned ?
This is information is necessary to access the database manually for the export and the import.

Regards
Daniel

Jyri-Petteri Paloposki

unread,
Apr 21, 2021, 5:08:16 PM4/21/21
to trac...@googlegroups.com
On 21.4.2021 23.28, Daniel Calcoen wrote:
> For the docker image, do you know where to find the information about
> the database used, the user/users declared for that database and the
> privileges assigned ?
> This is information is necessary to access the database manually for the
> export and the import.

That depends on which kind of Docker installation we're talking about. I
often like to use my own database container; if that's the case, you've
set the database up yourself and know the details.

For the docker-compose version detailed in
https://github.com/TracksApp/tracks/blob/master/doc/installation.md#docker-installation-using-docker-compose
the details are set in the docker-compose.yml in the Tracks directory.
By default it's using a plain mysql container as described in
https://hub.docker.com/_/mysql with an empty password, but you can
change those in the docker-compose.yml file to your liking.

I think you should also be able to import the database with something
like the following command on command line:
docker-compose exec db mysql < transfer.sql
Reply all
Reply to author
Forward
0 new messages