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.
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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... |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
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
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |




Linear Mode

