Is it safe to run a full system backup with tar on an ext4 filesystem?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I'd like to make a backup of a live system, I'm running the command tar -cvpzf backup-latest.tar.gz --exclude=/backup-latest.tar.gz --one-file-system /



But I just got an error of: tar: /: file changed as we read it - I'm unsure if it's dropped any files or the backup succeeded.



I'm not too concerned about file permissions - just the file data most importantly.







share|improve this question

















  • 1




    --one-file-system is designed to skip things. (for example, a /dev populated with static device nodes would be skipped, in some cases this is still required for successful booting). For a full backup of the rootfs, you can mount --bind / /mnt/root then backup /mnt/root instead of /.
    – frostschutz
    Jun 22 at 13:26















up vote
1
down vote

favorite












I'd like to make a backup of a live system, I'm running the command tar -cvpzf backup-latest.tar.gz --exclude=/backup-latest.tar.gz --one-file-system /



But I just got an error of: tar: /: file changed as we read it - I'm unsure if it's dropped any files or the backup succeeded.



I'm not too concerned about file permissions - just the file data most importantly.







share|improve this question

















  • 1




    --one-file-system is designed to skip things. (for example, a /dev populated with static device nodes would be skipped, in some cases this is still required for successful booting). For a full backup of the rootfs, you can mount --bind / /mnt/root then backup /mnt/root instead of /.
    – frostschutz
    Jun 22 at 13:26













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'd like to make a backup of a live system, I'm running the command tar -cvpzf backup-latest.tar.gz --exclude=/backup-latest.tar.gz --one-file-system /



But I just got an error of: tar: /: file changed as we read it - I'm unsure if it's dropped any files or the backup succeeded.



I'm not too concerned about file permissions - just the file data most importantly.







share|improve this question













I'd like to make a backup of a live system, I'm running the command tar -cvpzf backup-latest.tar.gz --exclude=/backup-latest.tar.gz --one-file-system /



But I just got an error of: tar: /: file changed as we read it - I'm unsure if it's dropped any files or the backup succeeded.



I'm not too concerned about file permissions - just the file data most importantly.









share|improve this question












share|improve this question




share|improve this question








edited Jun 23 at 9:59
























asked Jun 22 at 11:55









Chris Stryczynski

383116




383116







  • 1




    --one-file-system is designed to skip things. (for example, a /dev populated with static device nodes would be skipped, in some cases this is still required for successful booting). For a full backup of the rootfs, you can mount --bind / /mnt/root then backup /mnt/root instead of /.
    – frostschutz
    Jun 22 at 13:26













  • 1




    --one-file-system is designed to skip things. (for example, a /dev populated with static device nodes would be skipped, in some cases this is still required for successful booting). For a full backup of the rootfs, you can mount --bind / /mnt/root then backup /mnt/root instead of /.
    – frostschutz
    Jun 22 at 13:26








1




1




--one-file-system is designed to skip things. (for example, a /dev populated with static device nodes would be skipped, in some cases this is still required for successful booting). For a full backup of the rootfs, you can mount --bind / /mnt/root then backup /mnt/root instead of /.
– frostschutz
Jun 22 at 13:26





--one-file-system is designed to skip things. (for example, a /dev populated with static device nodes would be skipped, in some cases this is still required for successful booting). For a full backup of the rootfs, you can mount --bind / /mnt/root then backup /mnt/root instead of /.
– frostschutz
Jun 22 at 13:26











2 Answers
2






active

oldest

votes

















up vote
2
down vote













  • It is not safe to do this on a life filesystem, better create a snapshot before you backup the data. How a snapshot is created and whether it is supported depends on the filesystem type, so I cannot give you an advise since you did not mention the filesystem you are using.


  • From your command line arguments, it seems that you use gtar. This tar implementation sometimes has problems in reading it's own archives...so be careful to verify the archive you created for readability.


  • Note that the command line you use does not allow you to archive more than the basic meta data and only archives time stamps with a one second granularity.


  • Meta data that would be missing is: ACLs, extended attributes, ...


  • A POSIX.1-1988 tar archive is able to archive directories, files, hard links, symlinks, block special, character special, named pipes. The fact that it cannot archive sockets is not a problem. So tar in general is not a problem.






share|improve this answer



















  • 1




    Also, special files (device nodes, sockets, named pipes etc.) might not get properly stored, AFAIK. And hard links...
    – Kusalananda
    Jun 22 at 12:37







  • 1




    Before 1988, this has been a problem with the tar format
    – schily
    Jun 22 at 12:49

















up vote
0
down vote













Seems, like and awful old school way of making a backup. Is this a real server and not a VM? If it's a VM, VEEAm comes to mind as does ghetto backup. If it's a real server what file system are you using brts uses snapshots as does lvm. Since your doing a tar, maybe you can rsync your data to another box? I hope these ideas help.






share|improve this answer





















  • No, "old school" would be to use dump. Using tar to make a full system backup is just showing that they are not aware of proper backup software.
    – Kusalananda
    Jun 23 at 10:31










  • Using dump is indeed old school as it shows that somebody does not yet know that star is able to to the same as dump in a filesystem and OS independend way since 14 years, but faster than dump.
    – schily
    Jun 24 at 7:38











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451287%2fis-it-safe-to-run-a-full-system-backup-with-tar-on-an-ext4-filesystem%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













  • It is not safe to do this on a life filesystem, better create a snapshot before you backup the data. How a snapshot is created and whether it is supported depends on the filesystem type, so I cannot give you an advise since you did not mention the filesystem you are using.


  • From your command line arguments, it seems that you use gtar. This tar implementation sometimes has problems in reading it's own archives...so be careful to verify the archive you created for readability.


  • Note that the command line you use does not allow you to archive more than the basic meta data and only archives time stamps with a one second granularity.


  • Meta data that would be missing is: ACLs, extended attributes, ...


  • A POSIX.1-1988 tar archive is able to archive directories, files, hard links, symlinks, block special, character special, named pipes. The fact that it cannot archive sockets is not a problem. So tar in general is not a problem.






share|improve this answer



















  • 1




    Also, special files (device nodes, sockets, named pipes etc.) might not get properly stored, AFAIK. And hard links...
    – Kusalananda
    Jun 22 at 12:37







  • 1




    Before 1988, this has been a problem with the tar format
    – schily
    Jun 22 at 12:49














up vote
2
down vote













  • It is not safe to do this on a life filesystem, better create a snapshot before you backup the data. How a snapshot is created and whether it is supported depends on the filesystem type, so I cannot give you an advise since you did not mention the filesystem you are using.


  • From your command line arguments, it seems that you use gtar. This tar implementation sometimes has problems in reading it's own archives...so be careful to verify the archive you created for readability.


  • Note that the command line you use does not allow you to archive more than the basic meta data and only archives time stamps with a one second granularity.


  • Meta data that would be missing is: ACLs, extended attributes, ...


  • A POSIX.1-1988 tar archive is able to archive directories, files, hard links, symlinks, block special, character special, named pipes. The fact that it cannot archive sockets is not a problem. So tar in general is not a problem.






share|improve this answer



















  • 1




    Also, special files (device nodes, sockets, named pipes etc.) might not get properly stored, AFAIK. And hard links...
    – Kusalananda
    Jun 22 at 12:37







  • 1




    Before 1988, this has been a problem with the tar format
    – schily
    Jun 22 at 12:49












up vote
2
down vote










up vote
2
down vote









  • It is not safe to do this on a life filesystem, better create a snapshot before you backup the data. How a snapshot is created and whether it is supported depends on the filesystem type, so I cannot give you an advise since you did not mention the filesystem you are using.


  • From your command line arguments, it seems that you use gtar. This tar implementation sometimes has problems in reading it's own archives...so be careful to verify the archive you created for readability.


  • Note that the command line you use does not allow you to archive more than the basic meta data and only archives time stamps with a one second granularity.


  • Meta data that would be missing is: ACLs, extended attributes, ...


  • A POSIX.1-1988 tar archive is able to archive directories, files, hard links, symlinks, block special, character special, named pipes. The fact that it cannot archive sockets is not a problem. So tar in general is not a problem.






share|improve this answer















  • It is not safe to do this on a life filesystem, better create a snapshot before you backup the data. How a snapshot is created and whether it is supported depends on the filesystem type, so I cannot give you an advise since you did not mention the filesystem you are using.


  • From your command line arguments, it seems that you use gtar. This tar implementation sometimes has problems in reading it's own archives...so be careful to verify the archive you created for readability.


  • Note that the command line you use does not allow you to archive more than the basic meta data and only archives time stamps with a one second granularity.


  • Meta data that would be missing is: ACLs, extended attributes, ...


  • A POSIX.1-1988 tar archive is able to archive directories, files, hard links, symlinks, block special, character special, named pipes. The fact that it cannot archive sockets is not a problem. So tar in general is not a problem.







share|improve this answer















share|improve this answer



share|improve this answer








edited Jun 22 at 12:47


























answered Jun 22 at 12:33









schily

8,57221435




8,57221435







  • 1




    Also, special files (device nodes, sockets, named pipes etc.) might not get properly stored, AFAIK. And hard links...
    – Kusalananda
    Jun 22 at 12:37







  • 1




    Before 1988, this has been a problem with the tar format
    – schily
    Jun 22 at 12:49












  • 1




    Also, special files (device nodes, sockets, named pipes etc.) might not get properly stored, AFAIK. And hard links...
    – Kusalananda
    Jun 22 at 12:37







  • 1




    Before 1988, this has been a problem with the tar format
    – schily
    Jun 22 at 12:49







1




1




Also, special files (device nodes, sockets, named pipes etc.) might not get properly stored, AFAIK. And hard links...
– Kusalananda
Jun 22 at 12:37





Also, special files (device nodes, sockets, named pipes etc.) might not get properly stored, AFAIK. And hard links...
– Kusalananda
Jun 22 at 12:37





1




1




Before 1988, this has been a problem with the tar format
– schily
Jun 22 at 12:49




Before 1988, this has been a problem with the tar format
– schily
Jun 22 at 12:49












up vote
0
down vote













Seems, like and awful old school way of making a backup. Is this a real server and not a VM? If it's a VM, VEEAm comes to mind as does ghetto backup. If it's a real server what file system are you using brts uses snapshots as does lvm. Since your doing a tar, maybe you can rsync your data to another box? I hope these ideas help.






share|improve this answer





















  • No, "old school" would be to use dump. Using tar to make a full system backup is just showing that they are not aware of proper backup software.
    – Kusalananda
    Jun 23 at 10:31










  • Using dump is indeed old school as it shows that somebody does not yet know that star is able to to the same as dump in a filesystem and OS independend way since 14 years, but faster than dump.
    – schily
    Jun 24 at 7:38















up vote
0
down vote













Seems, like and awful old school way of making a backup. Is this a real server and not a VM? If it's a VM, VEEAm comes to mind as does ghetto backup. If it's a real server what file system are you using brts uses snapshots as does lvm. Since your doing a tar, maybe you can rsync your data to another box? I hope these ideas help.






share|improve this answer





















  • No, "old school" would be to use dump. Using tar to make a full system backup is just showing that they are not aware of proper backup software.
    – Kusalananda
    Jun 23 at 10:31










  • Using dump is indeed old school as it shows that somebody does not yet know that star is able to to the same as dump in a filesystem and OS independend way since 14 years, but faster than dump.
    – schily
    Jun 24 at 7:38













up vote
0
down vote










up vote
0
down vote









Seems, like and awful old school way of making a backup. Is this a real server and not a VM? If it's a VM, VEEAm comes to mind as does ghetto backup. If it's a real server what file system are you using brts uses snapshots as does lvm. Since your doing a tar, maybe you can rsync your data to another box? I hope these ideas help.






share|improve this answer













Seems, like and awful old school way of making a backup. Is this a real server and not a VM? If it's a VM, VEEAm comes to mind as does ghetto backup. If it's a real server what file system are you using brts uses snapshots as does lvm. Since your doing a tar, maybe you can rsync your data to another box? I hope these ideas help.







share|improve this answer













share|improve this answer



share|improve this answer











answered Jun 22 at 18:29









Mark Scheck

13




13











  • No, "old school" would be to use dump. Using tar to make a full system backup is just showing that they are not aware of proper backup software.
    – Kusalananda
    Jun 23 at 10:31










  • Using dump is indeed old school as it shows that somebody does not yet know that star is able to to the same as dump in a filesystem and OS independend way since 14 years, but faster than dump.
    – schily
    Jun 24 at 7:38

















  • No, "old school" would be to use dump. Using tar to make a full system backup is just showing that they are not aware of proper backup software.
    – Kusalananda
    Jun 23 at 10:31










  • Using dump is indeed old school as it shows that somebody does not yet know that star is able to to the same as dump in a filesystem and OS independend way since 14 years, but faster than dump.
    – schily
    Jun 24 at 7:38
















No, "old school" would be to use dump. Using tar to make a full system backup is just showing that they are not aware of proper backup software.
– Kusalananda
Jun 23 at 10:31




No, "old school" would be to use dump. Using tar to make a full system backup is just showing that they are not aware of proper backup software.
– Kusalananda
Jun 23 at 10:31












Using dump is indeed old school as it shows that somebody does not yet know that star is able to to the same as dump in a filesystem and OS independend way since 14 years, but faster than dump.
– schily
Jun 24 at 7:38





Using dump is indeed old school as it shows that somebody does not yet know that star is able to to the same as dump in a filesystem and OS independend way since 14 years, but faster than dump.
– schily
Jun 24 at 7:38













 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451287%2fis-it-safe-to-run-a-full-system-backup-with-tar-on-an-ext4-filesystem%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)