Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to clone PFSense?

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    11 Posts 8 Posters 18.7k Views
    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.
    • H
      hoba
      last edited by

      I think I have heard somewhere that somebody used acronis successfully.

      1 Reply Last reply Reply Quote 0
      • Cry HavokC
        Cry Havok
        last edited by

        I can't provide detailed instructions, but if you throw something like "cloning disks with dd" into Google you'll get a few thousand hits.

        Roughly:

        1. Put both disks/cards into a single machine
        2. Boot the machine with some form of LiveCD (FreeBSD, Knoppix, whatever)
        3. At a command prompt type "dd if=/dev/source of=/dev/target", replacing source with the device that holds the source disk/card and target with the one you want to write to
        1 Reply Last reply Reply Quote 0
        • B
          ballerh3
          last edited by

          g4u might work.
          http://www.feyrer.de/g4u/

          1 Reply Last reply Reply Quote 0
          • C
            cybrsrfr
            last edited by

            I've done it with m0n0wall on a compact flash card. The same method is likely to work with pfSense since m0n0wall and pfSense have so much in common.

            I used Windows with a USB to IDE adapter or USB drive enclosure. Made the image with rawdisk.exe (BSD/Linux equivalent is dd)
            http://www.stud.uni-hannover.de/~kiszka/RawDisk/

            rawdisk [-r|-w] diskno imagefile
            rawdisk -i diskno

            -r              read from disk
              -w              write to disk
              -i              print disk parameters only
              diskno          number of harddisk to read or write (0 for first disk)
              imagefile      name of the image file

            –-------------------------------------------------
            Create Image of drive 1 Example:

            rawdisk.exe -r 1 example.img

            Used physdiskwrite.exe to determine which disk number to use with rawdisk.
            http://m0n0.ch/wall/physdiskwrite.php

            For storage it is compressed with gzip using software 7zip.org.


            Restore config using physdiskwrite Example:

            physdiskwrite.exe example.img.gz

            physdiskwrite v0.5.1 by Manuel Kasper mk@neon1.netSearching for physical drives...

            Information for \.\PhysicalDrive0:
              Windows:      cyl: 12161
                              tpc: 255
                              spt: 63
              C/H/S:        16383/16/63
              Model:        FUJITSU MHU2100AT
              Serial number:        NQ07T542AGMA
              Firmware rev.: 00000008

            Information for \.\PhysicalDrive1:
              Windows:      cyl: 62
                              tpc: 255
                              spt: 63

            Information for \.\PhysicalDrive2:
            DeviceIoControl() failed on \.\PhysicalDrive2.

            Information for \.\PhysicalDrive3:
            DeviceIoControl() failed on \.\PhysicalDrive3.

            Information for \.\PhysicalDrive4:
            DeviceIoControl() failed on \.\PhysicalDrive4.

            Which disk do you want to write? (0..1) 1
            About to overwrite the contents of disk 1 with new data. Proceed? (y/n) y
            Found compressed image file
            509967360/509967360 bytes written in total


            Be careful using physdiskwrite you want to make sure to choose the right disk./mk@neon1.net

            1 Reply Last reply Reply Quote 0
            • B
              bgbearcatfan
              last edited by

              acronis does work fine as well

              /Brian
              /2.0.1-RELEASE
              built on Mon Dec 12 18:24:17 EST 2011

              1 Reply Last reply Reply Quote 0
              • J
                josempinto
                last edited by

                @ballerh3:

                g4u might work.
                http://www.feyrer.de/g4u/

                Thank you all the people who answered, for the tips, and for the help.

                Not having time to test all, I stuck on g4u.

                I have not so much tested, but for the first impression, it seams to be to slow, (slower than ghost) and does not resizes partitons. But works, and copied correctly the boot partition, grub loader and it’s settings (ghost fails doing this step).

                Thanks.

                1 Reply Last reply Reply Quote 0
                • J
                  josempinto
                  last edited by

                  @bgbearcatfan:

                  acronis does work fine as well

                  Right!

                  This time, I had some spare time to use “acronis”, and have done the work fine as well.
                  Better user interface, still slow, about 1H30 to clone a 20G HD.

                  1 Reply Last reply Reply Quote 0
                  • L
                    lordarcane
                    last edited by

                    One thing that would be even better is if one was able to clone the Pfsense while it is running. Acronis has a client for linux. But, i dont know how to install it. Anyone that have done this? And successfully cloned the machine?

                    1 Reply Last reply Reply Quote 0
                    • E
                      eyewittness
                      last edited by

                      Use ghost 2003 boot cd works very nice! Is a lot faster then acronis! I had errors with acronis and ghost 2003 went very well!
                      If you don't have it i can supply you a boot image… for cd.

                      1 Reply Last reply Reply Quote 0
                      • L
                        lordarcane
                        last edited by

                        But, I guess that still requiers a reboot of the machine and some downtime for the firewall. I still would like a solution for cloning the machine while running. And, since Acronis does that for windows machines. I thought maybe that would work for PfSense/freebsd too.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.