search

Offline Backup HDD with luks


create partation

mkfs.ext4 /dev/sdb1

setup luks

cryptsetup -y -v luksFormat /dev/sdb1

Output :

WARNING!
========
This will overwrite data on /dev/sdb1 irrevocably.

Are you sure? (Type uppercase yes): YES
Enter passphrase:
Verify passphrase:
Command successful.

open luks

cryptsetup luksOpen /dev/sdb1 wjt-backup
Enter passphrase for /dev/sdb1:

Check block device

ls -l /dev/mapper/wjt-backup
lrwxrwxrwx 1 root root 7 Peb 13 18:31 /dev/mapper/wjt-backup -> ../dm-0

Create block device

pv -tpreb /dev/zero | dd of=/dev/mapper/wjt-backup bs=128M

Status

cryptsetup status wjt-backup

Output:

/dev/mapper/wjt-backup is active and is in use.
type: LUKS1
cipher: aes-xts-plain64
keysize: 256 bits
device: /dev/sdb1
offset: 4096 sectors
size: 1953517568 sectors
mode: read/write

Close block device luks

cryptsetup luksClose /dev/mapper/wjt-backup

Unmount

umount /mnt

Look system after backup

sudo cryptsetup status wjt-backup

Output :

/dev/mapper/wjt-backup is inactive.

close
Visit Us On TwitterVisit Us On GooglePlusVisit Us On Linkedin

Hi, guest!

settings

menu