Giter Site home page Giter Site logo

cloner's Introduction

#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

  1. Download a copy of the repository to local destination directory
  2. Enter projects into the table projects You need to provide those fields:
  3. ftp_host url of the ftp-server
  4. ftp_user user of the ftp-account
  5. ftp_password the password of the account
  6. ftp_dir if the directory is a sub-directory
  7. intervall number of days... clone this project every n days
  8. destination 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

  1. Cloner is more of an exercise than a real world solution ;)
  2. There is just little output on th command-line, little error-handling and no messaging.
  3. Use at you own risk. Don´t use it as your one and only backup system.

##Don't try this at home! - Really.##

cloner's People

Contributors

rolfkempf avatar

Forkers

adityanemali

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.