Can't restore client's files

apitsos

Verified User
Joined
Dec 30, 2009
Messages
75
Location
Athens, Greece
Hi there!

After the issues I had recently with my web server and the hack that happened to on of the websites hosted on it, I have the need to restore a backup of this account. Thank God, I have scheduled a daily and a weekly backup, so the weekly backup was before the hack.

The problem here is that when I am trying to restore a backup (as admin) which was scheduled and taken by the admin user of DirectAdmin control panel, i am getting the following error:

Code:
Unable to restore database govisit&#95joomla&#49.sql to govisit_joomla1 : ERROR 1227 (42000) at line 2616 in file: '/home/govisit/backups/backup/govisit_joomla1.sql': Access denied; you need the SUPER privilege for this operation

Unable to restore database govisit&#95lesvos.sql to govisit_lesvos : ERROR 1227 (42000) at line 1764 in file: '/home/govisit/backups/backup/govisit_lesvos.sql': Access denied; you need the SUPER privilege for this operation

Someone helped me with this issue and assigned "root" privileges to the "da_admin" user, because we had the feeling that this will solve the issues, but unfortunately it didn't.

I tried myself another idea I had. I copied that backup file (stored on /home/admin/admin_backups/weekly) into user's backup folder, meaning /home/govisit/backups, so then I tried to restore the backup of the databases and the website as a user, considering that this was a "user backup", created by him. The idea was succeed as I got the table with the options to restore when I clicked the "restore" button, but when proceed to restore I had exactly the same conclusion. An error saying:
Code:
Unable to restore database govisit_joomla1.sql to govisit_joomla1 : ERROR 1227 (42000) at line 2616 in file: '/home/govisit/backups/backup/govisit_joomla1.sql': Access denied; you need the SUPER privilege for this operation 
Unable to restore database govisit_lesvos.sql to govisit_lesvos : ERROR 1227 (42000) at line 1764 in file: '/home/govisit/backups/backup/govisit_lesvos.sql': Access denied; you need the SUPER privilege for this operation

I did try also to restore the database manually through phpMyAdmin, but the database zipped is 29.4 MB (unzipped is 156 MB). Because the system allows only databases with maximum size 8MB, I was unable to complete this kind of manual restore.

The last thing I thought was to completely drop the databases from this account and try to make the restore again (either as admin or as user "govisit"), but I am not sure if it will succeed and I am afraid that I may will not be able then to restore even the current state, which I also backed up manually (as user). What do you think?

I would appreciate if you could help me on this issue. I have no other ideas or the knowledge to troubleshoot it further. If someone has the experience to understand what causes the error on the restore procedure I would like to have his opinion.

Finally I am wondering if it was a good idea to give "root" privileges on the da_admin user. If not, I don't know how to revert it and what privileges this user should have.

Thanks a lot for your time.


Kind regards,
Angelos Pitsos
 
Have you tried to restore it by SSH command?
Code:
mysql -uUSERNAME -p DATABASENAME < /path/to/the/backup.sql
Then push enter, after that you have to enter the database password.
Ofcourse "username" is here the database username.
 
Hi Richard,

Thank you very much for your reply. I did exactly what you suggested after uploading and unzipping the [.sql] file I had in my backup. Unfortunatelly I received the following error a few seconds after the execution of the command:
ERROR 1227 (42000) at line 2616: Access denied; you need the SUPER privilege for this operation

So there is something else that causing it!


Regards,
Angelos Pitsos
 
Try this:
mysql -u da_admin -p DATABASENAME < /path/to/the/backup.sql
Use the password, stored in /usr/local/directadmin/conf/mysql.conf (not sure if the last part is right, but you'll find it).
 
WOW!!! It finished without error!!!!!!!

Thank you....

I have to restore the files now.

Thank you so much... :)
 
But I have a question...

When I do a restore as the admin user of DirectAdmin shouldn't it work? Is this something different than the default/emdedded restore procedure of DirectAdmin?

Kind regards,

Angelos Pitsos
 
But I have a question...

When I do a restore as the admin user of DirectAdmin shouldn't it work? Is this something different than the default/emdedded restore procedure of DirectAdmin?

Kind regards,

Angelos Pitsos

It should work.
If this happens again with another user, contact the DirectAdmin Support.
 
Back
Top