Announcement

Collapse
No announcement yet.

database backup question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • database backup question

    Does it matter if the file is a .gz or a .sql file? I can get a backup of my database through cpanel however it is in .gz format. I want to know if that will give me a good backup or not.

    http://members.cox.net/al.hare/mysupra29.jpg

  • #2
    AFAIK the backup files created by CPanel can only be restored by CPanel. Haven't tested this though so I could be wrong. And an .sql file is a text file while a .gz file is a gzip compressed file. The .gz file will be a lot smaller needs to ne uncompressed before being restored (which CPanel does automatically.)
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Originally posted by 94SupraTT
      Does it matter if the file is a .gz or a .sql file? I can get a backup of my database through cpanel however it is in .gz format. I want to know if that will give me a good backup or not.

      Doesn't matter really but for *.sql and particular *.gz files you NEED to verify the backup works and is complete

      to do this

      on server in ssh telnet

      1. uncompress backup type in ssh telnet

      gzip -d vb_backup.gz

      should give you a file named vb_backup (probably without an extension doesn't matter as mysql will read it as a txt file anyway)

      2. verify backup by creating an empty mysql database named emptydb

      3. now import vb_backup into emptydb

      in ssh telnet type:

      mysql -u mysqlusername -p emptydb < /path/to/location/of/vb_backup

      it will prompt for mysqlusername's password and then wait until you get return to prompt - it can take anywhere from 1-60mins depending on how large your vb_backup is.

      4. now use phpmyadmin or edit your vB forums config.php and point it temporarily to emptydb name so you can browse your live forums using the backup to check everything is okay

      to verify on windows local pc

      1. just use winzip or winrar to uncompress vb_backup.gz and you should have a file named vb_backup with no extension name

      2. now if you have a local server or windows installed with Apache/PHP and MySQL you can do the same above steps to restore the backup into an empty new mysql datbase and install local copy of your vB forum files and point config.php to the empty new database containing the backup imported.

      HTH
      :: Always Back Up Forum Database + Attachments BEFORE upgrading !
      :: Nginx SPDY SSL - World Flags Demo [video results]
      :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

      Comment


      • #4
        Originally posted by eva2000
        Doesn't matter really but for *.sql and particular *.gz files you NEED to verify the backup works and is complete

        to do this

        on server in ssh telnet

        1. uncompress backup type in ssh telnet

        gzip -d vb_backup.gz

        should give you a file named vb_backup (probably without an extension doesn't matter as mysql will read it as a txt file anyway)

        2. verify backup by creating an empty mysql database named emptydb

        3. now import vb_backup into emptydb

        in ssh telnet type:

        mysql -u mysqlusername -p emptydb < /path/to/location/of/vb_backup

        it will prompt for mysqlusername's password and then wait until you get return to prompt - it can take anywhere from 1-60mins depending on how large your vb_backup is.

        4. now use phpmyadmin or edit your vB forums config.php and point it temporarily to emptydb name so you can browse your live forums using the backup to check everything is okay

        to verify on windows local pc

        1. just use winzip or winrar to uncompress vb_backup.gz and you should have a file named vb_backup with no extension name

        2. now if you have a local server or windows installed with Apache/PHP and MySQL you can do the same above steps to restore the backup into an empty new mysql datbase and install local copy of your vB forum files and point config.php to the empty new database containing the backup imported.

        HTH
        Should I verify it for both .sql and .gz In the past I've had my database dumped to a folder weekly and I downloaded it and its always been a good backup. Now however my host has me downloading from cpanel in .gz format. Your example has .gz thats why I ask.

        http://members.cox.net/al.hare/mysupra29.jpg

        Comment

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