View Full Version : Autobackup to FTP server
lano
16th January 2008, 21:40
It would be nice if Ispconfig could perform auto backup (data that are backing up in backup manager) to external ftp server. In backup manager you would check sites to backup, then select daily or weekly task and enter informations of ftp backup server... and happy Ispconfig users will be even more happy, knowing
that data of our customers is in safe place :)
Just a thought
David
p.s.:
I am not a programer but, maybe someone could write some kind of plugin? Invoke cron or something? ...
falko
17th January 2008, 17:53
Until such a tool is available for ISPConfig, you can do it manually like this: http://www.howtoforge.com/ftp-backups-with-duplicity-ftplicity-debian-etch
lano
17th January 2008, 19:57
This tool looks excellent, but it doesnt create mysql dumps, as Ispconfig backup manager does.
goldstift
18th January 2008, 00:43
Hi,
I'm currently using the following Shellskript to backup my MySQL-Databases:
#!/bin/bash
# file: mysql_backup.sh
# 20060810 AHE
echo "`date +%F_%T`: Starting mysqldump...
"
user=root
user_pw=THE_MYSQL_ROOT_PW
backupDir="/backup/mysql/"
DBS="$(mysql -u $user -p$user_pw -Bse 'show databases')"
for db in $DBS
do
currDB=$db
filename=$backupDir$db"_dump.sql"
mysqldump --user=$user --password=$user_pw $db > $filename
# Don't generate gzip files at the moment
# gzip -c $filename > $filename".gz"
# rm $filename
done
echo "`date +%F_%T`: Finished mysqldump...
"
You have to adjust the variables "user_pw" and "backupDir" of course.
This scripts gets the list of all databases running in your mysql server and dumps them to simple DATABASENAME.sql files.
You should run a "chmod 700 mysql_backup.sh" on the script to ensure that only the author may read it - except you want everyone to know your mysql root's pw ;-)
Greets,
Alex
unclecameron
18th January 2008, 08:35
Cool script, thanks :)
I added a couple lines to make it put the backup time/date in the filename so I could avoid accidentally overwriting the dumps, I added:
date="`date +%F_%T`"
and changed
filename=$backupDir$db"_dump.sql"
to
filename=$backupDir$db"_"$date"_dump.sql"
falko
18th January 2008, 20:08
If you want to back up MySQL without interrupting it, take a look here: http://www.howtoforge.com/back_up_mysql_dbs_without_interruptions
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.