Comments (14)
sorted by:
DennJW 5 points ago +5 / -0

Do you mean, just the drive? Or do you mean, over the wire?

If 1, any live environment can trivially do an FS copy, or a DD/image copy. If you mean 2, you're probably looking for one of those fancy SSH+Tar commands.

RightSideFunding [S] 3 points ago +3 / -0

I think that the Drive is sufficient. Basically, I want to set up a Data Processing Server, with specific programs, libraries, and settings, and then clone it to a few others.

DennJW 2 points ago +2 / -0

You could create the base image as an image, in a VM or chroot. Then you could copy that image to all destination.

This can become involved, so you'll have shit to figure out no matter which way you slice it.

RightSideFunding [S] 2 points ago +2 / -0

I found a "Clone" Server method in Linode, and it seems to work just as desired. I don't know what tools they use on the backend, but it works very fast, and accurately. I think that I will experiment with Ansible for Server Management and Updates,.. I think that SysAdmin is the most challenging aspect of SW Development.

Thx for the tips btw.

mvrak 2 points ago +2 / -0

If you are using a cloud service, then yes, you should be using their tools. You didn't really menton that...

Virtualization opens a whole different set of options. For Linode that is, which they expose via their portal.

ethan123 4 points ago +4 / -0

Personally I would rather use Ansible to automate the install of whatever you need cloned. Once you have an Ansible playbook written, then you can install Ubuntu from the USB for each machine and then run the playbook to provision each server with whatever you need.

RightSideFunding [S] 1 point ago +1 / -0

After reviewing the options, I think that I will try and go with Ansible.. It seems like the most modern solution, and likely the easiest once learned.


defiant_liberty 3 points ago +3 / -0

one more thing, every linux has a unique machine id, you probably want to look into making sure they are different, as you clone each machine

also, same with the ssh host keys

RightSideFunding [S] 2 points ago +2 / -0

oh thanks, I was wondering about the host keys

defiant_liberty 2 points ago +2 / -0

man ssh-keygen, there is some info in there about regenerating host keys also man machine-id

contribulation 3 points ago +3 / -0

Basically, I want to set up a Data Processing Server, with specific programs, libraries, and settings, and then clone it to a few others

Machine image cloning is a tool of last resort for when you don't know what's on it. If you know what software you need deployed, machine image cloning is not your tool.

Use Docker. Build all of your software dependencies into a docker image, then deploy that docker image across several machines. Your build/test/deploy cycle will be far shorter with Docker than with machine images. You can also deploy your database with Docker.

RightSideFunding [S] 0 points ago +1 / -1

ohh, didn't think about that... thanks!

defiant_liberty 3 points ago +3 / -0

I like it, it works well. You may have complications if the drive you are restoring to is a different size. If it's larger, I think there are options to override, but I have better luck just making all the partitions on the new drive the exact number of blocks, and restoring partition by partition, and changing to the way I like later. But there is still the boot sector.

To do it manually, "dd if=/dev/sda count=2048 of=backup.dat" to save the old boot sector, and "dd if=backup.dat of=/dev/sda" to restore. (assuming it is 2048 blocks, and drive sda), use fdisk or gdisk to see where the boot sector size ends and the 1st partition begins. and to create the new partitions

rosie 2 points ago +2 / -0

I use dfsee to clone drives, and every other type of drive/partition maintenance. https://www.dfsee.com/