OpenWRT and Backing Up

wiki.TerraBase.info
Revision as of 15:09, 25 August 2023 by Root (talk | contribs) (Created page with "Back it up: dd if=/dev/WhatEverSDx of=/mnt/WhatEverSDx/WhatEverImageName.img conv=sync,noerror bs=64K status=progress (Example: dd if=/dev/sdb of=/mnt/sda1/ALL.img conv=sync,noerror bs=64K status=progress) Create a "Device" to mount: losetup -fP WhatEverImageName.img (To see mounted "Devices": losetup -a) Mount the Image: mount -t squashfs /dev/loop7 /mnt/squash Keep in mind this only works with IMG Files created from Partitions. If an entire disk drive is imaged, th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Back it up: dd if=/dev/WhatEverSDx of=/mnt/WhatEverSDx/WhatEverImageName.img conv=sync,noerror bs=64K status=progress (Example: dd if=/dev/sdb of=/mnt/sda1/ALL.img conv=sync,noerror bs=64K status=progress)

Create a "Device" to mount: losetup -fP WhatEverImageName.img (To see mounted "Devices": losetup -a)

Mount the Image: mount -t squashfs /dev/loop7 /mnt/squash

Keep in mind this only works with IMG Files created from Partitions. If an entire disk drive is imaged, the above method won't work. However...

If an entire disk is imaged with DD, then a "map" of it can be viewed with CFDISK: cfdisk /dev/WhatEverLoopDevice (Example: cfdisk /dev/loop5) (Remember, use losetup -a to see "Devices")

Examining the output of CFDISK will show the names of the individual Partitions available: /dev/WhatEverLoopDevicePx (Example: /dev/loop6p1).

With the above information garnered from CFDISK, then mount individual Partitions: mount -t WhatEverFileSystem (squashfs, ext4, ntfs-3g, etc.) /dev/WhatEverLoopDevice /mnt/WhatEverMountPoint: mount -t ext4 /dev/loop6p2 /mnt/Loop6/p2

Ongoing work with this experiment will be to attempt changing the disk layout to include an LVM volume that allows for "Volume Shadow Copy" (Volume Snapshot, etc., IE, the Linux equivalent of that Windows feature)