Command line tools for i-mscp

  • The script now should work with the newer release rc3, beware because it won't work for older versions after these changes.

  • More changes, fixing some remaining issues with dns changes related to this

  • Hi,

    Just to follow up on where I got to and what I'm working on.

    I created a small simple backup/restore script for Amazon's S3 service, which can easily be changed to some other tool/location. S3 is a paid service, so it won't work for everyone. I use it because it allows for easy access control and each server only gets read access to other server backups, making it hard to screw up.

    It allows for:
    - backup/restore
    - categorised by frequency (currently set to daily|weekly|monthly)
    - all domains or specific domain
    - default s3 bucket, and override (restore from different server's backup)

    This will tie in with the command line tools you've created soon, as I've mentioned in previous posts. I will be running your tool across multiple servers, then using s3cmd for backup/restore/migraton/mirroring. For now this is only a handy way of storing those nightly backup files and restoring them or copying them to another server.

    I've created a thread around the tasks I'm trying to complete as they are off topic for your thread. Of course your tool got me started :)…igration-Work-in-progress

  • Great, just create a merge request when you're done :)

  • Hey I finally got around to looking at the automated restore, only to find it was extremely simple and easily added to your tool.

    In gui/public/client/backup.php I found the following function, and send_request() appears to be essentially the same as /var/www/imscp/engine/imscp-rqst-mngr in that it calls the daemon to make the changes. If/how you implement the one line of SQL is up to you, but personally I think specifying it via domain name would be better 99% of the time, and it's only one more line. You could have both, with the domain code calling the ID code.

    I've only skimmed your code thus-far, but if you really want I could send something more for you. This is really all you need though right?

    Edit: Just wanted to note again for nux etc, if this was how imscp called the commands, via a central library. This action in backup.php could read do_action('restore_domain', $userId); and we could call it via do_action.php restore_domain X. Exactly like you've been building but without code reuse and maintained with imscp, so no future mismatches. It could be moved there gradually too. I'll happily help with this, though I don't know where anything is. If I made a big effort and created the library and updated these other files to reference it, would it even be included?

  • This script was born prior the modularization of imscp, to create something easy to script and all. About the merging of the code with imscp, it would require a lot of work, and I can't warranty that it will be merge, but any changes you do to this will be merged, even if it's not adopted or integrated so anyone can use it.
    I'd prefer if you could send me the patch or the modified code, because I don't have the backup system in my servers and I couldn't test.

  • Hello,

    Is this script still compatible with the 1.2.x releases ?
    I don't know if I do something wrong or if it's just not compatible anymore...

  • No No No...

    This script is not compatible, doesn't take care about events which are triggered and so on. So please, forget it ;)