PDA

View Full Version : Potential Backup Script



xzolian
02-21-2008, 10:18 AM
Does anyone have experience with this script?
http://bash.cyberciti.biz/backup/mybackup.php

Does anyone seen any potential problems or security flaws with it?

redsox9
02-21-2008, 11:37 AM
Are you aware that there is a backup option through cPanel? Would that do the same for you?

Believer
02-21-2008, 11:37 AM
I haven't looked at the script in question, but can't you just use the cPanel Backup Wizard to create a complete backup? Then just scp via SSH or FTP the files down to your machine.

xzolian
02-21-2008, 12:02 PM
I haven't looked at the script in question, but can't you just use the cPanel Backup Wizard to create a complete backup? Then just scp via SSH or FTP the files down to your machine.
I'm trying to automate the process by finding a decent script and running a daily cron job. I would like to email the files to a gmail account. Last time I checked cpanel didn't offer any kind of automated backup solution.

spaaz9
03-02-2008, 02:41 AM
Looks like that script requires mutt, and your server doesn't have that.

Why don't you just run this:


#!/bin/bash
###########################
# Quick and Dirty Website Backup Script #
###########################
cd ~/ #You can change this to whatever directory you want to backup
tar -cvzf backup.`date +'%m%d%Y'`.tar.gz *
echo "Backup is Complete" | mailx -s "Backup Status" you@youremail.com


Then just create a cron job to run it. It will run the backup, and then e-mail you that it's done... Pretty simple