• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

How to Backup Database - Where is the SQL file located?

Scheduled Pinned Locked Moved
FOG Problems
4
13
8.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    CASEY
    last edited by Mar 13, 2012, 8:38 PM

    With this command (and similar ones) I always get the error message as follows:

    [I][B]mysqldump: Got error: 1045: Access denied for user ‘fog’@‘localhost’ (using password: YES) when trying to connect[/B][/I]

    1 Reply Last reply Reply Quote 0
    • S
      sam-white
      last edited by Mar 13, 2012, 8:47 PM

      I use “root” to backup all my databases. That or you will need to “GRANT” permissions to the FOG user. Also make sure your PASSWORD has no space after “-p”.

      1 Reply Last reply Reply Quote 0
      • C
        CASEY
        last edited by Mar 13, 2012, 8:51 PM

        That did it!!! Thanks!

        How do I restore it after say a fatal event occurs…

        Should I start a new thread?

        1 Reply Last reply Reply Quote 0
        • S
          sam-white
          last edited by Mar 14, 2012, 2:35 PM

          [FONT=Verdana][COLOR=#333333]mysql -u USERNAME -pPASSWORD < filename.sql[/COLOR][/FONT]

          [FONT=Verdana][COLOR=#333333]Where “filename.sql” is the backup file you created. Make sure to unzip the file before restoring the database if you used gzip from my earlier post.[/COLOR][/FONT]

          1 Reply Last reply Reply Quote 0
          • F
            falko Moderator
            last edited by Apr 16, 2012, 11:49 AM

            when restoring after a ‘disaster’ do you build Ubuntu, Install FOG, then import the dump? does the server have to have the same IP etc

            1 Reply Last reply Reply Quote 0
            • S
              sam-white
              last edited by Apr 16, 2012, 1:42 PM

              You need to install FOG before you restore. The IP address should not matter when restoring a backup. You might have to go to the webpage and change the IP address under Other Info > FOG Settings. I have never changed IP’s when moving FOG so I am not sure if you need to do that.

              1 Reply Last reply Reply Quote 0
              • C
                chad-bisd Moderator
                last edited by Apr 18, 2012, 4:39 PM

                I only dump and restore the fog database, not the entire mysql instance. Minor changes to the commands used, documented well in the mysqldump section of the mysql website.

                You can also tar+gzip your /opt/fog/, /var/www/fog/, and /tftpboot/ folders to preserve your fog installation. I host my images on a raid 5 array, so hopefully I do not lose them because of a disk failure. I have almost a 400GB of image files, so backing them up to another location takes a while.


                If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                1 Reply Last reply Reply Quote 0
                • F
                  falko Moderator
                  last edited by Apr 19, 2012, 3:10 PM

                  i backup the images though not such a big thing for me as i only have 2 soon to be 3 images when i start testing/deploying window 7 x64.

                  1. windows 7 all software deployed with SAD2 driver tool
                  2. windows 7 all software deployed with SAD2 driver + games

                  also my two master images are Virtual machines in virtualbox and get backed up from my box to a 2nd HD and to our servers along with fog mysql database, full inventory reports etc

                  1 Reply Last reply Reply Quote 0
                  • S
                    sam-white
                    last edited by Apr 19, 2012, 5:04 PM

                    [LEFT]You can restore a single database from a mysqldump of all-databases.[/LEFT]
                    [LIST]
                    [*]mysql -u root -p[I]PASSWORD[/I] --one-database [I]DB[/I] < [I]DBfilename[/I].sql
                    [/LIST]
                    [INDENT=1][LEFT][url]http://dev.mysql.com/doc/refman/5.1/en/mysql-command-options.html#option_mysql_one-database[/url][/LEFT][/INDENT]

                    1 Reply Last reply Reply Quote 0
                    • S
                      sam-white
                      last edited by Apr 19, 2012, 5:05 PM

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post

                      246

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project