Hi There.
Our otrs server recently crashed. We have good backups which were writting to our NAS server. Challenge is restoring the backup.
We were running OTRS 3.0.7, we re-installed everything completely, so we are now trying to restore from:
/home/backup/2013-10-18_23-00
using :
otrs:/opt/otrs/scripts # ./restore.pl -b /home/backup/2013-10-18_23-00 -d /opt/otrs/
So the above command brings :
otrs:/opt/otrs/scripts # ./restore.pl -b /home/backup/2013-10-18_23-00 -d /opt/otrs/
Restore /home/backup/2013-10-18_23-00/Config.tar.gz ...
DBI connect('database=otrs;host=localhost;','otrs',...) failed: Access denied for user 'otrs'@'localhost' (using password: YES) at /opt/otrs/Kernel/System/DB.pm line 210
ERROR: OTRS-Restore-10 Perl: 5.14.2 OS: linux Time: Tue Nov 19 18:15:45 2013
Message: Access denied for user 'otrs'@'localhost' (using password: YES)
Traceback (3528):
Module: Kernel::System::DB::new (v1.127) Line: 181
Module: ./restore.pl (v1.13) Line: 90
Restore /home/backup/2013-10-18_23-00/Application.tar.gz ...
create MySQL
decompresses SQL-file ...
cat SQL-file into MySQL database
ERROR 1045 (28000): Access denied for user 'otrs'@'localhost' (using password: YES)
compress SQL-file...
We've tried many suggested ideas with no luck, please help
Cant Restore
Moderator: crythias
Cant Restore
OTRS 3.0.7 on Linux with MySQL database
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Cant Restore
simple: new mysql installation doesn't know otrs username and password combination, which it is reading from Config.pm.Nelius wrote:Access denied for user 'otrs'@'localhost' (using password: YES) at /opt/otrs/Kernel/System/DB.pm line 210
Last edited by crythias on 23 Nov 2013, 15:52, edited 1 time in total.
Reason: wrong/old version of MySQL linked
Reason: wrong/old version of MySQL linked
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Cant Restore
Hi Crythias.
Thank you for the speedy response. What you are saying makes perfect sense but can you be more specific please. We would appreciate it if you can post a detailed solution.
Thanks
Thank you for the speedy response. What you are saying makes perfect sense but can you be more specific please. We would appreciate it if you can post a detailed solution.
Thanks
OTRS 3.0.7 on Linux with MySQL database
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Cant Restore
Use a text editor to edit your Config.pm from your old machine
"But it's compressed/weird format!/I only have the OTRS backed up version"
then untar it : tar xzvf config
Find the values attached to
$Self->{Database}
$Self->{DatabaseUser}
$Self->{DatabasePw}
open a mysql prompt
follow instruction in the link provided previously
"What instructions? Can you be more specific?"
Sure. I'll do that...
mysql -u root -p
(I forgot the root password! (or, if there is no root password, don't include the -p option)) Or, if you're in a debian/ubuntu environment, you might try the user/password combo in /etc/mysql/debian.cnf (if it exists. Only sudo/root has access to that file.)
CREATE USER 'otrs'@localhost' IDENTIFIED BY 'databasepassword';
GRANT ALL PRIVILEGES ON databasename.* TO 'otrs'@'localhost' ;
"But it's compressed/weird format!/I only have the OTRS backed up version"
then untar it : tar xzvf config
Find the values attached to
$Self->{Database}
$Self->{DatabaseUser}
$Self->{DatabasePw}
open a mysql prompt
follow instruction in the link provided previously
"What instructions? Can you be more specific?"
Sure. I'll do that...
mysql -u root -p
(I forgot the root password! (or, if there is no root password, don't include the -p option)) Or, if you're in a debian/ubuntu environment, you might try the user/password combo in /etc/mysql/debian.cnf (if it exists. Only sudo/root has access to that file.)
CREATE USER 'otrs'@localhost' IDENTIFIED BY 'databasepassword';
GRANT ALL PRIVILEGES ON databasename.* TO 'otrs'@'localhost' ;
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask