LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Will cloning one hdd (not ssd) to another encrypted hdd work on a cloning device? (https://www.linuxquestions.org/questions/linux-newbie-8/will-cloning-one-hdd-not-ssd-to-another-encrypted-hdd-work-on-a-cloning-device-4175660238/)

hddfsck 09-03-2019 12:44 AM

Will cloning one hdd (not ssd) to another encrypted hdd work on a cloning device?
 
Does something need to be done first to the encrypted device? The encrypted device "IS" the destination.

berndbausch 09-03-2019 04:12 AM

Assuming the two disks have the same size and the cloning device makes a bit-by-bit copy, it doesn't matter whether the destination disk is encrypted. After cloning, you have two disks with identical data.

hddfsck 09-03-2019 05:04 AM

Quote:

Originally Posted by berndbausch (Post 6032575)
Assuming the two disks have the same size and the cloning device makes a bit-by-bit copy, it doesn't matter whether the destination disk is encrypted. After cloning, you have two disks with identical data.

Thanks. How can I tell if the device is 'bit-by-bit'? It doesn't say on the box; I can call the manufacturer.

Firerat 09-03-2019 05:36 AM

maybe I have miss understood

but if a none-encytped is cloned 'bit-by-bit' to an encypted drive the result would be un-encrypted ( bit-by-bit of original ).

or is the encryption at hardware level?


edit im guessing
if encrytion is at device , and not filesystem then yes it should be encrypted

but I honestly don't know where the encryption is happening

berndbausch 09-03-2019 06:17 AM

Quote:

Originally Posted by hddfsck (Post 6032591)
Thanks. How can I tell if the device is 'bit-by-bit'? It doesn't say on the box; I can call the manufacturer.

Since I don't know your cloning device, I don't know what it does. Chances are it just copies each bit from the source to the destination disk without worrying about any structures that might already exist on the destination.

If so, the two disks will be identical after the cloning operation, and as Firerat says, your encryption will go away. I hope that this is your expectation.

Firerat 09-03-2019 06:27 AM

I assumed they wanted encryption

but that was something I leapt to

if the unencryted and the encrypted devices were both mounted, and the files were simply copied. then the files in the destination would be encrypted.

if unencrypted is a root fs, then more work would need to be done to allow booting
if we are talking about home, again more work required but not as much

if it is just data, less work ( but obviously you need to know how to access the encrypted data )


hddfsck, please provide detail of what you want to achieve

hddfsck 09-03-2019 06:54 AM

Quote:

Originally Posted by Firerat (Post 6032614)
I assumed they wanted encryption

but that was something I leapt to

if the unencryted and the encrypted devices were both mounted, and the files were simply copied. then the files in the destination would be encrypted.

if unencrypted is a root fs, then more work would need to be done to allow booting
if we are talking about home, again more work required but not as much

if it is just data, less work ( but obviously you need to know how to access the encrypted data )


hddfsck, please provide detail of what you want to achieve

If the destination drive is encrypted, will the cloning still take place? Goal: move all files TO encrypted device. Thanks.

dc.901 09-03-2019 07:05 AM

Quote:

Originally Posted by hddfsck (Post 6032622)
If the destination drive is encrypted, will the cloning still take place? Goal: move all files TO encrypted device. Thanks.

So, cloning a device and moving all files are two completely different things.

What tool(s) do you plan to use will define if the process will be successful or not.

But, first, you need to determine what exactly do you want:
- "clone a device" (aka, copy OS, config files, applications, your data)
- "move all files" (aka, your data but not OS or applications)

Firerat 09-03-2019 07:12 AM

Quote:

Originally Posted by hddfsck (Post 6032622)
If the destination drive is encrypted, will the cloning still take place? Goal: move all files TO encrypted device. Thanks.

if you clone the drive yes, but it will not be encrypted.

if you mount the encrypted filesystem and copy files to it they will be encrypted.

when I said provide detail
I should have said provide full details

I can give you correct answers to your poor questions, but the answers will be poor even if they are correct.
garbage in garbage out.

The original files:
are they just documents?

or are they files which an operating system requires to operate?

what do you want/need to do with the files after they are encrypted?

syg00 09-03-2019 07:13 AM

Quote:

Originally Posted by dc.901 (Post 6032625)
So, cloning a device and moving all files are two completely different things.

Indeed. If you clone an unencrypted device to an encrypted one, you will finish up with two copies of the original. That's what cloning does - whether it's dolly the sheep or your data.

berndbausch 09-03-2019 08:41 AM

Quote:

Originally Posted by hddfsck (Post 6032622)
If the destination drive is encrypted, will the cloning still take place? Goal: move all files TO encrypted device. Thanks.

Encrypted devices (or encrypting devices) might exist, but I am certain they are rare, only used in very special situations and expensive. A usual hard disk is not encrypted.

You can encrypt the data on a hard disk using encryption software. If encryption software is used, when you write "Linux", what is actually written is "&#fh346%".

Cloning means making an identical copy. When you clone disk A to disk B, any encrypted data that might be on disk B is overwritten. You end up with two identical disks. After cloning, if the data on disk A is encrypted, so is the data on disk B. If the data on disk A is clear, so is the data on disk B.

There might be cloning devices that honour the encryption format on disk B. Most probably, your device doesn't.

hddfsck 09-05-2019 05:04 AM

Quote:

Originally Posted by berndbausch (Post 6032653)
Encrypted devices (or encrypting devices) might exist, but I am certain they are rare, only used in very special situations and expensive. A usual hard disk is not encrypted.

You can encrypt the data on a hard disk using encryption software. If encryption software is used, when you write "Linux", what is actually written is "&#fh346%".

Cloning means making an identical copy. When you clone disk A to disk B, any encrypted data that might be on disk B is overwritten. You end up with two identical disks. After cloning, if the data on disk A is encrypted, so is the data on disk B. If the data on disk A is clear, so is the data on disk B.

There might be cloning devices that honour the encryption format on disk B. Most probably, your device doesn't.

You are correct. Cloning from a non-encrypted device to an encrypted device, erased the encryption on the destination device, unfortunately. Also, the size of the destination device is half of its max potential since the host device was half.

In order to be able to access/ use the other half of the destination device, would I have to start over and delete the cloned contents, and then copy and paste instead of clone (to the destination device)? Thanks.

hddfsck 09-05-2019 05:06 AM

Quote:

Originally Posted by Firerat (Post 6032629)
if you clone the drive yes, but it will not be encrypted.

if you mount the encrypted filesystem and copy files to it they will be encrypted.

when I said provide detail
I should have said provide full details

I can give you correct answers to your poor questions, but the answers will be poor even if they are correct.
garbage in garbage out.

The original files:
are they just documents?

or are they files which an operating system requires to operate?

what do you want/need to do with the files after they are encrypted?

Just documents, no os on hdd; storage hdd after encrypted and transferred; read files afterwards.

In order to be able to access/ use the other half of the destination device, would I have to start over and delete the cloned contents, and then copy and paste instead of clone (to the destination device)?
Thanks.

hddfsck 09-05-2019 05:07 AM

Quote:

Originally Posted by dc.901 (Post 6032625)
So, cloning a device and moving all files are two completely different things.

What tool(s) do you plan to use will define if the process will be successful or not.

But, first, you need to determine what exactly do you want:
- "clone a device" (aka, copy OS, config files, applications, your data)
- "move all files" (aka, your data but not OS or applications)

Just moving all files.

In order to be able to access/ use the other half of the destination device, would I have to start over and delete the cloned contents, and then copy and paste instead of clone (to the destination device)?

Thanks.

berndbausch 09-05-2019 07:43 AM

Quote:

Originally Posted by hddfsck (Post 6033366)
In order to be able to access/ use the other half of the destination device, would I have to start over and delete the cloned contents, and then copy and paste instead of clone (to the destination device)?

So your source disk was half the size of your destination?

Depending on how the disk is structured, there are several options. Tools like gparted allow you to create new partitions or extend existing partitions. You probably need to know, however, how the disk is partitioned, whether it contains a volume manager and what filesystem types are used.

I would start by attaching the disk to a running Linux system that has gparted, and use that tool to analyze the disk structure. Since you still have the source disk, you can even take risks and explore the tool's features and capabilities.


All times are GMT -5. The time now is 11:24 AM.