Join the community today
Register Now

Sysadmin Wp Engine Type Production > Staging File and DB Sync

Discussion in 'System Administration' started by leoadhemartan, May 12, 2020.

  1. leoadhemartan

    leoadhemartan New Member

    7
    3
    3
    Jun 28, 2019
    Ratings:
    +3
    Local Time:
    11:49 AM
    Hi,

    I find the Wp Engine style of syncing the files and db of Prod to Staging for testing plugin updates and doing a full health check before running the updates to production to be safe for my sanity.

    I'm looking towards replicating this workflow in centminmod.

    ideally it would look like this:

    Wordpress Sites:

    domain.com - prod

    staging.domain.com - staging

    Run a script to quickly sync the prod files and prod db to the staging files and staging db and automatically update the relevant domains.

    Update staging and do a full health check.

    When satisfied, run the update in prod and do a final health check in prod.


    It would also be ideal to just have staging regularly sync it's files and db with prod.


    Does centminmod already have an existing tool like this? I know I can rsync the files between staging and prod, I'm worried about the db sync as well as making sure the stored domains in the db is updated properly.


    I only want a Prod to Staging sync.

    Thanks.
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod doesn't have existing tools for this but it's in the works as part of the larger feature set for backup and restore and server transfer routines. So eventually the plan is to be able to backup and restore site - even to restore to a new domain name i.e. staging. Long way off as I only work on Centmin Mod in my free time. If Centmin Mod was a full time paying jig, features would indeed roll out much faster heh.

    As to Wordpress specifically, if you use wp search-replace commands you can update a restored/copied Wordpress databases site url domain for staging just like how you do it in the guide I wrote for changing a Wordpress's site domain to a subdirectory domain site or whatever you want for the desired changed Wordpress site domain at Wordpress - centmin.sh menu option 22 - How to switch Wordpress to subdirectory
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    6:49 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Hope to get the full server transfer before the next Black Friday :)

    Last year there was some good deals but not easy and fast to move all domains form all servers to a new server....

    Thanks George !!!!!
     
  4. mayorjc

    mayorjc New Member

    10
    1
    3
    Jun 18, 2018
    Ratings:
    +4
    Local Time:
    10:49 PM
    This would indeed be a good feature.

    I admire your dedication and sorry if open-source, making your knowledge available to us laymen. What is there was a way to "bid" or contribute to certain features to make their development prioritization more palatable when competing with other economic priorities (eg other gigs/ paying work)?
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah I have thought about sponsored development work. Something I want to make available eventually. Just sometimes it would still compete with my day job paid work in server optimisation consulting as that work maybe time sensitive in nature and not something I could lower priorities for i.e. client hires me to troubleshoot server load issues and/or page speed issue and/or is expecting increased visitor traffic and requires upgrading server hardware and needs me to analyse their usage requirements and provide recommend server upgrades/new web hosts suited to their projected traffic requirements and/or budget etc.