I am currently trying out a new server setup on a VirtualBox VM. In my scenario I have attached two (virtual) hard drives; I use one as the main system disk and the other one as a local backup drive. The backups are performed with borg/borgmatic to the backup drive. I plan to use the same setup later on the real server (with real disks).
In order to test a scenario where I lose the system disk and try to get the data on the backup system, I created a new virtual machine with a new system disk and attached the existing disk to the VM. fdisk -l
will display the existing drive as /dev/sdb1
.
When I mount this drive with mount /dev/sdb1 /backup
, I don't see the contents previously on the drive and so far I have not figured out a way to access them.
When mounted, the result of file -s /dev/sdb1
is:
Linux rev 1.0 ext4 filesystem data, UUID=[...], volume name "disk2" (needs journal recovery) (extents) (64bit) (large files) (huge files)
So I do:
$ umount /backup
$ e2fsck -p /dev/sdb1
disk2: clean 11/1310720 files, 126322/5242624 blocks
(I need to unmount first to be able to run e2fsck
)
After that I get
Linux rev 1.0 ext4 filesystem data, UUID=[...], volume name "disk2" (extents) (64bit) (large files) (huge files)
However, when I mount the drive again, I still get the (needs journal recovery) remark with file -s
.
If I want to restore the data from the backup drive, I naturally need to access its contents. Is there a way to do this?