> For the complete documentation index, see [llms.txt](https://karansingh.gitbook.io/tutorialsdojo-wrong-answers-aws-sec-spec/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://karansingh.gitbook.io/tutorialsdojo-wrong-answers-aws-sec-spec/migrating-data-from-encrypted-ebs-volume-to-an-unencrypted-ebs-volume.md).

# Migrating data from encrypted EBS volume to an unencrypted EBS volume

* **When you create an encrypted EBS resource**, it is **encrypted by your account's default key for EBS encryption unless you specify a different customer managed CMK** in the volume creation parameters or the block device mapping for the AMI or instance.

* Assuming you still have a **running EC2 with access to the Encrypted volume and it has an unencrypted volume attached**, you **migrate the data of that encrypted volume to the unencrypted volume**.

* You can **freely transfer data between them** and **EC2 carries out the encryption and decryption operations transparently**.

![](https://560082743-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MT1aTjM0U73ienXQ-F0%2F-MTW3ZsXZ-hOEnWwfeyu%2F-MTWKLIZ2teTg05RhyL7%2Fimage.png?alt=media\&token=f3db468c-a0cc-49f4-858b-c0f13aebffb4)

* For example, use the **rsync command to copy the data**.
* In the following command, the **source data is located in /mnt/source and the destination volume is mounted at /mnt/ destination:**
  * `[ec2-user ~]$ sudo rsync -avh --progress /mnt/source/ /mnt/destination/`
    * This way, **even if you lose the CMK used to encrypt the original EBS volume, you can still recover the data and copy to another volume without encryption**.
