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
  #1  
Old 6th December 2009, 20:38
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 69
Thanks: 4
Thanked 38 Times in 6 Posts
Lightbulb ISPConfig 3 - back-res a Backup and Restore script

Hello!

ISPConfig 3 is a great piece of software. I want to contribute with a little script, maybe somebody will make a module and insert it in ISPConfig 3 if it's usefull.

I use ISPConfig 3 in production on a small little used server and I have created a backup and restore script.
I've tryied to make myself understood in the script. The script can be used to backup a full or partial linux system with a full mysql dump.
My script is using only one full backup a month, the rest are incremental backups. This uses less space and less ressources. There are some drawbacks, but I haven't find anything like this on the net, so I created this little script and I hope I will have more time to make it better later.
For now this script is in a "It works for me" state, but I think it can be used safely if the user takes his time and reads all the info in the script header.

The link: http://www.eurosistems.ro/back-res

Thank you for good free software!
Reply With Quote
The Following 30 Users Say Thank You to go0ogl3 For This Useful Post:
agentmoller001 (28th December 2012), aldo (8th April 2013), baanmaha (21st October 2010), bo17age (21st August 2010), Croydon (12th May 2011), cubric (24th June 2012), cyrus1977 (1st January 2011), diablo666 (29th April 2013), djbill (12th January 2010), DreDvl (12th November 2013), erosbk (6th May 2011), falko (7th December 2009), gandalf4711 (21st October 2013), GarGamel55 (14th October 2011), il.manuel (23rd August 2011), mailinh (28th November 2013), Mannekino (13th April 2011), Mitz (14th February 2011), NWO (2nd October 2010), oriongr (9th July 2010), pier56 (8th May 2012), reto27 (18th October 2011), rudolfpietersma (14th December 2009), sageman (27th July 2012), shibble (19th July 2012), till (26th October 2010), tohms (30th May 2011), Toucan (25th April 2010), zbuzanic (8th January 2012), zogthegreat (31st August 2010)
Sponsored Links
  #2  
Old 9th December 2009, 07:33
nokia80 nokia80 is offline
Senior Member
 
Join Date: Apr 2009
Posts: 178
Thanks: 27
Thanked 2 Times in 2 Posts
Send a message via Skype™ to nokia80
Default things to do

hi


beautiful script can explain you maby which codes must use you to manage script for backup and also for put back where script must come etc......

sees good nice
Reply With Quote
  #3  
Old 9th December 2009, 21:40
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 69
Thanks: 4
Thanked 38 Times in 6 Posts
Smile

Quote:
Originally Posted by nokia80 View Post
hi


beautiful script can explain you maby which codes must use you to manage script for backup and also for put back where script must come etc......

sees good nice
For backup the script is used without any arguments and it's supposed to be run from cron from a line like:
40 3 * * * /etc/back-res 1>/dev/null 2>/dev/null

Please read the info in the first lines of the script. I've tried to explain how the script functions there. If you have more questions please ask.
Reply With Quote
  #4  
Old 13th December 2009, 15:52
Snake12 Snake12 is offline
Junior Member
 
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, i have a problem on my server (Ubuntu 8.04.3 LTS) with your script.

admin@serverWeb:/root$ sudo ./back-res
df: `/bck/serverWeb.adsl.net': No such file or directory
df: no file systems processed
./back-res: line 230: [: -gt: unary operator expected
mkdir: cannot create directory `/bck/serverWeb.adsl.net/log': No such file or directory
./back-res: line 167: /bck/serverWeb.adsl.net/log/backup.log: No such file or directory
./back-res: line 173: /bck/serverWeb.adslnocable.it/log/backup.log: No such file or directory
mkdir: cannot create directory `/bck/serverWeb.adsl.net/log': No such file or directory
./back-res: line 167: /bck/serverWeb.adslnocable.it/log/backup.log: No such file or directory


can u help me ?

Thanks!!

Last edited by Snake12; 13th December 2009 at 15:54.
Reply With Quote
  #5  
Old 14th December 2009, 08:05
skoena skoena is offline
Senior Member
 
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 407
Thanks: 71
Thanked 10 Times in 9 Posts
Send a message via MSN to skoena Send a message via Skype™ to skoena
Default

I runned the script but it hangs and gives me some errors. Can somebody tell me what they mean?

Quote:
note : The storage engine for the table doesn't support optimize
/bin/tar: /adm: Cannot stat: No such file or directory
/bin/tar: Error exit delayed from previous errors
/bin/tar: /var/log/kern.log: file changed as we read it
/bin/tar: /var/log/ConsoleKit/history: file changed as we read it
/bin/tar: /var/log/syslog: file changed as we read it
/bin/tar: /var/lib/apache2/fcgid/sock/8504.0: socket ignored
/bin/tar: /var/lib/apache2/fcgid/sock/14689.0: socket ignored
/bin/tar: /var/lib/apache2/fcgid/sock/14541.0: socket ignored
Tnx,
Rudolf.

EDIT: I executed the script on another (my new) server and here no error messages.

Last edited by skoena; 14th December 2009 at 12:10.
Reply With Quote
  #6  
Old 14th December 2009, 12:08
skoena skoena is offline
Senior Member
 
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 407
Thanks: 71
Thanked 10 Times in 9 Posts
Send a message via MSN to skoena Send a message via Skype™ to skoena
Default

What's the easiest or best way to backup to an existing Windows 2003 server?

Should I do this with a mount? Or use FTP to upload the files to the server? Or are there better ways to do this? Please advise.
Reply With Quote
  #7  
Old 1st January 2010, 11:11
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 69
Thanks: 4
Thanked 38 Times in 6 Posts
Default

Quote:
Originally Posted by Snake12 View Post
Hi, i have a problem on my server (Ubuntu 8.04.3 LTS) with your script.

admin@serverWeb:/root$ sudo ./back-res
df: `/bck/serverWeb.adsl.net': No such file or directory
df: no file systems processed
./back-res: line 230: [: -gt: unary operator expected
mkdir: cannot create directory `/bck/serverWeb.adsl.net/log': No such file or directory
./back-res: line 167: /bck/serverWeb.adsl.net/log/backup.log: No such file or directory
./back-res: line 173: /bck/serverWeb.adslnocable.it/log/backup.log: No such file or directory
mkdir: cannot create directory `/bck/serverWeb.adsl.net/log': No such file or directory
./back-res: line 167: /bck/serverWeb.adslnocable.it/log/backup.log: No such file or directory


can u help me ?

Thanks!!
You need to configure corectly the backup dir, line 107 from the script, "BACKUPDIR" variable. It's the place where to store the backups and it must exist.

P.S.: sorry for the delay in answer, hope will help you!
Reply With Quote
  #8  
Old 1st January 2010, 11:20
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 69
Thanks: 4
Thanked 38 Times in 6 Posts
Default

Quote:
Originally Posted by rudolfpietersma View Post
I runned the script but it hangs and gives me some errors. Can somebody tell me what they mean?



Tnx,
Rudolf.

EDIT: I executed the script on another (my new) server and here no error messages.
Please read carefully the comentaries on the script. The script tries to backup the directories from the "DIRECTORIES" variable in line 100.
You do not have the /adm directoy that it's why you get the error:
Code:
/bin/tar: /adm: Cannot stat: No such file or directory
The other errors are because the file are modified by external programs when tar tries to archive them (syslog and console-kit in your case). The last errors are because the files are actually sockets, not real files. You can use the "EXCLUDED" variable, in line 102 of the script, to exclude files (sockets) or directories you do not wish to backup.

P.S.: Sorry for the delay in answer, I have been verry busy in the year end.
Reply With Quote
  #9  
Old 1st January 2010, 11:35
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 69
Thanks: 4
Thanked 38 Times in 6 Posts
Default

Quote:
Originally Posted by rudolfpietersma View Post
What's the easiest or best way to backup to an existing Windows 2003 server?

Should I do this with a mount? Or use FTP to upload the files to the server? Or are there better ways to do this? Please advise.
It's a simple answer. Let's take the two cases you provided:
  1. you have a linux server on wich you run the backup script and you mount a samba share from Windows 2003 server:
    The script gets the larger files and archives them locally on the server and consumes the bandwith twice (with the S = sparse tar argument) to read the
    files from the Windows 2003 share. So if the share is 1Gb the bandwith consumed is 2Gb and the archive can take longer to make compared to the second case.
  2. you have a linux server on wich you run the backup script and you already have uploaded the files you wish to archive, 1Gb worth of files, 1Gb bandwith used.
    The script takes less to archive files (they are accesed localy) and the bandwith consumed is 1Gb.

Conclusion:
  • Those two cases are good if you want to keep the Windows 2003 backup on the linux server. This is good, you have data redundancy
    If the linux and Windows are on a local lan both metoths are good. If the computers are on the internet, the first case it's not so good, it consumes more resources.

P.S.: Hope this helps you! Sorry for the delay... too much work.
Reply With Quote
The Following User Says Thank You to go0ogl3 For This Useful Post:
AbannyvabVask (29th November 2013)
  #10  
Old 10th January 2010, 22:55
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
 
Default

Amazing script, works like a charm thanks go0ogl3
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 18:04.


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