My Fedora system recently crashes with strange error messages, so I am worried that my ~5 years old SSD is failing.
Now I want to rescue my data from this SSD and reinstall Fedora from scratch on a new SSD.
I created a bootable Fedora USB flash drive and booted it without mounting the failing SSD. Now I want to rescue the data from this SSD onto an external 8TB HDD (~4TB free space). The SSD has a capacity of 1TB, but only ~250 GB are actually used.
I think ddrescue is a good option for that?
How can I use ddrescue? I want to get my data and the logfile in a new folder on the 8TB external HDD. I don't want to overwrite any data.
I don't know which file system my external HDD uses. I don't know the filesystems used by the partitions of my failing SSD (on which Fedora is installed).
So in my case I can run this command:
sudo ddrescue -n /dev/nvme0n1 /run/media/liveuser/Elements/Backup/backup.img /run/media/liveuser/Elements/Backup/log.log
If nvme0n1 is the SSD from which I want to save the data and /run/media/liveuser/Elements/Backup/
is the folder where I want to store the backup and the logfile?
Should I use the --sparse option? What are the pros and cons? Should I allocate 1TB for backup.img via truncate? What are the pros and cons? How large will backup.img be? ~250GB or 1TB?
ChatGPT tells me that I don't need to use truncate and that the backup.img will be approximately 250GB large. However, Gemini strongly recommends using truncate and tells me that the file will take approximately 1TB even without truncate and that the only way to get it to ~250GB is using the --sparse option. Which one is true?
Should I use options such as -f or -n? What do these options do?