1

I'm now using Ubuntu 10.04 with ext4 and for the second time in my life I experienced data loss (not for real: I got backups) and I'm assuming problems with the recent ext4 fs.

I want to restore all of my configurations (/etc and the like), data and home on reiserFS: is this possible? What to do in order to accomplish that?

(Of course I'll be more than happy if it's possible to just migrate from one filesystem to another...)

dag729
  • 1,964

3 Answers3

4

Well, it depends on how the backup is stored...

If it's stored as a compressed archive of files, then it's filesystem independent, and should be able to be restored on any filesystem by simply extracting the archive.

If it's an image of the partition (created by something like dd if=/dev/sda1 of=mybackup.img) then you can't. But you should be able to restore to ext4 and then copy over to another reiserFS partition...

If it's another method, it's likely there's a way, but the exact procedure depends on the storage method...

ircmaxell
  • 166
2

In essence, block level backups (like dd) store filesystem information and can't be restored to a different filesystem.

File level backups (like tar) only store the files and can be restored on to any filesystem.

If you're restoring an OS, you need to make sure the OS and Bootloader can boot off of the new filesystem.

matpie
  • 1,650
0

You mentioned a migration from ext4 to RaiserFS; my answer is intended to be more general though.

Like others answers state, you can restore file-based backup to another filesystem. Usually.

What hasn't been said yet is: each filesystem has its own limitations, that's why there are scenarios when you may not be able to restore all the files, directories or their metadata.

This may be because the target filesystem:

  • is case insensitive (imagine you had file.txt and File.txt in the same directory);
  • doesn't allow certain characters in filenames;
  • specifies maximal filename length (and the limit is not big enough for you);
  • specifies maximal path length (and the limit…);
  • specifies maximal file size;
  • specifies maximal number of files (and/or subdirectories) in a directory, or maximal total number;
  • specifies maximal volume size (imagine you cannot create large enough filesystem to store all your data);
  • reserves few names for internal use (like $Bitmap in NTFS, imagine you need to restore a regular file with this name);
  • doesn't support:
    • ownership (or does it in a different way, so there's no simple translation),
    • permissions (or does it in a different way, so…), ACLs,
    • timestamps,
    • extended attributes, alternate data streams, etc.,
    • hardlinks, directory hardlinks, symbolic links,
    • sparse files.