We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19220
    • 26 Posts
    Ah .. somehow, I assumed that the .sql file was supposed to do that for me. Seems pretty clear now smiley.

    So, now I’m getting this message:

    #
    # Lerner Clan Database Dump
    # MODx 0.9.5 RC2 (rev 1942)
    #
    # Host: localhost
    # Generation Time: Dec 30, 2007 am31 03:42
    # Server version: 5.0.26-log
    # PHP Version: 5.1.6-pl6-gentoo
    # Database : `modx`
    #
    # --------------------------------------------------------
    #
    # Table structure for table `modx_active_users`
    #
    CREATE TABLE `modx_active_users` (
    `internalKey` int( 9 ) NOT NULL default '0',
    `username` varchar( 50 ) NOT NULL default '',
    `lasthit` int( 20 ) NOT NULL default '0',
    `id` int( 10 ) default NULL ,
    `action` varchar( 10 ) NOT NULL default '',
    `ip` varchar( 20 ) NOT NULL default '',
    PRIMARY KEY ( `internalKey` )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 COMMENT = 'Contains data about active users.';
     MySQL said: Documentation
    #1050 - Table 'modx_active_users' already exists 


    It looks to me like the structure of modx_active_users hasn’t changed between my backup and the ModX that I just installed. Do I just open up the .sql file and delete the CREATE TABLE lines for cases like this? There are five of them:

    ~/Desktop$ grep "CREATE TABLE" 30_dec_07_database_backup.sql
    CREATE TABLE `modx_active_users` (
    CREATE TABLE `modx_categories` (
    CREATE TABLE `modx_document_groups` (
    CREATE TABLE `modx_documentgroup_names` (
    CREATE TABLE `modx_event_log` (
    


    Thanks!
      • 3749
      • 24,544 Posts
      Removing the CREATE TABLE lines should work unless the existing tables have data in them. If they do, you could create a mess by adding together two sets of data.

      Instead, I’d be inclined to just to go in PhpMyAdmin and drop all the existing tables (but not the database itself).

      Alternately, you could put matching DROP TABLE lines in front of the CREATE TABLE lines.

      Bob

        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
        • 19220
        • 26 Posts
        Quote from: BobRay at Dec 30, 2007, 05:36 AM

        Alternately, you could put matching DROP TABLE lines in front of the CREATE TABLE lines.

        I did that, and it claimed to work.

        Unfortunately, it looks like I didn’t get enough tables backed up in the first place .. I was still actually missing everything except for the tables I mentioned above. I don’t know why that happened :/.

        So, even though I don’t really understand anything, I had a copy of the actual tables from /var/lib/mysql. I just copied those over to the new machine, changed the owner, and everything worked. .. well, actually, I had to edit assets/cache/siteCache.idx.php to tell it that things were under /var/www on my new system vs. /var/www/localhost/htdocs on my old system.

        But whatever, the site is back up now. Thanks!

        -michael
          • 19220
          • 26 Posts
          Quote from: mglerner at Dec 30, 2007, 06:54 AM

          actually, I had to edit assets/cache/siteCache.idx.php to tell it that things were under /var/www on my new system vs. /var/www/localhost/htdocs on my old system.

          Just in case anybody else ends up doing things this way, the above is not enough. Instead, you need to go into the manager and change Tools->Configuration->Interface & Features->Resource Path. You also need to change Tools->Configuration->File Manager->File Manager Path. The siteCache.idx.php (as, I guess, the name implies) gets rewritten periodically.

          You may also need to re-upgrade to the newest ModX at this point, because "restoring" this way blows away some of the new stuff.
            • 17802
            • 190 Posts
            Quote from: ram at Jul 31, 2007, 03:16 PM

            Error message and exit itself comes from line 1293 to 1296 of /manager/includes/document.parser.class.inc (MODx 0.9.6).
            (snip)
            Obviously this really isn’t the way to deal with these bugs in a sensible fashion.
            So I suppose the more pertinent question is how do we get the event inserted into the database successfully, and therefore remove the error message?

            I’m having a similar problem, using Modbak v0.93 and MODx 9.6.2. When I try to run the module, the message "Please wait while MODx loads the page..." stays in front of the page. However, if I click ’Generate backup’ anyway, the backup is generated, though the sql file is not inside the zip file. I wonder if anyone knows how to fix this without hacking document.parser.class.inc? It would be great if Modbak was compatible with MODx 9.6.
            Cheers!
              Thanks for MODx - I love it!
              • 1454
              • 11 Posts
              I am having issues with the install of Modbak.
              I am using MODx 0.9.6.1 with Modbak 0.9.4.

              First, I got a blank page. I checked the error logs (System Events page).
              The error was

              • syntax error, unexpected ’<’
              I removed the <> around the email on line 4 in the modbak.module.tpl file.
              When I ran Modbak again, the second error was

              • Backup directory /var/www/html/_backup/ does not exist
              In the settings page, I had changed my file to /home/myusername/_backup, Modbak was not reading this file. So I made a new file in the public directory /_backup.
              I ran Modback again, I got this error

              • Error while inserting event log into database.
              The error logs say

              • Undefined index: nrtotalmessages

              So I found "nrtotalmessages" in the header.inc.php file on line 42.

              • // set tree to default action.
                parent.menu.ca = "open";

                function msgCount() {
                try {
                top.scripter.startmsgcount(<?php echo $_SESSION[’nrnewmessages’] ; ?>,<?php echo $_SESSION[’nrtotalmessages’] ; ?>,<?php echo $messagesallowed ? 1:0 ; ?>);
                } catch(oException) {
                ww = window.setTimeout(’msgCount()’,1000);
                }
                }

              Anyone got a resolution to this? It’s gone over my head at this point. huh
                Knowledge is power...ignorance is bliss.
                • 3596
                • 5 Posts
                Just like to say this worked really well for me transferring a site, after I’d created the database. Good work!
                  • 1454
                  • 11 Posts
                  Quote from: bloke_zero at Jan 21, 2008, 12:04 PM

                  Just like to say this worked really well for me transferring a site, after I’d created the database. Good work!

                  What versions/systems are you running?
                    Knowledge is power...ignorance is bliss.
                    • 3596
                    • 5 Posts
                    Quote from: AnaStars at Jan 21, 2008, 04:14 PM


                    What versions/systems are you running?


                    Modbak 0.9.4 and 0.9.6 MODx

                    I had to reset the database link with an advanced re-install as the initial install had the database server hard coded in (not left as localhost), but apart from that really quite painless.  I was worried it would be hard to move to the production server but it was easy enough after reading through the forums here.
                      • 1454
                      • 11 Posts

                      Modbak 0.9.4 and 0.9.6 MODx

                      I had to reset the database link with an advanced re-install as the initial install had the database server hard coded in (not left as localhost), but apart from that really quite painless. I was worried it would be hard to move to the production server but it was easy enough after reading through the forums here.

                      Did you change the database info on the config file? I just noticed that my initial install did not create a config.inc.php file. That might have an issue with Modbak.

                      Any idea how to recreate a config file for an existing website?
                        Knowledge is power...ignorance is bliss.