Backup Service?

Status
Not open for further replies.

dark_hunter

Active Member
1,222
2009
33
35
I need a backup service, can't risk what happened to me again, happen again.

Know any service that I can use that is not gonna let me down?

Cheers guys.
 
Last edited:
9 comments
First, here is the script, call it backup.pl and put it in a folder outside the root of your sites.
You set it to run daily using cron, but can set an offset. I have mine set at 3 so it runs at 3am.
PHP:
backup.pl 
================ 
#!/usr/bin/perl

#### CONFIG #### 
$backupHour = 3; # TIME TO RUN THE backup

$backupPath = "/backup"; #This is the folder where your backup file set file is stored 
$backupFileName = "backup.tar.gz"; #The name you want to give to your tar file 
$backupFileList = "file_list.txt"; #The list that you use to determine what parts to back up

$HostHasMySQL = 0; # 1 = YES, 0 = NO 
$MySQLRootPassword = ''; 
$MySQLbackupFileList = "mysql_list.txt"; #The list that you use to determine which databases to backup. 
################

($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);

if ($hour == $backupHour) { 
if ($HostHasMySQL == 1) { 
&DumpDatabases; 
} 
&backupFiles; 
}

#### SUBS ####

sub backupFiles 
{

# remove old backup file 
$systemresult = system("rm $backupPath\/$backupFileName");

# create .tar.gz file 
$systemresult = system("tar czvf $backupPath\/$backupFileName -T $backupPath\/$backupFileList \&>\/dev\/null");

}

sub DumpDatabases 
{

my $name;

if (open(DBLIST, "$backupPath\/$MySQLbackupFileList")) {

while (<DBLIST>) { 
if (/^\s*\#/ ¦¦ /^\s*$/) { 
# Ignore Comments and Blank Lines 
} elsif ( /^\s*([\w]+)\s*/ ) { 
$name = $1;

$systemresult = system("mysqldump --opt --user=root --password=$MySQLRootPassword $name > $backupPath$

} 
}

close (DBLIST);

}

}

Create a file, file_list.txt, and insert folders that you want backing up, into a new line.
eg:
/www/home
/www/public
/etc/passwd

The bottom one, shows that you can also back individual files up. If you put a folder in the list, it will backup the contents of that folder, and all subfolders.

For the mysql_list.txt - just enter the dabase names onto separate lines.
eg:
site1dbase
site2dbase
mydbase

Set it up to run either on cron, or run it from the cammand line.
A tar.gz file will be created - if you want to get this off, then you will need to download it off your server - but beware, if all your sites and databases are in it, it could be a large file!

Hope this helps,
 
or....back up your site?? Is this such an unusual practice? Most people have cPanel and can do it easily. I dont have cPanel yet I manage to do it weekly for all my sites.
 
I think you may just try fully updated service & without a penny from

Code:
http://www.xcloner.com/support/download/

If you want to buy the support, then that would be your own choice. The app is free & pretty easy to use.
 
Get a backup script and upload it to a file service that don't leak files. Or upload it to a vps/dedi and just make sure your ftp account is limited.
 
First, here is the script, call it backup.pl and put it in a folder outside the root of your sites.
You set it to run daily using cron, but can set an offset. I have mine set at 3 so it runs at 3am.
Not what I had in mind.
Or just buy a service on trusted and reputable provider so you can sleep well :P

For a backup service I suggest http://www.r1soft.com/
That's what I want, but I want user feedback on witch one they used and liked.
or....back up your site?? Is this such an unusual practice? Most people have cPanel and can do it easily. I dont have cPanel yet I manage to do it weekly for all my sites.
Because I want to backup the entire server in one go? I don't have time going into every account and backing up.
 
Thanks for the information in this thread. Someone suggested the R1Soft backup service. I would have to agree thats a fine service to use and would do just fine. Check for hosting providers that may be able to give you that service at a lower cost than what R1Soft.com themselves sell it at.
 
Status
Not open for further replies.
Back
Top