Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Plugins/Modules/Addons

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #61  
Old 4th July 2010, 21:04
Nimarda Nimarda is offline
Junior Member
 
Join Date: Jun 2010
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Restore db not working.

Hi,

I have Debian Lenny, and when I try to restore a database i get:
./backup-res.sh: line 493: tar: No such file or directory

I execute the backup-res script like:
./backup-res.sh db c12manit 2010-07-04

When i execute the mysql command from de commandline:
mysql -u***** -p**** c12manit < tar -xvjf /backups/backupvps/2010-07/db-c12manit-2010-07-04.tar.bz2

I get the same error.
-bash: tar: No such file or directory

What i'm doing wrong?

And when restoring a directory, newly created files which are not in the backup, still be there when the restoring is completed.
Why is that?

Last edited by Nimarda; 4th July 2010 at 21:23.
Reply With Quote
Sponsored Links
  #62  
Old 9th July 2010, 20:14
jmp51483 jmp51483 is offline
Junior Member
 
Join Date: Feb 2010
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What happens if you untar the file yourself and try to suck in the .sql file alone via the same command? Does it give you an error?
Reply With Quote
  #63  
Old 10th July 2010, 08:16
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Lightbulb

Quote:
Originally Posted by Nimarda View Post
Hi,

I have Debian Lenny, and when I try to restore a database i get:
./backup-res.sh: line 493: tar: No such file or directory

I execute the backup-res script like:
./backup-res.sh db c12manit 2010-07-04

When i execute the mysql command from de commandline:
mysql -u***** -p**** c12manit < tar -xvjf /backups/backupvps/2010-07/db-c12manit-2010-07-04.tar.bz2

I get the same error.
-bash: tar: No such file or directory

What i'm doing wrong?

And when restoring a directory, newly created files which are not in the backup, still be there when the restoring is completed.
Why is that?
You don't have the tar binary, try:
Code:
aptitude install tar
If it's the same system on which you have made the backups, you have uninstalled tar? Or maybe tar is not in your PATH...
The back-res script uses which command to guess where is your tar executable...

Hope this info wil help you..
Reply With Quote
  #64  
Old 1st August 2010, 13:07
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Smile New version: back-res 0.9.3

Hello,

As I encountered a 100% usage situation on a backup partition I've come across a small bug: the script can't move files (there is no space left) so I have done a small fix.

- Modified del_old_files function to remove "/" from the $to_del variable used to delete old files
- Removed from del_old_files function the section used to keep old databases (It's not working if there is no space left on device). Added in TODO section a reminder to improve this function.

Allways download the latest version here: http://www.eurosistems.ro/back-res

Old versions:
http://www.eurosistems.ro/back-res.0.9.1 - 2009-12-06
http://www.eurosistems.ro/back-res.0.9.2 - 2010-04-18

Note: This fix has no efect if the $del_en variable is set to "no"

Last edited by go0ogl3; 1st August 2010 at 13:11. Reason: Added note.
Reply With Quote
  #65  
Old 1st September 2010, 12:33
colo colo is offline
Junior Member
 
Join Date: Sep 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi First of all excellent job I have been using this to back up for just over 1 month now and all has been well.

I needed to use it today after I made a silly command on my vps and had to reinstall. and its really saved my bacon!



Quote:
Originally Posted by Nimarda View Post
Hi,

I have Debian Lenny, and when I try to restore a database i get:
./backup-res.sh: line 493: tar: No such file or directory

I execute the backup-res script like:
./backup-res.sh db c12manit 2010-07-04

When i execute the mysql command from de commandline:
mysql -u***** -p**** c12manit < tar -xvjf /backups/backupvps/2010-07/db-c12manit-2010-07-04.tar.bz2

I get the same error.
-bash: tar: No such file or directory

What i'm doing wrong?

And when restoring a directory, newly created files which are not in the backup, still be there when the restoring is completed.
Why is that?
I am also using debian lenny with ispconfig and got the same error even though tar is all ready installed. I tried editing the affected line with the full path to tar and then it failed with

mysql: unknown option '-x'

I have managed to restore my system by manually unpacking the .tar.bz2 and importing them into mysql manually so all is well although it would be nice to find out what the problem is and help to get it fixed.

also

./back-res dir all 2010-09-01 /

failed with

Extracting all dir's backup from date 2010-09-01 to /:
Extracting full_bin-2010-09-01.tar.bz2...

find: `//all': No such file or directory

although it worked just fine when I restored each dir one by one

Regards
colo

edit: I am using 0.9.3 with the mail fix from http://www.howtoforge.com/forums/sho...6&postcount=48

Last edited by colo; 1st September 2010 at 12:43.
Reply With Quote
  #66  
Old 13th September 2010, 19:57
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Arrow Small bug... sorry

This is a small bug from me. I used tar not $TAR and it's possible that in your enviroment tar may not be in the PATH variable...

The second error:
find: `//all': No such file or directory
seems to be because the BACKUPDIR variable is not set (notice the two slashes before all). This is the only cause I can imagine now. If you can please make some tests.


Quote:
Originally Posted by colo View Post
Hi First of all excellent job I have been using this to back up for just over 1 month now and all has been well.

I needed to use it today after I made a silly command on my vps and had to reinstall. and its really saved my bacon!





I am also using debian lenny with ispconfig and got the same error even though tar is all ready installed. I tried editing the affected line with the full path to tar and then it failed with

mysql: unknown option '-x'

I have managed to restore my system by manually unpacking the .tar.bz2 and importing them into mysql manually so all is well although it would be nice to find out what the problem is and help to get it fixed.

also

./back-res dir all 2010-09-01 /

failed with

Extracting all dir's backup from date 2010-09-01 to /:
Extracting full_bin-2010-09-01.tar.bz2...

find: `//all': No such file or directory

although it worked just fine when I restored each dir one by one

Regards
colo

edit: I am using 0.9.3 with the mail fix from http://www.howtoforge.com/forums/sho...6&postcount=48

Last edited by go0ogl3; 13th September 2010 at 20:13. Reason: added some info
Reply With Quote
  #67  
Old 13th September 2010, 20:23
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Smile New version: back-res 0.9.4

Hello,

I've corrected a small bug: I've replaced tar with $TAR in the recovery line
of the databases. (The line: mysql -u$dbuser -p$dbpassword $rdb <)
Thanks goes to Nimarda and colo.

Always download the latest version here: http://www.eurosistems.ro/back-res

Old versions:
http://www.eurosistems.ro/back-res.0.9.1 - 2009-12-06
http://www.eurosistems.ro/back-res.0.9.2 - 2010-04-18
http://www.eurosistems.ro/back-res.0.9.3 - 2010-08-01
Reply With Quote
The Following 3 Users Say Thank You to go0ogl3 For This Useful Post:
colo (15th September 2010), falko (14th September 2010), HiresAli (26th September 2010)
  #68  
Old 15th September 2010, 22:29
colo colo is offline
Junior Member
 
Join Date: Sep 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by go0ogl3 View Post
This is a small bug from me. I used tar not $TAR and it's possible that in your enviroment tar may not be in the PATH variable...

The second error:
find: `//all': No such file or directory
seems to be because the BACKUPDIR variable is not set (notice the two slashes before all). This is the only cause I can imagine now. If you can please make some tests.
Thanks go0ogl3 for the $TAR fix, the 2nd error was my own bug I had made my own amendment on my backup script and forgotten about it when it came to restoring with the original script.

for your info I had changed
COMPUTER=`cat /etc/hostname | awk 'NR==1{print $1}'` # name of this computer

to

COMPUTER=`/bin/hostname -f | awk 'NR==1{print $1}'` # name of this computer


hence a change in the BACKUPDIR

sorry, my fault :P
Reply With Quote
  #69  
Old 23rd September 2010, 15:45
cwallace cwallace is offline
Junior Member
 
Join Date: Sep 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am very new to ISPconfig and have used webmin for many years. Due to the change this backup solution seems to be the only option I have. It looks like it will work wonders and do well, but my issue is that with webmin I did backups offsite over FTP.

Can this script or the results from it be FTPed offsite? Can that be built into the script or would a secondary method need to be put in place to run after this script completes.

Ideas and sugestions would be greatly appreciated.

Thanks,
Chris
Reply With Quote
  #70  
Old 1st October 2010, 08:25
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
 
Lightbulb

Quote:
Originally Posted by cwallace View Post
I am very new to ISPconfig and have used webmin for many years. Due to the change this backup solution seems to be the only option I have. It looks like it will work wonders and do well, but my issue is that with webmin I did backups offsite over FTP.

Can this script or the results from it be FTPed offsite? Can that be built into the script or would a secondary method need to be put in place to run after this script completes.

Ideas and sugestions would be greatly appreciated.

Thanks,
Chris
Yes this script can be modified to transfer the backup in any way you like. After the backup job is done, we can add some lines to transfer all files over ftp, or over ssh (you can try to mount samba shares too and save there). I'm pretty busy right now but I'll consider adding this feature to the script, as soon I'll have some spare time.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
how to restore Ispconfig from backup db na0lb Installation/Configuration 4 24th September 2008 08:51
Restore backup ISPConfig leeeonardo General 4 18th April 2007 20:21
Restore ispconfig complete backup statiic General 1 15th January 2007 10:32
Backup restore on ispconfig misterm Installation/Configuration 0 18th December 2005 23:32


All times are GMT +2. The time now is 20:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.