Community Forums

Important Notice:

Two sections of this forum are available only to registered customers. In order to receive access to the Customer Forums and ResellerCentral Forums, you must first register on these forums or login to your existing forum account. If you are an existing HostNine customer, be sure to register using the email address on file for your billing profile.

Go Back   HostNine Community Forums > H9 General Forums > Lounge / Off Topic > Web Hosting

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2007, 05:48 AM
indigo indigo is offline
Newbie
 
Join Date: May 2007
Posts: 7
Default website backup

is there a script (preferable PHP) which can backup a website folder etc.
What i am looking for is a script which can select which folders to backup and not the whole site.

I am trying to upgrade a few scripts (forums etc) and need to backup a folder...
Reply With Quote
  #2  
Old 07-10-2007, 05:03 PM
kobra kobra is offline
Web Hosting Master
 
Join Date: Oct 2006
Posts: 595
Default

If you have "shell" access and I suggest "putty" you can create a bash/linux file and name it ?backup? or any name you prefer and run it with just the name. It will look similar to this allowing for editing to only the dir's you want to backup:
Code:
if [ -e $HOME/1backups ]
then
echo "The backup directory exists."
else
echo "A backup directory does not exist, and will be created."
mkdir $HOME/1backups
echo "A backup directory has been created"
fi

# now we define our own variables
# location of files to backup
FILES=$HOME/archive-files
# name of compressed archive
ARCHIVENAME=backups.tgz
# location of backup directory
BACKUPDIR=/archive/Your_dir/
# create compressed archive, copy to backup directory
tar czf $ARCHIVENAME $FILES
cp -ap $ARCHIVENAME $BACKUPDIR

if [ -e $BACKUPDIR/$ARCHIVENAME ]
then
echo "Backup successful, the backup worked!"
else
echo "Opps!, the backup failed. Time to debug."
fi
Reply With Quote
  #3  
Old 07-21-2007, 04:36 PM
FoxRocks's Avatar
FoxRocks FoxRocks is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Location: Alberta, Canada
Posts: 49
Default

I just use my ftp software and save the folders I need to backup. But now that I see this, I wonder if a script would be a nicer option! hmmm
Reply With Quote
Reply

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
Backup restores via your own backup H9Alex General Announcements 0 08-24-2009 03:36 PM
New Backup Software?? zanass Reseller Hosting 4 10-20-2008 05:09 PM
Need host to backup store data files - not website rosy0123 Web Hosting 3 08-19-2008 05:45 AM


All times are GMT -5. The time now is 09:06 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

Host Nine

Our mission began in 2006. Thousands of awesome clients later, we are now one of the most popular hosters in the world.
Most of this is because of our fantastic support. Join us, you'll be glad you did - that's a given.