Learn about Centmin Mod LEMP Stack today
Register Now

CMM Backup Script

Discussion in 'Add Ons' started by brijendrasial, Jan 8, 2019.

  1. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    Hello Everyone,

    I am not a good coder in any way but tried to create a script for general use. This script initially supports local backups and their restoration. Will be updating it soon to support more backup options.
    Brijendrasial/CentMinMod_Backup

    [​IMG]
     
    • Like Like x 9
    • Winner Winner x 2
    • Informative Informative x 1
    • Useful Useful x 1
  2. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    10:22 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  3. frm

    frm New Member

    18
    3
    3
    Dec 17, 2018
    Ratings:
    +4
    Local Time:
    9:22 PM
    1.15.7
    10.3.11
    This would be great if there was a 5th option of a database backup for servers just running a database.

    Also if the FTP or S3 could work as backups could exceed storage space. :)
     
  4. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    Hello,

    Sorry I dont get that much time and in free time I complete. Between FTP backup is completed. If someone can provide me amazon s3 backup server for few days I would love to complete it too. Suggestions are always welcome
     
    • Like Like x 2
  5. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    Database backup and restore both or just database backup is needed.
     
  6. upgrade81

    upgrade81 Premium Member Premium Member

    233
    14
    18
    Sep 5, 2016
    Switzerland
    Ratings:
    +21
    Local Time:
    2:22 PM
    1.17
    10.3
    I can supply it to you.
    but how are you going to structure your backups?
    what will you use incremental? Full? Deduplication?
    Borg?
     
  7. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    full backup per account I use and will add functionality every month.
     
  8. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    To make only full database backup one per mysql account run the below command.

    Code:
    ./CMM_backup.sh -f
     
    Last edited: Mar 26, 2019
  9. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    Now single database backup is supported.

    Code:
    ./CMM_backup.sh -u DB_NAME
     
    • Like Like x 5
  10. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    Last change. Now many full site and db backup uncompressed using below command.

    Code:
    ./CMM_backup.sh -b
    If someone can share amazon s3 account let me know so I can develop last module.
     
    • Like Like x 2
  11. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    Now CMM server to CMM server migration is supported which is limited to wordpress site.

    5th Option is for migration.
     
    • Like Like x 4
    • Informative Informative x 1
  12. upgrade81

    upgrade81 Premium Member Premium Member

    233
    14
    18
    Sep 5, 2016
    Switzerland
    Ratings:
    +21
    Local Time:
    2:22 PM
    1.17
    10.3
    what exactly is copied? Vhost, cron? Only Database and files?
     
  13. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    vhost, mysql, files and ftp is then created at last
     
  14. upgrade81

    upgrade81 Premium Member Premium Member

    233
    14
    18
    Sep 5, 2016
    Switzerland
    Ratings:
    +21
    Local Time:
    2:22 PM
    1.17
    10.3
    give me your ID or Email AmazonService and I'll give you access to my new test bucket.

    what do you think about inserting a way to schedule the times for every single domain backup?
     
  15. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
  16. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    Amazon Backup Added.
     
    • Like Like x 1
    • Winner Winner x 1
  17. fabianski

    fabianski Member

    102
    13
    18
    Feb 20, 2019
    Brazil
    Ratings:
    +35
    Local Time:
    9:22 AM
    Its possible add google drive?
     
  18. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    I will check when I have time and will add google drive option
     
  19. brijendrasial

    brijendrasial Member

    56
    54
    18
    Mar 21, 2018
    Ratings:
    +73
    Local Time:
    5:52 PM
    1.13.9
    10.0.22-MariaDB
    I have added 6th option for gdrive backup.
     
    • Like Like x 3
    • Winner Winner x 1
  20. fabianski

    fabianski Member

    102
    13
    18
    Feb 20, 2019
    Brazil
    Ratings:
    +35
    Local Time:
    9:22 AM
    wow thanks!