Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th May 2009, 14:34
schildhans schildhans is offline
Junior Member
 
Join Date: May 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default daily backup of user web & databases

Hi,

i need to set up a backup system for my users, so that they can download their backups.
After searchinf the Inet i found that setting $go_info["server"]["do_automated_backups"] = 1 in /home/admispconfig/ispconfig/lib/config.inc.php for ISPconfig 2 did the trick. So I searched for the configfile of ISPConfig 3 and found /usr/local/ispconfig/server/lib/config.inc.php , but this file does not have a PHP array go_info.
So I assume that setting it anyway will not work.
Is there a way to use this feature with ISPConfig 3?

schildhans
Reply With Quote
Sponsored Links
  #2  
Old 21st May 2009, 18:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,723 Times in 2,563 Posts
Default

No, this feature hasn't been implemented yet.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th July 2009, 19:03
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
Default

Daily backups can easily be implemented using tar running on a cron job. This would be external to the ispconfig framework.

http://www.howtoforge.com/forums/showthread.php?t=36714
__________________
System6Hosting.com, ISPConfig 3, Debian.
Reply With Quote
  #4  
Old 9th August 2009, 04:48
synapse123 synapse123 is offline
Junior Member
 
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 6 Times in 1 Post
Default backup

If you have a real working server, my general advice is to install BackupPC on another (backup) server, and backup the /var/clients, /var/www, /var/vmail, /home, /etc, /usr/loca/ispconfig folders (didn't i forget anything?). Or easier just to backup everything from the root, excluding some useless stuff like /var/lib/mysql, /var/log and /var/cache.

To store the database, just create its sql export into /var/clients/sql folder before every backup with tcpdump (there is an option in BackupPC to run any script before backup). Then BackupPC will take those new files created by tcpdump.

In case of big databases a small optimization is desirable. Here is my script to optimize the disk space usage on backups. It exports all tables of all the databases into separate files. It should be run by BackupPC every time.

$ cat /var/clients/sql/export_sql.sh

Code:
#!/bin/sh

#create this dir first!
SQL_DIR=/var/clients/sql/mysql
#create a user with global read permissions in your mysql
DB_USER="backup_reader" 
DB_PASS="put its password there"
umask 0077

# here we create the list of databases, and exclude some of them which we don't need to backup
DATABASES=`mysql -u$DB_USER -p$DB_PASS --default-character-set=utf8 --batch --skip-column-names --execute="SHOW DATABASES" | grep -v "test" | grep -v "prosearch" |sort`

# We walk through each database and take the names of tables.
for DBNAME in `echo $DATABASES`
do
  DB_DIR="$SQL_DIR/$DBNAME/"
  mkdir $DB_DIR > /dev/null 2>&1
# first we delete all the old sql exported in previous backup
  rm -f $DB_DIR*.sql.bz2
  TABLES=`mysql -u$DB_USER -p$DB_PASS --default-character-set=utf8 --batch --skip-column-names --execute="SHOW TABLES" $DBNAME |sort`
  for TableName in `echo $TABLES`
    do
# Than we backup each table.
    /usr/bin/mysqldump -u$DB_USER -p$DB_PASS --default-character-set=utf8 --result-file=$DB_DIR/$TableName.sql $DBNAME $TableName
# and bzip each sql file 
    /usr/bin/bzip2 $DB_DIR/$TableName.sql
    done
done
It's extremely useful if it's needed to restore one table or its part. On huge tables it's simply saves time on cut of long sql files.
Reply With Quote
The Following 6 Users Say Thank You to synapse123 For This Useful Post:
dclardy (29th October 2009), falko (9th August 2009), giftsnake (11th September 2009), SamTzu (24th September 2009), vogelor (9th August 2009), yoplait (18th January 2010)
  #5  
Old 24th September 2009, 08:33
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Smile

I hear that bzip uses a lot more processor power that tgz.
If you have only an 'average' server (like most of us do) then you might want to use tgz compression instead. Backup's will take more room but the load on processor will be much lighter on the webserver.

__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
  #6  
Old 24th September 2009, 08:43
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Exclamation

By far the easiest backup solutions are in this order...

1) Proxmox virtualisation and snapshot backup with webcontrol panel.
- VPS restoration can be done with one command on the host server
* vzdump --restore vzdump-132.tgz 132
- You can create as many backup schedules of VPS's as you want.
(Something like nightly backup's with weekend backups on different folders. NOTICE!!! You have to manually create the backup folders first.
Quote:
mkdir /backup /backup/daily /backup/weekly /backup/monthly
etc.) Version 1.4 will support Storage options like iscsi.

2) Webmin's backup.
- Not really that efficient but easy webcontrol panel and no need for command line at all.
- REALLY EASY MySQL backup!!! Just backup all databases.

3) BackupPC
- Really good product for those who do not fear command line work.


Personally I have found it good to use all of these options combined.
Proxmox for 'Ghost' like total Virtual Private Server (VPS) images.
Webmin for easy MySQL backups inside the VPS.
And BackuPC for the rest. (I have excluded /backup folder backups on the hosts. Otherwise the amount of data would just be too BIG. )
All of these give me quite easy backup/restoration options on both file and server levels.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent


Last edited by SamTzu; 24th September 2009 at 08:55.
Reply With Quote
  #7  
Old 24th September 2009, 09:05
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default

In my opinion (as an administrator) ISPConfig2's best feature was the easy backup's of web/db/mail/log.

If restoration of those could have been implemented it would have been perfect.

After all, backup/restoration is the most important aspect of any system.
It directly translates to why virtualisation is so powerfull. It gives us easy ways to backup/restore/move/copy data.

At the moment this is still taking its baby steps. Only server level virtualisation (mostly). I hope to see the day when we can move mailboxes and websites from server to server like virtual servers can now be moved from host to host.

Imagine the power of such a system.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
  #8  
Old 24th September 2009, 09:43
Franz Franz is offline
Senior Member
 
Join Date: Jul 2009
Location: Cakovec
Posts: 117
Thanks: 7
Thanked 24 Times in 18 Posts
Send a message via Skype™ to Franz
Default

HI, maybe this help?

my backup script
__________________
my PAGE
VoIP
my IT help blog
Reply With Quote
  #9  
Old 18th January 2010, 12:50
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Default

Hi, maybe this script will help you:
http://www.howtoforge.com/forums/sho...d.php?p=214894

It's a script which can be used to backup any linux system and it's run from cron. You can find more info in the script header.
Reply With Quote
  #10  
Old 18th January 2010, 18:41
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
 
Default thx, but...

You're missing the point. As an admin backup's and restoration is not really that big of a problem for me (personally.)

I'm talking about easy backup/restoration that a ReSales person can be tought to do. (ie. non-nerd
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

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
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Problems with Backup of web data omobilo General 1 19th May 2008 20:04
howto? ispconfig web backup to ftp automated?? gjcomputer Installation/Configuration 1 15th May 2008 19:59
Rejected e-mail (unknown user) w/Postfix doronkeller HOWTO-Related Questions 9 27th January 2008 20:09
how: create article (web & domain) + user testset General 4 5th June 2007 13:49


All times are GMT +2. The time now is 23:48.


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