Introducing Backup master - A complete bash based solution to backup/restore tasks

  • Backup Master is a bash based script which works alongside the i-mscp system (in that it is tweaked to work with the imscp database and paths), but silently in the background. It can backup in a single command line option, all the existing mysql databases, and the entire virtual server (customizable) to the server. It can optionally transfer the backups to a remote server of your choice-both sftp and ftp protocols are accepted. ftp has batch upload/download/mirror facility.



    The script uses a custom csv based database to keep track of the backup files, and these are called task files. The collection of task files, has details regarding all the files and databases backed up, and these are stored with the date and time of backups in the filename. These can be restored at will.


    The script has command line options to make it useful as cronjobs.


    Everything is automated. At the end of the process, you will receive an email notification of the scheduled job done.


    Options and sensitive information are seperated from the main script. All options are heavily customizable.


    The script is GPL3, and suggestions, improvements, critiques are welcome. It is in beta. At the moment, the script will not touch the imscp tables and are not made to work with the LOCK on SQL system databases. So be prepared to change your imscp user passwords after a restore.


    Download Link: https://bitbucket.org/droidzone/backupmaster


    Installation:

    Code
    1. git clone [email protected]:droidzone/backupmaster.git


    Now copy all the files to a location in your path, and modify fullbackup.conf and fullbackup.dat as per your customized information. [/size]


    Run it with:

    Code
    1. ./fullbackup

    Edited once, last by dzchimp ().

  • Hi,


    I've just joined the forum because of your post.


    Firstly I'd like to thank you for sharing this with the community. I am working on commercial hosting with DNS based failover to backup servers in different countries, really ridiculous level of reliability. This enables me to get this going properly.


    Secondly I would like to know if you are likely to implement something to do this on a per user basis in the future? The ability to move domains between servers and import/export would surely be welcomed by all. And for the purposes of my above mentioned hosting system it would mean distributing the mirroring tasks over time so the servers are not overloaded.


    I do not wish to be rude or demanding, simply wondering if it had crossed your mind while working on this, and what your thoughts are.


  • Secondly I would like to know if you are likely to implement something to do this on a per user basis in the future? The ability to move domains between servers and import/export would surely be welcomed by all. And for the purposes of my above mentioned hosting system it would mean distributing the mirroring tasks over time so the servers are not overloaded.


    Hi,
    If by making it per user, you mean you want it to make seperate backups for each user-i.e it should backup only his files and databases per backup task, it should be possible. At the moment, the only thing needed is to modify fullbackup.conf with the subdirectory (corresponding to the main domain of the user), and also add the database names of other users, in the function which excludes databases from backup.


    If you need this to be automated, I'll need to implement a system to read the main directory of the user, and the database allocation from imcp database. Possible, but requires me taking a deeper look at the organization of i-mscp database. Managing a single user server, it wasnt important for me. But it can be done. Maybe later.