PDA

View Full Version : directadmin backups fails restore



snaaps
07-13-2010, 06:22 AM
Hello,

After a server crash I installed a new server and now I can not restore one account because a mysql problem:


Unable to restore database user&#95databaseuser.sql to user_databse : ERROR 1064 (42000) at line 1234 in file: '/home/user/backups/backup/user_database.sql': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BTREE (`key_id`),
UNIQUE KEY `uniq_key` (`app_id`,`app_key`)
) ENGINE=MyISAM D' at line 10

Well, now i have extract the user.reseller.user.tar.gz and i have edit the
/bacup/user_database.sql file.

now i want to archive it again to user.reseller.user.tar.gz, but i dont no how?
i used:
tar cvf user.reseller.user.tar.gz /home/admin/admin_backups/backup_user/*

But, the user.reseller.user.tar.gz is verry big, and it can be extract, it will give the error:

gzip: stdin: not in gzip format
/bin/tar: Child returned status 1
/bin/tar: Error exit delayed from previous errors


How do retar it again so i can run the backup restore function in directadmin?

scsi
07-13-2010, 06:50 AM
You have to gzip it after taring it.

tar cvfp filename.tar /home/username

then

gzip filename.tar

snaaps
07-13-2010, 07:04 AM
Thanks!!

But now i get the following error when i tried to restore:

Unable to extract the directory 'backup' from the file /home/admin/admin_backups/user.reseller.user.tar.gz as user user
/bin/tar: backup: Not found in archive
/bin/tar: Error exit delayed from previous errors

File '/home/admin/admin_backups/user.reseller.user.tar.gz' was 89195553 bytes in size, as read by root.
Unable to read the backed up user.usage file: Can't get a lock on /home/user/backups/backup/user.usage