Restore database and files in Linux Ubuntu

Ask your questions regarding TimeTrex installation here.
Post Reply
fvteamsports
Posts: 20
Joined: Mon Jan 23, 2017 10:32 am

Restore database and files in Linux Ubuntu

Post by fvteamsports »

I'm upgrading from Windows to Ubuntu 16.04 server and need help on what files to transfer and how to update the database. The files and folders in Windows are different from the ones in Linux (a drag and drop is not possible). I have Timetrex up and running on the new computer (linux) but now I need to add our info from the windows computer. I have researched and found some other threads and the Timetrex installation guide but nothing really answers these 2 questions below.

#1 - What exact file folders should I replace? (Folder name/location in windows = Folder name/location in Linux)?
#2 - How to restore the SQL database dump in Linux (How is this done)? I'm a newbie at this...

I do have a complete backup of all the Timetrex files from the windows machine and a mysql dump ready to restore.

I have transferred Timetrex from windows machines to windows machines in the past with no problem but the Linux really throws me for a loop.

Thank you for any info on this that might help me out!
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Restore database and files in Linux Ubuntu

Post by shaunw »

The procedure is similar to our FAQ: How do I migrate TimeTrex On-Site from one computer to another?
https://help.timetrex.com/v11.0/enterpr ... lation.htm

You just need to adjust the commands slightly for Linux on the destination server rather than Windows. In fact if you look at the restore_database.bat file on your Windows server, you can find the exact commands and they will be almost identical on Linux.
fvteamsports
Posts: 20
Joined: Mon Jan 23, 2017 10:32 am

Re: Restore database and files in Linux Ubuntu

Post by fvteamsports »

Yep, I have used that page to migrate Windows to windows a few times, works great windows to windows.

Wasn't able to find any Linux commands in restore_database.bat file.

Do you know where the database is located in linux? There is no "timetrex" folder directly on the C: drive in Linux. This is step #3 in your guide, I can't get any further than this. Doing a search in Linux I find 4 Timetrex folders is other locations such as c:/usr/share but none of them I can find any database info in. A search for "restore database" returns nothing.

Thanks again.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Restore database and files in Linux Ubuntu

Post by shaunw »

In Linux you need to use a similar pg_restore command from the restore_database.bat on Windows.
fvteamsports
Posts: 20
Joined: Mon Jan 23, 2017 10:32 am

Re: Restore database and files in Linux Ubuntu

Post by fvteamsports »

I still have no luck migrating from Windows to Ubuntu. I can't restore using pg_restore, typing that in terminal does nothing.

Any further directions on how to do this? Like what directory to run pg_restore in and what it should look like when the "timetrex_database.sql" is located in the tmp directory?

Linux directories are completely different from Windows
fvteamsports
Posts: 20
Joined: Mon Jan 23, 2017 10:32 am

Re: Restore database and files in Linux Ubuntu

Post by fvteamsports »

Ok. I was able to restore the database. I needed to create an Ubuntu username the same as the database user name to avoid the "peer to peer" error. This then worked doing a pg_restore while logged in as the same user name.

Now, I just need to know where to upload the "storage" files to. No "storage" directory in Ubuntu. I would like to put our logo on the main page.
fvteamsports
Posts: 20
Joined: Mon Jan 23, 2017 10:32 am

Re: Restore database and files in Linux Ubuntu

Post by fvteamsports »

Found it:
usr/share/timetrex/html/interface

Images are stored here in v18 ubuntu
Post Reply