The admindemo: reset function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • N9ne
    Senior Member
    • Mar 2002
    • 2477
    • 3.5.0 Beta

    The admindemo: reset function

    I was wondering, would I be able to have the script? On localhost, I would like to be able to easily "reset" everything, ie. the DB back to normal, and templates...

    Would this be possible? Or are we looking at some $$$ for me to get the script?
  • JamesUS
    Senior Member
    • Aug 2000
    • 4622

    #2
    Originally posted by N9ne
    I was wondering, would I be able to have the script? On localhost, I would like to be able to easily "reset" everything, ie. the DB back to normal, and templates...

    Would this be possible? Or are we looking at some $$$ for me to get the script?
    All the script does is execute an entire MySQL dump back into the database - it's really very easy to reproduce. It's not very clever at all

    Comment

    • Cary
      Senior Member
      • Apr 2002
      • 4433
      • 3.6.x

      #3
      Originally posted by N9ne
      Or are we looking at some $$$ for me to get the script?
      I'll give it to you for 50 Bucks.

      Comment

      • Chen
        Senior Member
        • Jun 2001
        • 8388

        #4
        Originally posted by Cary
        I'll give it to you for 50 Bucks.
        Unlike Cary I actually have access to it and will let it go for only $9.95!!! (special offer limited to November only)
        Chen Avinadav
        Better to remain silent and be thought a fool than to speak out and remove all doubt.

        גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

        Comment

        • N9ne
          Senior Member
          • Mar 2002
          • 2477
          • 3.5.0 Beta

          #5
          Originally posted by JamesUS
          All the script does is execute an entire MySQL dump back into the database - it's really very easy to reproduce. It's not very clever at all
          Does that mean I can have the "query" for free?

          EDIT: just realised it isn't a query, but it's injecting a mySQL dump back in...can I have the script for free pleeeease?

          Comment

          • Cary
            Senior Member
            • Apr 2002
            • 4433
            • 3.6.x

            #6
            Originally posted by N9ne
            Does that mean I can have the "query" for free?

            EDIT: just realised it isn't a query, but it's injecting a mySQL dump back in...can I have the script for free pleeeease?
            I can't go any lower than Chen's offer.. sorry.

            No, really, as James mentioned it's very easy to do. Simply do a backup of the database right after you install it. Create a script that when it is run it emptys the database and runs your backup.

            Comment

            • John Round
              Senior Member
              • Jan 2002
              • 442
              • 3.0.0 Beta 5

              #7
              filburt1 has already started

              Comment

              • okrogius
                Senior Member
                • Dec 2001
                • 1149

                #8
                Originally posted by Cary
                I can't go any lower than Chen's offer.. sorry.

                No, really, as James mentioned it's very easy to do. Simply do a backup of the database right after you install it. Create a script that when it is run it emptys the database and runs your backup.
                But I might.

                I'll code you this script for FREE* (and it will also work with register globals off, which probably isn't the case with the script used here)!

                *Handling fee of $9.90 applies on all orders. All payments are required in full before work is began. We reserve the right to change price at any time without any prior notice. We also reserve the right to reject any orders for any given reason. These terms and conditions are subject to change without any notice.

                Seriously though, it's an incredibly simple script...

                Comment

                • MUG
                  Senior Member
                  • Apr 2002
                  • 1191
                  • 2.3.0

                  #9
                  Originally posted by N9ne
                  Does that mean I can have the "query" for free?

                  EDIT: just realised it isn't a query, but it's injecting a mySQL dump back in...can I have the script for free pleeeease?
                  This is the script I use (complete with the passwords for the database, on my local server of course... )
                  PHP Code:
                  <?php
                  $username
                  ="vb";
                  $password="vb";
                  $database="vbulletin";
                  $path="/etc/httpd/vbulletin.sql";

                  exec("/usr/local/mysql/bin/mysql --user=$username --password=$password $database < $path");
                                
                  echo 
                  'All done!';
                  ?>
                  It needs some modification to run on Windows servers, someone else can do that...

                  Comment

                  • N9ne
                    Senior Member
                    • Mar 2002
                    • 2477
                    • 3.5.0 Beta

                    #10
                    Originally posted by MUG
                    This is the script I use (complete with the passwords for the database, on my local server of course... )
                    PHP Code:
                    <?php
                    $username
                    ="vb";
                    $password="vb";
                    $database="vbulletin";
                    $path="/etc/httpd/vbulletin.sql";

                    exec("/usr/local/mysql/bin/mysql --user=$username --password=$password $database < $path");
                                  
                    echo 
                    'All done!';
                    ?>
                    It needs some modification to run on Windows servers, someone else can do that...
                    that's it! I know enough PHP to do the rest of it, it's just the exec function I didn't know about and I was sure about how to go about doing so...thanks for that, I can use that

                    Comment

                    • N9ne
                      Senior Member
                      • Mar 2002
                      • 2477
                      • 3.5.0 Beta

                      #11
                      Hmm ok I tried a few things and I can't get it to work on my system! I don't know what I have to do, but I have a winXP OS...

                      I know all my paths correctly, it's just the --user= and the password variable, etc. I'm just not sure how it's done on winXP...

                      Comment

                      • nuno
                        Senior Member
                        • Apr 2001
                        • 4346
                        • 3.8.x

                        #12
                        To run on Windows Servers:
                        PHP Code:
                        <?php
                        error_reporting
                        (7);

                        require(
                        "./global.php");

                        $username="db_user_here";
                        $password="db_pass_here";
                        $database="vbulletin";
                        $path="c:/vBdb/vbulletin.sql";

                        exec("c:/mysql/bin/mysql.exe --user=$username --password=$password $database < $path");
                                      
                        echo 
                        '<a href="http://domain/index.php">All done!</a>';
                        ?>
                        Upload it to your admin folder and save it as reset.php.
                        All done.
                        You're my Prince of Peace
                        And I will live my life for You

                        Comment

                        • Chen
                          Senior Member
                          • Jun 2001
                          • 8388

                          #13
                          There goes my $9.95...

                          (Moving to PHP btw.)
                          Chen Avinadav
                          Better to remain silent and be thought a fool than to speak out and remove all doubt.

                          גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                          Comment

                          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                          Working...