Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th March 2012, 13:03
chaloum chaloum is offline
Member
 
Join Date: Mar 2012
Posts: 83
Thanks: 1
Thanked 0 Times in 0 Posts
Default I want to run a backup script, what folder would be best to place it in?

I want to run a backup script, what folder would be best to place it in?

I have a backup script (sh) Which does a mysql dump and zips the dump and the website files together in a folder

the code is as below, The floder locations are as they are on a mac but would change to reflect the ISPConfig folder locations:

Code:
THESITE=the_name_of the _site
THEDB=The_Name_of_the_DB
THEDBUSER=The DB_users_name
THEDBPW='The_DB_users_password'
THEDATE=`date +%d%m%y%H%M`
THEHOST='THE_host_mostprobably local'
/usr/local/mysql-5.5.12-osx10.6-x86_64/bin/mysqldump -u $THEDBUSER -h 127.0.0.1  $THEDB | gzip > /Library/WebServer/Documents/backups/files/dbbackup_${THEDB}_${THEDATE}.bak.gz

tar czf /Library/WebServer/Documents/backups/files/sitebackup_${THESITE}_${THEDATE}.tar -C / Library/WebServer/Documents/$THESITE
gzip /Library/WebServer/Documents/backups/files/sitebackup_${THESITE}_${THEDATE}.tar

find /Library/WebServer/Documents/backups/files/site* -mtime +5 -exec rm {} \;
find /Library/WebServer/Documents/backups/files/db* -mtime +5 -exec rm {} \;

This process keeps the last 5 backups before overwriting the oldest backup, this can be changes to suit.The backup would then be resync'd to another raid array


From what I understand ISPConfig only does a file level backup and it would be great if ISPConfig did this (the above code) out of the box as all the info is there when creating a client and site etc.

But in the absence of a full site and DB backup I want to use my script.

So from and admin point of view, What folder would I be best putting this in?
I need to have a folder called backup and inside the backup folder I need folder called files.

would it be best in the /var folder or the /var/www folder?

any assistance would be appreciated
Reply With Quote
Sponsored Links
  #2  
Old 20th March 2012, 13:10
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
Default

Quote:
would it be best in the /var folder or the /var/www folder?
I would place the backups in e.g. /var/backup

By the way, a full site and DB backup is already implemented in ISPConfig SVN version which will be released as ISPConfig 3.0.5.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
PermaNoob (22nd March 2012)
  #3  
Old 20th March 2012, 13:12
chaloum chaloum is offline
Member
 
Join Date: Mar 2012
Posts: 83
Thanks: 1
Thanked 0 Times in 0 Posts
Default when will it be out?

Till that is great news, when will the new ISPConfig be out? I assume SVN=subversion?

Last edited by chaloum; 20th March 2012 at 13:17.
Reply With Quote
  #4  
Old 20th March 2012, 13:50
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
Default

There is no release date for 3.0.5 yet, I expect it to be released this year in summer.

Quote:
I assume SVN=subversion?
yes.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 20th March 2012, 13:56
chaloum chaloum is offline
Member
 
Join Date: Mar 2012
Posts: 83
Thanks: 1
Thanked 0 Times in 0 Posts
Default where is the location of mysql?

on a mac mysqldump is at this location /usr/local/mysql-5.5.12-osx10.6-x86_64/bin/

where is is in the Centos/ISPConfig world?
Reply With Quote
  #6  
Old 20th March 2012, 14:14
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
Default

Run:

which mysqldump

to get the location.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 20th March 2012, 14:16
chaloum chaloum is offline
Member
 
Join Date: Mar 2012
Posts: 83
Thanks: 1
Thanked 0 Times in 0 Posts
Default so simple

that's so simple thanks
Reply With Quote
  #8  
Old 20th March 2012, 14:37
chaloum chaloum is offline
Member
 
Join Date: Mar 2012
Posts: 83
Thanks: 1
Thanked 0 Times in 0 Posts
Default last question, for now..

I assume the user website loacation/s is

/var/www/clients/client(x)/web(x)/web

where x= the client and web number

is this correct?
Reply With Quote
  #9  
Old 20th March 2012, 16:08
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
 
Default

Yes, thats correct. And there are symlinks to this directory from /var/www and some other locations for easier shell navigation.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
Cannot login to phpmyadmin penkku HOWTO-Related Questions 1 24th February 2011 09:26
Shell script for backup and restore inddeveloper Programming/Scripts 3 15th September 2010 08:59
ISPConfig Backup Script vaio1 General 14 13th November 2009 14:23
Backup script alex916 Installation/Configuration 5 6th June 2009 10:44
Uninstalld Now Cant run older php script abselect Installation/Configuration 1 18th October 2005 09:23


All times are GMT +2. The time now is 04:41.


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