Remote Backup 1.0
This util use native interworx backup
Transfer files using secure ssh to remote server
Little util for key server included
Report by mail when backup start, and report when finsih, with time date, and backup size included in the report
Auto rotate old backups:
Save copy last backup or save only current backup.
Optional safe mode, if backup fail, old backup not rotated or deleted.
Remote Backup 1.1
New features (05-01-2006):
Now you can configure folder where backup its saved.
Skiplist available, now you can make your own list of site or sites to skip in the backup. (selective backup)
Next version features ?
Just place your request and i try add feature requested.
About Rsync feature
Available in the future? NO… sorry! Why?
Simple: rsync its a little complex to backup and restore, and not really usefull when have 100% automatized hosting company with multiple domains per server, and system for enable, disable and delete accounts in automatic way.
With rsync, the backup continue saving domains already deleted of the servers, and need manual deletion of backups every few days for have correct and real copy of sites hosted on the servers. (this can be fixed but need extra code for check list domain hosted per servers, for compare with the domains on the backup etc etc)
Everybody say rsync its light backup system, yes !! that its real, specially for sueper big sites, if you have super big site, the best its use rsync, but you can continue using my backup tool with that domain skiped form the backup, and just configure rsync for that super big site.
The native backup Iworx used by my frontend its really light and not overload the server, in all my servers, the usual load its 1 to 1.2 runing the iworx backup the load just go to 1.86 to maximum 2 for about 1:30hour, and about rsync save band width, yes that its real, but at this moment server providers around the world offer great BW quota transfer to cheap price, so i really no think BW its a real trouble.
BW its your trouble? well i think the solution its second HARD DISK for daily backups, and one weekly or montly remotebackup.
For this reason i decide use Iworx native backup and create this frontend for improve the IWORX native backup usage. : )
The idea of this backup is make this task automatic, programed in cron for save backup to remote server using ssh transfer.
You can configure daily in crontab or weekly, or montly.
Backup 100 normal sites, take about 1 hour (this time can change based on network speed, size of sites, number of files, cpu etc etc)
You need key your server using ssh, in this way backup program make automatic conection using ssh without need you enter root password or save roor password on any file.
This how to install, supose you have 2 servers and need backup server 1 to server 2 and server 2 to server 1.
Or backup server to any other server with ssh acces and root access.
Or backup to self server.
Install script on server you want perform backup:
tar xvf remotebackup.tar
nano -w config
enter IP of remote server where backup be saved or self server IP.
Enter email where you want recive reports of backup.
With this option you can save one copy of last backup, or can disable and just only save fresh and current backup.
If you have free space for save copy, i recomend not disable and use default value, in this way you have oldbackup saved and current backup saved.
This option save your old backup in folder named SAFEoldBACKUP before backup start, and delete when backup end.
If server crash in under the backup process, you have a copy of your old backup in SAFEoldBACKUP folder.
I add this option because rotation scheme i use is very simple and rotation fail if server crash.
If you not recive mail reporting backup finished, i recomend enter to folder where files backup are saved and chek if folder SAFEoldBACKUP exist.
MV folder to any other name, and rerun backup, if backup its completed then delete that folder.
Just configure the pat you want use for save the backup on remote server, you no need cerate folder, the backup create the folder if no exist.
This util make by default complete server backup (all domains) if you need skip/exclude domain or multile domains from the backup, just edit file skiplist, and add the doamins you want skip, one per line, example:
Aditional to domains list, you can filter the backup, based on the TLD, if you no want backup some specific TLD domain, you can add to skiplist that TLD, example, just add to skiplist:
This, make backup skip/exlude all domains .tv and .biz
Now is time key your servers:
Run this command on server want backup and server where you the backup its saved.
ssh-keygen -t rsa
Press enter 3 times, use empty frace for key.
(If you already have key created just overwrite)
Now o run the util for key server:
This util just copy they key to remote server, the util ask for root password of remote server where you save backup, enter password and press enter.
For check if the server is correct keyed, just run:
Run hostname for see if you stay loged on remeote server correctly, if all is ok, just run exit for back.
(you can key self server if no plain make remotebackup)
Add to cron the backup, daily or weekly:
For daily at 1 AM add:
02 1 * * * root /root/.bk/remotebackup > /dev/null 2>&1
For weekly at 1 AM add:
22 1 * * 0 /root/.bk/rootremotebackup > /dev/null 2>&1
I sugest not run at 4am because server perform other task, and you can probably overload your server.
Dont forgot change path /root/.bk/ to path where you decide locate the backup util.
If want run your fist backup manually just type:
By default, backup files are saved on /root/.bk folder of remote server, or self server if you decide make backup to self server, remember you can change that path or can use the default.
Well i hoppe this be util for somebody. I not are programer, so this is very simple but work ok.
This backup make complete backup of all sites, and no use rsync, take care with BW used if run daily.
My native language not is english, sorry if my spell no is correct !
[B]Paypal donations: email@example.com : )
[/B] Best regards! and enjoy !