We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4420
    • 60 Posts
    I am used to working in a simple change process (solo developer) where I have
    local webdev directory with what is being worked on
    which then gets tried on a
    local testing server directory (Apache) for testing
    and, if it’s OK gets copied (ftp’d) from the local webdev directory to
    the live server
    (where of course it promply falls apart...) - but ignoring that last bit:

    Clearly if I am enabling the end user to update their content on the live server, albeit in a controlled and restricted way, then I am losing control over that process.

    Notably, the only place where a known valid and current copy of the website exists is on the server (assuming it is valid and hasn’t gone wobbly).

    Is there any utility for managing this?

    I mean something that would enable you to have your local copy of the modxified website, a connection to the remote (live) one, and allow you, for example to:
    read a chunk from your local db and write it to the remote one?
    or synch local and remote db (and files) based on timestamps

    ..or am I misunderstanding something about the right way of working with this?
      • 4420
      • 60 Posts
      sorry posted in wrong bit - meant to be in modx 101
        • 32046
        • 75 Posts
        Not sure if I understand what you are trying to achieve here, but if it’s as I understand then I would also like to know if there is an answer to this.
        I find it annoying that to make a small update for a client (which I find I’m doing repeatedly while a site is in the nearing completion stage) I need to go to the remote modx manager and go

        • Tools > Backup
        • Select all tables
        • Deselect system settings table
        • select Generate drop statements
        • backup
        • copy all generated text
        • open phpmyadmin and select database
        • paste in SQL and import
        • clear cache
        • make updates (the quick bit!
        • and then reverse the entire process to sync remote to newlyupdated local database! Arrrgh!
        If we could simply add the remote and local databases locations to a config file at the beginning of a project development and then simply click a "Sync local to remote" or "Sync remote to local" button, now that would be awesome, absolutely awesome (and slightly dangerous!) smiley
        I would write such a plugin if I had some clue how!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Actually at one time Scotty Delicious (WebLoginPE and TreasureChest) had begun a very interesting Mac application for managing MODx from the desktop. It’s all in the database; you could (in fact, I have on occasion) access the database from a local MySQL client.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 3749
            • 24,544 Posts
            Provisioner sounds close to what you want, but it’s only available for Revolution at present: http://modxcms.com/extras/package/563
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 4172
              • 5,888 Posts
              under xampp/windows for example you can create a .bat-file with something like that:

              E:\xampp\mysql\bin\mysqldump -h [hostname] -u [user] -p --add-drop-table [database] [tablenames (space-delimited)]> C:\backup.sql --default-character-set=utf8
              E:\xampp\mysql\bin\mysql -D [localdbname] -u root --default-character-set=utf8 < C:\backup.sql


              creates a local sql-dump with given tables from your remote-database and recreates your tables on your local machine with one click.

              Or try something like heidisql and copy tables from remote to local.
              I use heidisql for most of mysql-transactions.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 26903
                • 1,336 Posts
                Provisioner sounds close to what you want, but it’s only available for Revolution at presen
                , true, but reading this thread has got me thinking, now we have the revogateway package for provisioning from evolution sites, we could leverage this for evolution<->evolution sites.

                We could write a module for evo that acts like a provisioner 3PC in revo, Ok, this would take much more work than provisioner did as we don’t have the pre-built modext components in evo, but if we start maybe with basic stuff like ’sync all my resources’ it becomes more doable.

                Maybe we could just implement a ’sync’ module as described above, or something like it anyway.
                  Use MODx, or the cat gets it!
                  • 4420
                  • 60 Posts
                  Thanks for the insightful responses to this. Been away from ModX for a few weeks but currently re-immersing myself and migrating the site I was working on from 1.04 to 2.0. Just downloaded Provisioner - which certainly sounds like it provides at least some of what I am looking for - will let you know how I get on.

                  Thanks to wdnz for the clear explanation of his/her change process, and I will check out Heidisql too as suggested by Bruno17.