#Cloner Cloner is a tool to backup ftp-directories to your local machine. It´s written in PHP using the CodeIgniter framework. Cloner is a command-line-script and you can run it as a cronjob. After each run it could send you a status mail.
Call Cloner like this: usr/bin/php PATH/TO/SCRIPT/Cloner/index.php Cloner clone_all
You need the following tables in application/database/cloner.sqlite
CREATE TABLE backups
(
backupsid INTEGER PRIMARY KEY,
folder TEXT,
timestamp INTEGER,
projectsid INTEGER
);
CREATE TABLE projects
(
projectsid INTEGER PRIMARY KEY,
ftp_host TEXT,
ftp_user TEXT,
ftp_password TEXT,
db_host TEXT,
db_user TEXT,
db_password TEXT,
skip INTEGER DEFAULT 0,
ftp_dir TEXT,
interval INTEGER DEFAULT 10,
last_clone TEXT,
destination TEXT
);
##Usage
- Download a copy of the repository to local destination directory
- Enter projects into the table
projects
You need to provide those fields: ftp_host
url of the ftp-serverftp_user
user of the ftp-accountftp_password
the password of the accountftp_dir
if the directory is a sub-directoryintervall
number of days... clone this project every n daysdestination
name of the destination folder
Settings (/application/controllers/cloner.php
):
download-dir: Default is backup
backups_to_keep: Default is 7
logtoconsole: Default is 'true'
some email-settings
###Warning
- Cloner is more of an exercise than a real world solution ;)
- There is just little output on th command-line, little error-handling and no messaging.
- Use at you own risk. Don´t use it as your one and only backup system.
##Don't try this at home! - Really.##