Features
This page is intended as a guide to the current status, a quick-reference to the commands and a road-map for future development of ClonePanel. Click on a feature name for documentation (if not linked this is not yet written – sorry!).
Current download on the site is v0.32.
| Feature | v0.30 | v0.31 | v0.32 | Command examples | Comments |
|---|---|---|---|---|---|
| Installation | β | β | β | ./install | Sets up data for this server (the backup store / monitor / controller). |
| Set up first server | β | β | β | ./server add ./server -H HOST1NAME -a IP [-i IP -n IP -d WHM|BIND|NONE -o "VARNAME=value"] add|del |
Writes data to hosts/HOSTNAME |
| Set up master account | β | β | β | ./account add ./account -H hostname -u username [-r role -o "VARNAME=value"] add|del |
Writes data to accounts/username. Calls setup_remote_key to give access to this account on remote server. |
| Set up databases | β | β | β | ./database add ./database -d username_dbname [ -u username -l username_dbuser -p secret -t tablenames ] add|del |
Writes database connection information to file accounts/databases/n (n is a number). Database passwords stored in plain text – DON’T USE THE ACCOUNT USERNAME / PASSWORD! |
| Automated web-site backup | n/a | n/a | β | ./backup -u username [-H HOSTNAME] | Backs up web data from a remote host (the WEB_MASTER unless otherwise specified). Requests remote server to dump all databases. Fetches copy of database dumps and all files in public_html. Using rsync only changed files are transferred. |
| Make daily, weekly, monthly snapshots | β | β | β | ./rollover -u username ./rollover -u username [-d 7 -w 4 -m 6] |
Rolls back snapshot backups, keeping by default 7 daily, 4 weekly and 6 monthly snapshots. |
| Set up second server | β | β | β | ./server add ./server -H HOST2NAME -a IP [-i IP -n IP -d WHM|BIND|NONE -o "VARNAME=value"] add|del |
Second server defined just like the first. Neither has any specific role – a server may be master for some accounts and slave for others. |
| Set up slave account | β | β | β | ./account add ./account -H hostname -u username [-r SLAVE -o "VARNAME=value"] add|del |
Second server defined for one account is automatically the slave. |
| Sync account data | β | β | β | ./sync_remote -u username ./sync_remote -u username [-H HOSTNAME] |
Housekeeping – make both servers aware of their status, database data etc. |
| Automated web-site mirror | β | β | β | ./sync -u username | Exactly like backup, but if both master and slave remote hosts are defined then download backup from the master and upload it to the slave. Warning: Don’t make any changes on the slave server – they will be lost when you sync! |
| Set up domain name | β | β | β | ./zone add ./zone -z example.com -u username add|del |
Creates a directory accounts/ username/ zones/ example.com containing override.db, which defines what records should be changed on failover. Then using get_dns (below) attempts a zone transfer from the DNS_MASTER host and if successful saves the zone file as zone.db |
| Fetch zone information | β | β | β | ./get_dns -u username ./get_dns -u username [-z example.com -H HOSTNAME -s] |
Requests zone transfer from DNS_MASTER host. Note – nameserver must allow zone transfer to your IP. CPanel by default allows transfers to all. |
| Update dns on servers | α | β | β | ./set_dns -u username ./set_dns -u username [-z example.com -H HOSTNAME -c] |
Updates DNS_MASTER and DNS_SLAVE hosts with the current zone file for the account. Requires WHM remote-access key (WHM method) or access to update the nameserver (BIND method). |
| Set up cron jobs | β | β | β | ./cronjob add ./cronjob -c command -t timesperday -u username [-f] add|del |
Add / remove cron job for an account.Default jobs are: sync every 12 hours, rollover every day, monitor every 5 minutes (for servers with monitoring turned on). |
| Add all cron jobs to crontab automatically | β | β | β | ./setcron ./setcron [ -d -l -m mins -H hours -n all|error|none ] |
Sets crontab to include all accounts with cron jobs set, plus monitoring.-d is dummy run, -l to list current active jobs (like crontab -l). -n to specify e-mail notification. |
| Monitor servers | α | α | β |
./monitor -i [ -H HOSTNAME ] | -i to run interactively and display results. Default is to append to file system/monitor/YYYY-MM-DD-HH for later display via web.If HOSTNAME not given check all hosts with monitoring data defined. |
| Log error | pre-α | α | β |
./log_error file score host | Not intended for interactive use – should only be called by monitor.pl (itself called by monitor). Receives an error notification, logs it to file and takes further action (error_manager, e-mail notification) if required. |
| Error manager | pre-α | α | β |
./error_manager | Not intended for interactive use – should only be called by log_errors. Counts recent errors logged and handles changes of status (default GREEN, AMBER or RED) through set_status (below). Also adds itself to crontab to run repeatedly while there are any recent errors. |
| Set status | pre-α | α | β |
./set_status -H HOSTNAME -s RED [ -d ] | Changes the status of a host server (in file system/status). If AUTO_FAILOVER is ‘y’ in config, also calls mod_dns to modify dns zone for each affected domain and then set_dns to update the dns servers. If an update fails or one of the nameservers is status RED, add a cron-job to keep trying. ie. DNS failover when status goes RED, returning to normal when status goes GREEN.ToDo: This should be configurable per-domain, since failover on a static site would be much easier to live with. |