How to back up the database on Ubuntu
How to back up the database on Ubuntu
In preparation for an upgrade I wish to back up my TimeTrex Postgresql database but nowhere do I see instructions for doing this.
I have the timetrex.ini.php etc.
How does one backup and if neccesary restore the database?
O/S is Ubuntu 10.10
I have the timetrex.ini.php etc.
How does one backup and if neccesary restore the database?
O/S is Ubuntu 10.10
Re: How to back up the database on Ubuntu
That depends on how you installed TimeTrex. Did you use our automated installer, or did you install from the manual .ZIP file?
Re: How to back up the database on Ubuntu
If you used the manual .ZIP file, then you need to read the PostgreSQL documentation on how to properly back it up.
This URL may be a good starting place:
http://www.postgresql.org/docs/8.2/inte ... -dump.html
This URL may be a good starting place:
http://www.postgresql.org/docs/8.2/inte ... -dump.html
Re: How to back up the database on Ubuntu
Except that I get this:
sudo psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
sudo psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Re: How to back up the database on Ubuntu
Ref my last post. Doesn't the result I'm getting suggest that PostgreSQL server is not running? If so how is TimeTrex accessing it?
Re: How to back up the database on Ubuntu
No, it doesn't necessarily mean that PostgreSQL isn't running, it just means that the PostgreSQL client (psql) can't connect to it when you don't specify any connection settings. Its like trying to point your web browser to "www.google.com" without typing in a URL at all.
Re: How to back up the database on Ubuntu
OK but Synaptec sees a postgresql client as installed but not the server.
what connection settings should I be using? timtrex.php.ini says port 5433 but nothing else.
If I install the postgresql server will it damage my TimeTrex database?
Will it see the timetrex database.
I never installed Postgresql, even the client. So that install must have been done by the TimeTrex install.
what connection settings should I be using? timtrex.php.ini says port 5433 but nothing else.
If I install the postgresql server will it damage my TimeTrex database?
Will it see the timetrex database.
I never installed Postgresql, even the client. So that install must have been done by the TimeTrex install.
Re: How to back up the database on Ubuntu
You likely didn't use the manual .ZIP file to install TimeTrex from, but instead used our automated installer.
If that is the case then TimeTrex automatically dumps the database to the TimeTrex directory for you, so you all you need to do to perform a backup is copy the entire TimeTrex folder to your backup media. You can check by listing the files in the TimeTrex directory, you should see up to seven .SQL files dated for each day.
If that is the case then TimeTrex automatically dumps the database to the TimeTrex directory for you, so you all you need to do to perform a backup is copy the entire TimeTrex folder to your backup media. You can check by listing the files in the TimeTrex directory, you should see up to seven .SQL files dated for each day.
Re: How to back up the database on Ubuntu
As I said above My install was using the Zip file.
I had previously tried the automated installer but it didn't work correctly and you advised me to use the Zip.
I have a TimeTrex folder with those files dated Sept 18 through Sept 30th from that automated install attempt but my current install is in a (non-capitalized) timetrex folder which does not have any such .sql files.
Can I just install the postgresql server on my ubuntu system without compromising my data and if so will it let me access the timetrex database and back it up?
currently Synaptic Package Manager does not show the server as being installed.
I had previously tried the automated installer but it didn't work correctly and you advised me to use the Zip.
I have a TimeTrex folder with those files dated Sept 18 through Sept 30th from that automated install attempt but my current install is in a (non-capitalized) timetrex folder which does not have any such .sql files.
Can I just install the postgresql server on my ubuntu system without compromising my data and if so will it let me access the timetrex database and back it up?
currently Synaptic Package Manager does not show the server as being installed.
Re: How to back up the database on Ubuntu
Wonderful!
Found out how to back up the database.
Tried upgrading from 3.0.8 to 3.3.1 it got to Upgrading database, please wait... 91% and froze there.
Should I have upgraded through intermediate versions?
Found out how to back up the database.
Tried upgrading from 3.0.8 to 3.3.1 it got to Upgrading database, please wait... 91% and froze there.
Should I have upgraded through intermediate versions?
Re: How to back up the database on Ubuntu
I'm not sure what you've done if you have a partial install from the automated installer mixed in with a manual installation from the .ZIP file, thats recipe for disaster since they can conflict with one another.
As for the actual upgrade process, you can upgrade from any version of TimeTrex to any other version in a single step. The fact that it failed at 91% means something went terribly wrong and you will need to look through the TimeTrex/PHP/PostgreSQL logs to find the problem.
As for the actual upgrade process, you can upgrade from any version of TimeTrex to any other version in a single step. The fact that it failed at 91% means something went terribly wrong and you will need to look through the TimeTrex/PHP/PostgreSQL logs to find the problem.
Re: How to back up the database on Ubuntu
I reinstalled 3.0.8 from the bin.
Restored my database using -h -p -U with Hostname Port and Username
Had to reset the User password to get in and all recovered.
So now I can just run the latest bin (after backing up the database) and it should update OK?
Restored my database using -h -p -U with Hostname Port and Username
Had to reset the User password to get in and all recovered.
So now I can just run the latest bin (after backing up the database) and it should update OK?
Re: How to back up the database on Ubuntu
In theory yes.