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

    Slave Drive to backup images

    Scheduled Pinned Locked Moved
    Linux Problems
    3
    6
    3.6k
    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.
    • T
      taspence
      last edited by

      My current fog server is on it’s way out the door. I no longer have the boot or networking capability on it. I will have a new server here shortly and will install Ubuntu 12.10 and fog 0.32, but is there a way with Ubuntu 12.10 and fog 0.32 to “slave” the SATA drive and copy the images and SQL off via the linux command prompt?

      Thank you in advance.

      1 Reply Last reply Reply Quote 0
      • G
        Gilou
        last edited by

        Yes. Plug it inside. Assuming your first disk for ubuntu is /dev/sda, the second one will be /dev/sdb. If you used the first partition on your former partition you can mount it using:
        [CODE] mount /dev/sdb1 /mnt[/CODE]
        Then, your former files will appear under /mnt, and you can get to the usual files, which are:

        • opt/fog
        • var/www/fog
        • images
          As for mysql, you can try getting coldly a backup of var/lib/mysql back in place, but that may not be as easy as it sounds. But it should work, if you stop mysql first copy the data over, start again. Not really clean, but will work in most scenarios.

        Good luck.

        1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott
          last edited by

          This is plenty possible.

          First things first, I’d recommend making an exact replica of the database information with:

          [code]mysqldump -u root -p[root_password] fog > fog_db.sql[/code]

          If you don’t have a password on the mysql server then:
          [code]mysqldump -u root fog > fog_db.sql[/code]

          I’d keep the other fog server running just for a little bit. Get the second one up and running. Then use rsync, or scp to copy the data from /images to the new server.

          First, you’d want to install the new FOG Server information as you normally would, replacing server ip (recommended only) with the old IP address just for use later on.

          Then, run the scp or rsync command from the old FOG server, with something like:
          [code]scp -r /images/* <NEWFOGIP>:/images[/code]

          Copy that fog_db.sql file to the new server in similar fashion.
          [code]scp fog_db.sql <NEWFOGIP>:~/[/code]

          Then on the new FOG Server you’ll run:
          [code]mysql -u root fog < ~/fog_db.sql[/code]

          If you set the password use:
          [code]mysql -u root -p[PASSWORD] fog < ~/fog_db.sql[/code]

          Then the final step, shutdown the old server, and set the old server’s IP address on the new fog server. You should be good to go. You may have to reboot your new fog system to, just to ensure apache/ftp/etc… get updated with the new IP address.

          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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          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
          • G
            Gilou
            last edited by

            If the server doesn’t boot anymore, that won’t be easy 🙂

            1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott
              last edited by

              Why doesn’t it boot anymore? Maybe the drive is bad?

              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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              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
              • T
                taspence
                last edited by

                Thank you for the replies! The “server” I currently have it on is an old PC whereas I have a new server to implement Fog because I love it so much! The old PC was tampered with and the install of Ubuntu is clobbered. I’m not that ubuntu savvy but when I left the server was functioning fine, when I come back it locks up at boot. I have the new server anyways so I really don’t think it’s wise for me to search the forums day in and out to try and figure out the issue with it.

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

                195

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project