You are not logged in.

#1 2014-08-31 11:11:06

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

Backup of a system of various file-system types to an USB HDD

I have just finished installing Arch onto my SSD.  My system use several partitions of various file systems: vfat on /boot, btrfs on /, ext4 on /home, reiserfs on /var.  I plan to do a periodic backup of the whole system to an USB HDD, say using rsync.  I wonder if format the whole USB HDD to just one file system, say ext4, will be fine, regarding the various file-system types of the system.  Do I need to do file-system conversion?  If so, is the conversion usually reliable?  How about later recovering from the backup, that is, transferring files on a ext4 USB HDD to my SSD with several partitions of various file systems?  If the situation is rather complicated to handle, what is your recommendation?  Thanks.

Offline

#2 2014-08-31 13:05:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,621
Website

Re: Backup of a system of various file-system types to an USB HDD

You shouldn't need to do anything special as you will be mounting the source partitions manually or via a script.  Rsync doesn't care about that.  Just know that you will not be backing-up the meta data from the btrfs partition.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2014-08-31 14:08:43

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

Re: Backup of a system of various file-system types to an USB HDD

Thanks for the answer.  Losing metadata sounds not good.  Is there a way to avoid that?

Offline

#4 2014-08-31 14:09:40

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,621
Website

Re: Backup of a system of various file-system types to an USB HDD

I don't believe so.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2014-08-31 17:43:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Backup of a system of various file-system types to an USB HDD

reflectionalist wrote:

Losing metadata sounds not good.

What exactly are you worried about?

Offline

#6 2014-08-31 20:27:13

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

Re: Backup of a system of various file-system types to an USB HDD

karol wrote:

What exactly are you worried about?

Ah, like ownership, permission, modification time, etc.  Wait, but rsync is supposed to preserve these.  Hmm, then I am confused what metadata @graysky meant.

Offline

#7 2014-08-31 21:14:46

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,621
Website

Re: Backup of a system of various file-system types to an USB HDD

You are confused.  In the case of btrfs, the meta data are very different.  Yes, ext4 support all Unix permissions, ownership, times, etc.  Just invoke it with the -a switch.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2014-08-31 21:45:31

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Backup of a system of various file-system types to an USB HDD

reflectionalist wrote:

I wonder if format the whole USB HDD to just one file system, say ext4, will be fine, regarding the various file-system types of the system.  Do I need to do file-system conversion?  If so, is the conversion usually reliable?  How about later recovering from the backup, that is, transferring files on a ext4 USB HDD to my SSD with several partitions of various file systems?  If the situation is rather complicated to handle, what is your recommendation?

rsync(1) is a _filesystem_ level tool, i.e. it copies files (optionally preserving permissions), so the FS type on the backup medium shouldn't matter as long as it supports all the usual UNIX permissions and Linux file capabilities. For example, don't use NTFS, but ext4 is OK.

Of course, if you have some complex btrfs snapshot/subvolume hierarchy on the host (or a specially configured ext4 superblock), and want to preserve this , then rsync(1) is not sufficient. You'll need a tool that operates below the FS level, like dd(1).

Having said that, I personally think that making full system backups is stupid, especially on frequently updated distro like Arch. Why would you want to backup files which you can get from a mirror anyway? Instead, backup only the relevant configuration files from /etc, userdata from /home, and mailspools in /var/spool/mail. In a event of a disaster, just reinstall and copy configs back...


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB