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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 20th March 2012, 14:03
chaloum chaloum is offline
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:

THESITE=the_name_of the _site
THEDBUSER=The DB_users_name
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  $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


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 10:26
Shell script for backup and restore inddeveloper Programming/Scripts 3 15th September 2010 09:59
ISPConfig Backup Script vaio1 General 14 13th November 2009 15:23
Backup script alex916 Installation/Configuration 5 6th June 2009 11:44
Uninstalld Now Cant run older php script abselect Installation/Configuration 1 18th October 2005 10:23

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

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