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

How to move DB and images to different server

Scheduled Pinned Locked Moved
FOG Problems
4
8
784
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.
  • A
    ariederer26
    last edited by Sep 11, 2022, 7:06 PM

    I had a nice working fog server 1.5.9 running on Ubuntu 20.04. Updating it to 22.04 proved to be a mistake. That’s not the worst part. I could have recovered from that. At the same time the system board failed on that server.
    The hard drive data is fine. But I don’t have a DB backup.
    I have setup a new server running on Ubuntu 20.04. The original hard drive is connected to it via USB.
    How can I get my existing DB onto the new server? I know the images can be copied over.

    G 1 Reply Last reply Sep 12, 2022, 12:20 PM Reply Quote 0
    • G
      george1421 Moderator @ariederer26
      last edited by Sep 12, 2022, 12:20 PM

      @ariederer26 Can you boot that 22.04 image on a different computer? The easiest way is to get 22.04 booted then export the database using the mysql commands.

      Yes unfortunately FOG 1.5.9 doesn’t support ubuntu 22.04 just yet. There is an issue with PHP8 that hasn’t been worked out yet. Please stick with 20.04 for now.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      A 1 Reply Last reply Sep 13, 2022, 3:35 AM Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Sep 12, 2022, 3:17 PM

        @ariederer26 You can try copying the whole directory /var/lib/mysql/ from that mounted external drive to your new 20.04 system and just hope it will come up fine.

        1. Stop database service in the new 20.04 system.
        2. Rename /var/lib/mysql/, e.g. to /var/lib/mysql_empty/.
        3. Copy old database directory from external disk to /var/lib/mysql/ as mentioned above.
        4. Match ownership/access rights of copied folders and files.
        5. Start database service.
        6. Pray and check log files and/or journalctl

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • A
          ariederer26 @george1421
          last edited by Sep 13, 2022, 3:35 AM

          @george1421 I was able to put the hard drive into another computer. I tried running the FOGBackup script. This seems to hang at backing up database. I stopped that. I am now trying to just do a mysqldump. Keep getting permission denied. What credentials am I to use to backup the database? Thank you for the help.

          G 1 Reply Last reply Sep 13, 2022, 9:33 AM Reply Quote 0
          • G
            george1421 Moderator @ariederer26
            last edited by Sep 13, 2022, 9:33 AM

            @ariederer26 If you know what the root user account is mysql (this is different than the root user for linux) use that user id and password. If not there are instructions on the internet to reset the root user’s password for mysql. That should have full rights.

            Also in /opt/fog/.fogsettings there should be the user account and password the fog code uses to access the mysql database that account has full read / write access to the fog database too.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

            A 1 Reply Last reply Sep 21, 2022, 12:35 AM Reply Quote 1
            • W
              Wayne Workman
              last edited by Wayne Workman Sep 13, 2022, 8:08 AM Sep 13, 2022, 2:07 PM

              Related article: https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • A
                ariederer26 @george1421
                last edited by Sep 21, 2022, 12:35 AM

                @george1421 Thank you much for the replies. I haven’t had a chance to steadily work on this. But I cannot get past the permission denied for the life of me. I guess I am confused on the syntax of the command to sqldump. Do I have to execute it as Ubuntu root user? Or myself the only user on the system?

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Sep 21, 2022, 6:30 PM

                  @ariederer26 said in How to move DB and images to different server:

                  Do I have to execute it as Ubuntu root user? Or myself the only user on the system?

                  In general any Linux/Ubuntu user is able to run mysqldump. But there is a chance you can run mysqldump and not have to provide DB credentials if Run as root.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  157

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project