How to change database back to what it use to be?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IcEWoLF
    Senior Member
    • Jul 2008
    • 928
    • 4.1.x

    How to change database back to what it use to be?

    Hello all, I am trying to downgrade my version back to 3.8.4 to a more stable version.
    I am stupid, I did not backup the database.
    After deleting all files in FTP I put the 3.8.4 files back in the FTP.

    Now when i go to control panel I get this error:

    Database error in vBulletin 4.0.0 Beta 3:

    Invalid SQL:

    SELECT COUNT(*) AS count
    FROM attachment AS attachment
    INNER JOIN post AS post USING (postid)
    WHERE attachment.visible = 0;

    MySQL Error : Unknown column 'postid' in 'from clause'
    Error Number : 1054
    Request Date : Tuesday, November 17th 2009 @ 05:15:57 PM
    Error Date : Tuesday, November 17th 2009 @ 05:15:57 PM
    Script : http://47r-squad.com/forums/admincp/index.php?do=home
    Referrer : http://47r-squad.com/forums/admincp/index.php?do=home
    IP Address : 75.42.21.123
    Username : IcEWoLF
    Classname : vB_Database
    MySQL Version : 5.0.70

    Trying to covert the database back to 3.8.4 Patch 1, is this possible?
    The 47 Ronin Gaming - www.47r-squad.com
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    You cannot change your database back to 3.8.4. The only way to go back to 3.8.4 is with a backup. There were major changes made to the database - whole tables moved and fields dropped. In your case you are seeing the changes to the attachment table which was dumped into another table and then recreated with a bunch of new fields that do NOT include a postid field.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment

    • IcEWoLF
      Senior Member
      • Jul 2008
      • 928
      • 4.1.x

      #3
      Originally posted by Lynne
      You cannot change your database back to 3.8.4. The only way to go back to 3.8.4 is with a backup. There were major changes made to the database - whole tables moved and fields dropped. In your case you are seeing the changes to the attachment table which was dumped into another table and then recreated with a bunch of new fields that do NOT include a postid field.
      What a tragedy!
      I hope my host has some time of database backup....if not, time to restart the forums, 20k+ posts on the forums too....
      The 47 Ronin Gaming - www.47r-squad.com

      Comment

      • poolking
        Senior Member
        • Aug 2002
        • 2061

        #4
        Originally posted by IcEWoLF
        What a tragedy!
        I hope my host has some time of database backup....if not, time to restart the forums, 20k+ posts on the forums too....
        You should make your own database backups, never rely on your host to do it for you.

        Upgrade 101: always backup your database first.

        Comment

        • IcEWoLF
          Senior Member
          • Jul 2008
          • 928
          • 4.1.x

          #5
          Yep, I totally forgot about the datbase backup...
          My old host did a database backup daily that I paid a premium for it....I totally forgot to check if this host does the same thing, clearly I missed that part.
          I am failure.
          The 47 Ronin Gaming - www.47r-squad.com

          Comment

          • IcEWoLF
            Senior Member
            • Jul 2008
            • 928
            • 4.1.x

            #6
            Ok, luckily my host had a backup.

            But here an issue:


            For some reason I am getting those errors.
            He is backing everything up (including db) back to the 15th however I am still having error?
            The 47 Ronin Gaming - www.47r-squad.com

            Comment

            • MoMan
              Senior Member
              • Oct 2005
              • 345
              • 3.8.x

              #7
              You're probably still running the 4.0 files on your forum; make sure you revert your forum to 3.8.4.

              Also, in the future, here's the easiest way to take backups (with a DB of 20k posts this should take a few seconds):

              (make sure your working directory is where you want the file and then enter this via command line, making sure to replace username/dbname with actual values)

              mysqldump -u db_username -p db_name > choose_filename.sql
              Adam

              Admin of PentaxForums.com, premiere photography forum for Pentax users (Big-Board).

              Comment

              • billp
                Senior Member
                • Aug 2007
                • 115
                • 3.6.x

                #8
                Excuse me for being dense, but which/where command line? in the URL or when you are "at the server" ? I have a small DB about 40K, which backs up fine with the Maintenance backup.

                Comment

                • MoMan
                  Senior Member
                  • Oct 2005
                  • 345
                  • 3.8.x

                  #9
                  If it backs up fine via the maintenance backup, then don't worry about running that command- however, the downside of the PHP backup is that 1. it's prone to timeouts and 2. it relies on your personal internet connection. Once your database grows big, backup via PHP isn't feasible. The command line approach stores the backup on your server, which you can then download later if you want.

                  By command line I mean SSH (secure shell), which is a way to access your server (typically you'd use a client such as PuTTY). If you're running on a shared host, you might not have access to SSH, as it's more of an 'advanced users' type of thing and allows you to directly access the computer that's hosting your site.
                  Adam

                  Admin of PentaxForums.com, premiere photography forum for Pentax users (Big-Board).

                  Comment

                  • billp
                    Senior Member
                    • Aug 2007
                    • 115
                    • 3.6.x

                    #10
                    I have phpMyadmin where it appears that I can export which I assume that is a backup. I need to find out where it is backing up to. The host is backing the whole server up every couple of days. In the Classified program I have it uses a cron to back up the database each day, it is automatic, as it came set up. Is there a way to do that with VB? BTW I have a dedicated server.

                    Comment

                    • poolking
                      Senior Member
                      • Aug 2002
                      • 2061

                      #11
                      You can get hold of a program called "Big Dump" that will split the backup into chunks to prevent the PHP timeouts.

                      Comment

                      • poolking
                        Senior Member
                        • Aug 2002
                        • 2061

                        #12
                        Originally posted by billp
                        I have phpMyadmin where it appears that I can export which I assume that is a backup. I need to find out where it is backing up to. The host is backing the whole server up every couple of days. In the Classified program I have it uses a cron to back up the database each day, it is automatic, as it came set up. Is there a way to do that with VB? BTW I have a dedicated server.
                        Do you have cpanel on your server?

                        Comment

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