USB and backups
Yesterday I have a problem with restoring some data from a USB drive. Flash drive was not recognised as default in Windows and other Unix systems by default. Below is a short note that can be useful while dealing with similar problems.
Locate flash drive
ls /dev/disk/by-id
To back up your flash drive to an image file compressed with ZIP in a single command, use
sudo dd if=/dev/disk/by-id/YOUR_FLASH_DRIVE status=progress | gzip -c > /home/USERNAME/backups/BACKUP_NAME.img.gz
To restore the backup, you’ll have to reverse the two commands’ sequence and define your flash drive as the output device
sudo gzip -c /home/USERNAME/backups/BACKUP_NAME.img.gz | sudo dd of=/dev/disk/by-id/YOUR_FLASH_DRIVE status=progress
My site is free of ads and trackers. Was this post helpful to you? Why not
Disqus is great for comments/feedback but I had no idea it came with these gaudy ads.