vzpbackup icon indicating copy to clipboard operation
vzpbackup copied to clipboard

TAR Exit Code 1

Open matrad opened this issue 10 years ago • 6 comments

Tar sometimes exit with ExitCode 1, what means that files has been changed while creating the tar-Archive.

Shouldn't we exclude the Snapshot-File in the Backup to prevent this error? Or should we ignore this EXIT Code 1?

matrad avatar Oct 16 '14 23:10 matrad

What snapshot file do you refer to? The snapshot being created during the vzpbackup run?

andreasfaerber avatar Oct 18 '14 23:10 andreasfaerber

Yes, the snapshot named root.hdd.{.....}

But I noticed also when excluding the snapshot file, then the tar Execution (sometimes) Finish with exit code 1, because some files are changed during the backup creation (root.hdd changed).

matrad avatar Oct 19 '14 09:10 matrad

[+1] to matrad, on IO-loaded containers, Snapshot-File (root,hdd.{...}) will 100% change during tar invocation, so it should be excluded from backup. Ploop's backup base idea is that we stop write in root.hdd to safely copy it, write in new Snapshot-File instead and then merge snapshot in base image.

It may be some bug in ploop's code if root.hdd really changed during tar run. I will try to check it on latest version...

evgkrsk avatar Nov 26 '14 05:11 evgkrsk

Yep, today's mail from HN stated:

tar: ./root.hdd/root.hdd.{UUID} file changed as we read it

backup seems successfull, thought.

evgkrsk avatar Dec 01 '14 02:12 evgkrsk

Hm. Having given this some more thought maybe a suspend, backup, resume might be an additional option to ensure consistency, if the standard mechanism is not sufficient. However, this would introduce some downtime of the container, which might be acceptable for services or processes which do not have direct network or end-user interaction.

Would that help in your situations? Apart from root.hdd changing when it shouldn't.

andreasfaerber avatar Jan 10 '15 08:01 andreasfaerber

Any news about this issue? How you solved this problem?

matrad avatar Dec 17 '15 09:12 matrad