Backing up Linux to a Windows file system for later restoration
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I need to backup / copy the files of my Linux installation to an external drive, so that I can restore them onto the new, larger disk.
The destination disk for the restoration is twice as large, and will have larger partitions, ext4
and linux-swap
. Imaging the entire disk or its first partition is not really a good option, because both require later re-partitioning I'd like to avoid.
I am backing up to an exFAT-formatted drive, there are some issues with copying an ext4 Linux installation to exFAT though
may destroy important hard links and fast* symbolic links from the
ext4
file system (will break Linux)won't preserve file ownership / permissions and
setuid
bits (will break Linux)won't preserve capabilities (will break Linux)
won't preserve files extended attributes (xattrs) as well, as I believe many files have important information there (I don't care about Unix ACLs as I don't think I have any files using them)
If I copied the files directly to NTFS, FAT32, exFAT, etc, much of this metadata would be destroyed.
I don't care about compression since the original disk is smaller than my backup drive, but (GNU) tar
seems to preserve only permissions/ownership (with -p
and extract with --same-owner
), links and xattrs, but file capability support is needed to backup modern Linux.
It seems the other main options are a CloneZilla Live system, and cpio
which seems to create tar
archives.
So the main options are
- CloneZilla or just imaging the parition
tar
itself, which may break thingscpio
, which may be limited by thetar
archive format?
*80,000 of the 83,000 symlinks are fast symlinks, and I'd like to preserve their fast-ness if possible
linux backup ext4 cpio exfat
 |Â
show 4 more comments
up vote
0
down vote
favorite
I need to backup / copy the files of my Linux installation to an external drive, so that I can restore them onto the new, larger disk.
The destination disk for the restoration is twice as large, and will have larger partitions, ext4
and linux-swap
. Imaging the entire disk or its first partition is not really a good option, because both require later re-partitioning I'd like to avoid.
I am backing up to an exFAT-formatted drive, there are some issues with copying an ext4 Linux installation to exFAT though
may destroy important hard links and fast* symbolic links from the
ext4
file system (will break Linux)won't preserve file ownership / permissions and
setuid
bits (will break Linux)won't preserve capabilities (will break Linux)
won't preserve files extended attributes (xattrs) as well, as I believe many files have important information there (I don't care about Unix ACLs as I don't think I have any files using them)
If I copied the files directly to NTFS, FAT32, exFAT, etc, much of this metadata would be destroyed.
I don't care about compression since the original disk is smaller than my backup drive, but (GNU) tar
seems to preserve only permissions/ownership (with -p
and extract with --same-owner
), links and xattrs, but file capability support is needed to backup modern Linux.
It seems the other main options are a CloneZilla Live system, and cpio
which seems to create tar
archives.
So the main options are
- CloneZilla or just imaging the parition
tar
itself, which may break thingscpio
, which may be limited by thetar
archive format?
*80,000 of the 83,000 symlinks are fast symlinks, and I'd like to preserve their fast-ness if possible
linux backup ext4 cpio exfat
this would be easier to read if you cited at least one example why you think tar is shaky! current versions support xattrs, but it looks like as of 2016 it did not support "file capabilities". bugzilla.redhat.com/show_bug.cgi?id=771927
â sourcejedi
1 hour ago
You say you cannot mount an external ext4 if you are not root. I don't understand. Why do you want to mount an external ext4, without being root? You need to be root to copy the files and set their ownership etc. correctly.
â sourcejedi
1 hour ago
If you want a nice GUI to be able to mount ext4, which will prompt forsudo
password as needed, GNOME Disks is pretty awesome. The package name should begnome-disk-utility
, in case you do not already have it installed.
â sourcejedi
1 hour ago
@sourcejedi comment #1: i found a post yesterday (can't find it now, maybe on AU) mentioning how GNU tar "may or may not" properly archive permissions / ownership but i can't find it now, but i guess the-p
and--same-owner
options do the standard Unix permissions alright
â cat
19 mins ago
@sourcejedi comment #2: the point is to have my "external USB disk for backup" formatted as ext4, so that I can directly copy my Linux system to it, and copy from it (those as root), and then also use it as a general purpose USB for other non-backup files as a regular user
â cat
17 mins ago
 |Â
show 4 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to backup / copy the files of my Linux installation to an external drive, so that I can restore them onto the new, larger disk.
The destination disk for the restoration is twice as large, and will have larger partitions, ext4
and linux-swap
. Imaging the entire disk or its first partition is not really a good option, because both require later re-partitioning I'd like to avoid.
I am backing up to an exFAT-formatted drive, there are some issues with copying an ext4 Linux installation to exFAT though
may destroy important hard links and fast* symbolic links from the
ext4
file system (will break Linux)won't preserve file ownership / permissions and
setuid
bits (will break Linux)won't preserve capabilities (will break Linux)
won't preserve files extended attributes (xattrs) as well, as I believe many files have important information there (I don't care about Unix ACLs as I don't think I have any files using them)
If I copied the files directly to NTFS, FAT32, exFAT, etc, much of this metadata would be destroyed.
I don't care about compression since the original disk is smaller than my backup drive, but (GNU) tar
seems to preserve only permissions/ownership (with -p
and extract with --same-owner
), links and xattrs, but file capability support is needed to backup modern Linux.
It seems the other main options are a CloneZilla Live system, and cpio
which seems to create tar
archives.
So the main options are
- CloneZilla or just imaging the parition
tar
itself, which may break thingscpio
, which may be limited by thetar
archive format?
*80,000 of the 83,000 symlinks are fast symlinks, and I'd like to preserve their fast-ness if possible
linux backup ext4 cpio exfat
I need to backup / copy the files of my Linux installation to an external drive, so that I can restore them onto the new, larger disk.
The destination disk for the restoration is twice as large, and will have larger partitions, ext4
and linux-swap
. Imaging the entire disk or its first partition is not really a good option, because both require later re-partitioning I'd like to avoid.
I am backing up to an exFAT-formatted drive, there are some issues with copying an ext4 Linux installation to exFAT though
may destroy important hard links and fast* symbolic links from the
ext4
file system (will break Linux)won't preserve file ownership / permissions and
setuid
bits (will break Linux)won't preserve capabilities (will break Linux)
won't preserve files extended attributes (xattrs) as well, as I believe many files have important information there (I don't care about Unix ACLs as I don't think I have any files using them)
If I copied the files directly to NTFS, FAT32, exFAT, etc, much of this metadata would be destroyed.
I don't care about compression since the original disk is smaller than my backup drive, but (GNU) tar
seems to preserve only permissions/ownership (with -p
and extract with --same-owner
), links and xattrs, but file capability support is needed to backup modern Linux.
It seems the other main options are a CloneZilla Live system, and cpio
which seems to create tar
archives.
So the main options are
- CloneZilla or just imaging the parition
tar
itself, which may break thingscpio
, which may be limited by thetar
archive format?
*80,000 of the 83,000 symlinks are fast symlinks, and I'd like to preserve their fast-ness if possible
linux backup ext4 cpio exfat
linux backup ext4 cpio exfat
edited 9 mins ago
asked 3 hours ago
cat
1,63621135
1,63621135
this would be easier to read if you cited at least one example why you think tar is shaky! current versions support xattrs, but it looks like as of 2016 it did not support "file capabilities". bugzilla.redhat.com/show_bug.cgi?id=771927
â sourcejedi
1 hour ago
You say you cannot mount an external ext4 if you are not root. I don't understand. Why do you want to mount an external ext4, without being root? You need to be root to copy the files and set their ownership etc. correctly.
â sourcejedi
1 hour ago
If you want a nice GUI to be able to mount ext4, which will prompt forsudo
password as needed, GNOME Disks is pretty awesome. The package name should begnome-disk-utility
, in case you do not already have it installed.
â sourcejedi
1 hour ago
@sourcejedi comment #1: i found a post yesterday (can't find it now, maybe on AU) mentioning how GNU tar "may or may not" properly archive permissions / ownership but i can't find it now, but i guess the-p
and--same-owner
options do the standard Unix permissions alright
â cat
19 mins ago
@sourcejedi comment #2: the point is to have my "external USB disk for backup" formatted as ext4, so that I can directly copy my Linux system to it, and copy from it (those as root), and then also use it as a general purpose USB for other non-backup files as a regular user
â cat
17 mins ago
 |Â
show 4 more comments
this would be easier to read if you cited at least one example why you think tar is shaky! current versions support xattrs, but it looks like as of 2016 it did not support "file capabilities". bugzilla.redhat.com/show_bug.cgi?id=771927
â sourcejedi
1 hour ago
You say you cannot mount an external ext4 if you are not root. I don't understand. Why do you want to mount an external ext4, without being root? You need to be root to copy the files and set their ownership etc. correctly.
â sourcejedi
1 hour ago
If you want a nice GUI to be able to mount ext4, which will prompt forsudo
password as needed, GNOME Disks is pretty awesome. The package name should begnome-disk-utility
, in case you do not already have it installed.
â sourcejedi
1 hour ago
@sourcejedi comment #1: i found a post yesterday (can't find it now, maybe on AU) mentioning how GNU tar "may or may not" properly archive permissions / ownership but i can't find it now, but i guess the-p
and--same-owner
options do the standard Unix permissions alright
â cat
19 mins ago
@sourcejedi comment #2: the point is to have my "external USB disk for backup" formatted as ext4, so that I can directly copy my Linux system to it, and copy from it (those as root), and then also use it as a general purpose USB for other non-backup files as a regular user
â cat
17 mins ago
this would be easier to read if you cited at least one example why you think tar is shaky! current versions support xattrs, but it looks like as of 2016 it did not support "file capabilities". bugzilla.redhat.com/show_bug.cgi?id=771927
â sourcejedi
1 hour ago
this would be easier to read if you cited at least one example why you think tar is shaky! current versions support xattrs, but it looks like as of 2016 it did not support "file capabilities". bugzilla.redhat.com/show_bug.cgi?id=771927
â sourcejedi
1 hour ago
You say you cannot mount an external ext4 if you are not root. I don't understand. Why do you want to mount an external ext4, without being root? You need to be root to copy the files and set their ownership etc. correctly.
â sourcejedi
1 hour ago
You say you cannot mount an external ext4 if you are not root. I don't understand. Why do you want to mount an external ext4, without being root? You need to be root to copy the files and set their ownership etc. correctly.
â sourcejedi
1 hour ago
If you want a nice GUI to be able to mount ext4, which will prompt for
sudo
password as needed, GNOME Disks is pretty awesome. The package name should be gnome-disk-utility
, in case you do not already have it installed.â sourcejedi
1 hour ago
If you want a nice GUI to be able to mount ext4, which will prompt for
sudo
password as needed, GNOME Disks is pretty awesome. The package name should be gnome-disk-utility
, in case you do not already have it installed.â sourcejedi
1 hour ago
@sourcejedi comment #1: i found a post yesterday (can't find it now, maybe on AU) mentioning how GNU tar "may or may not" properly archive permissions / ownership but i can't find it now, but i guess the
-p
and --same-owner
options do the standard Unix permissions alrightâ cat
19 mins ago
@sourcejedi comment #1: i found a post yesterday (can't find it now, maybe on AU) mentioning how GNU tar "may or may not" properly archive permissions / ownership but i can't find it now, but i guess the
-p
and --same-owner
options do the standard Unix permissions alrightâ cat
19 mins ago
@sourcejedi comment #2: the point is to have my "external USB disk for backup" formatted as ext4, so that I can directly copy my Linux system to it, and copy from it (those as root), and then also use it as a general purpose USB for other non-backup files as a regular user
â cat
17 mins ago
@sourcejedi comment #2: the point is to have my "external USB disk for backup" formatted as ext4, so that I can directly copy my Linux system to it, and copy from it (those as root), and then also use it as a general purpose USB for other non-backup files as a regular user
â cat
17 mins ago
 |Â
show 4 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
If you really want to use a general purpose storage device without reformatting it, AND it has largefile support (not FAT, but maybe exFAT, NTFS, UDF...), the simplest way to make sure it works is to use a disk image file on it.
- Create a disk image file of the same size as the source filesystem.
- Copy your files in to it.
- Boot the target system with the install environment of your choice, connect the external disk.
- Copy the files from the disk image on to the target system.
- (Do whatever magic is required to make it bootable, given your target hardware).
Steps 1/2 will actually be faster if you can use a partition imager like e2image -a
. This requires that the source filesystem not be mounted. I don't know what the status of e2image -a
is. Unfortunately partclone
(from Clonezilla) does not create mountable raw disk image files, or at least not by default.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
If you really want to use a general purpose storage device without reformatting it, AND it has largefile support (not FAT, but maybe exFAT, NTFS, UDF...), the simplest way to make sure it works is to use a disk image file on it.
- Create a disk image file of the same size as the source filesystem.
- Copy your files in to it.
- Boot the target system with the install environment of your choice, connect the external disk.
- Copy the files from the disk image on to the target system.
- (Do whatever magic is required to make it bootable, given your target hardware).
Steps 1/2 will actually be faster if you can use a partition imager like e2image -a
. This requires that the source filesystem not be mounted. I don't know what the status of e2image -a
is. Unfortunately partclone
(from Clonezilla) does not create mountable raw disk image files, or at least not by default.
add a comment |Â
up vote
0
down vote
If you really want to use a general purpose storage device without reformatting it, AND it has largefile support (not FAT, but maybe exFAT, NTFS, UDF...), the simplest way to make sure it works is to use a disk image file on it.
- Create a disk image file of the same size as the source filesystem.
- Copy your files in to it.
- Boot the target system with the install environment of your choice, connect the external disk.
- Copy the files from the disk image on to the target system.
- (Do whatever magic is required to make it bootable, given your target hardware).
Steps 1/2 will actually be faster if you can use a partition imager like e2image -a
. This requires that the source filesystem not be mounted. I don't know what the status of e2image -a
is. Unfortunately partclone
(from Clonezilla) does not create mountable raw disk image files, or at least not by default.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
If you really want to use a general purpose storage device without reformatting it, AND it has largefile support (not FAT, but maybe exFAT, NTFS, UDF...), the simplest way to make sure it works is to use a disk image file on it.
- Create a disk image file of the same size as the source filesystem.
- Copy your files in to it.
- Boot the target system with the install environment of your choice, connect the external disk.
- Copy the files from the disk image on to the target system.
- (Do whatever magic is required to make it bootable, given your target hardware).
Steps 1/2 will actually be faster if you can use a partition imager like e2image -a
. This requires that the source filesystem not be mounted. I don't know what the status of e2image -a
is. Unfortunately partclone
(from Clonezilla) does not create mountable raw disk image files, or at least not by default.
If you really want to use a general purpose storage device without reformatting it, AND it has largefile support (not FAT, but maybe exFAT, NTFS, UDF...), the simplest way to make sure it works is to use a disk image file on it.
- Create a disk image file of the same size as the source filesystem.
- Copy your files in to it.
- Boot the target system with the install environment of your choice, connect the external disk.
- Copy the files from the disk image on to the target system.
- (Do whatever magic is required to make it bootable, given your target hardware).
Steps 1/2 will actually be faster if you can use a partition imager like e2image -a
. This requires that the source filesystem not be mounted. I don't know what the status of e2image -a
is. Unfortunately partclone
(from Clonezilla) does not create mountable raw disk image files, or at least not by default.
answered 38 secs ago
sourcejedi
20.9k43089
20.9k43089
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476077%2fbacking-up-linux-to-a-windows-file-system-for-later-restoration%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
this would be easier to read if you cited at least one example why you think tar is shaky! current versions support xattrs, but it looks like as of 2016 it did not support "file capabilities". bugzilla.redhat.com/show_bug.cgi?id=771927
â sourcejedi
1 hour ago
You say you cannot mount an external ext4 if you are not root. I don't understand. Why do you want to mount an external ext4, without being root? You need to be root to copy the files and set their ownership etc. correctly.
â sourcejedi
1 hour ago
If you want a nice GUI to be able to mount ext4, which will prompt for
sudo
password as needed, GNOME Disks is pretty awesome. The package name should begnome-disk-utility
, in case you do not already have it installed.â sourcejedi
1 hour ago
@sourcejedi comment #1: i found a post yesterday (can't find it now, maybe on AU) mentioning how GNU tar "may or may not" properly archive permissions / ownership but i can't find it now, but i guess the
-p
and--same-owner
options do the standard Unix permissions alrightâ cat
19 mins ago
@sourcejedi comment #2: the point is to have my "external USB disk for backup" formatted as ext4, so that I can directly copy my Linux system to it, and copy from it (those as root), and then also use it as a general purpose USB for other non-backup files as a regular user
â cat
17 mins ago