
6th December 2009, 20:38
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
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!
|
|
The Following 27 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),
erosbk (6th May 2011),
falko (7th December 2009),
GarGamel55 (14th October 2011),
il.manuel (23rd August 2011),
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)
|

9th December 2009, 07:33
|
|
HowtoForge Supporter
|
|
Join Date: Apr 2009
Posts: 167
Thanks: 25
Thanked 2 Times in 2 Posts
|
|
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
|

9th December 2009, 21:40
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Quote:
Originally Posted by nokia80
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.
|

13th December 2009, 15:52
|
|
Junior Member
|
|
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

14th December 2009, 08:05
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
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.
|

14th December 2009, 12:08
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
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.
|

1st January 2010, 11:11
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Quote:
Originally Posted by Snake12
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!
|

1st January 2010, 11:20
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Quote:
Originally Posted by rudolfpietersma
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.
|

1st January 2010, 11:35
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Quote:
Originally Posted by rudolfpietersma
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: - 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.
- 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.
|

10th January 2010, 22:55
|
|
Member
|
|
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
|
|
Amazing script, works like a charm thanks go0ogl3
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 07:58.
|
Recent comments
1 day 22 hours ago
2 days 7 hours ago
2 days 10 hours ago
2 days 11 hours ago
2 days 13 hours ago
2 days 14 hours ago
2 days 16 hours ago
2 days 17 hours ago
3 days 9 hours ago
3 days 10 hours ago