Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip tar exit code 1 #209

Open
kr31n3r opened this issue May 13, 2020 · 0 comments
Open

Skip tar exit code 1 #209

kr31n3r opened this issue May 13, 2020 · 0 comments

Comments

@kr31n3r
Copy link

kr31n3r commented May 13, 2020

Environment

  • TwinDB Backup version: 2.18.3
  • Operating System: debian 9.9

Description

While trying to backup a /var/www/<SOME_FOLDER> the twindb-backup terminates early due to the following error:

ERROR: file_source.get_stream():46: Failed to read from /var/www/<SOME_FOLDER>: tar: Removing leading `/' from member names
tar: /var/www/<SOME_FOLDER>: file changed as we read it

So /var/www/<SOME_FOLDER> changed during backup and tar will return with exit code 1 as stated in man page:

RETURN VALUE
       Tar exit code indicates whether it was able to successfully perform
       the requested operation, and if not, what kind of error occurred.

       0      Successful termination.

       1      Some files differ.  If tar was invoked with the --compare
              (--diff, -d) command line option, this means that some files
              in the archive differ from their disk counterparts.  If tar
              was given one of the --create, --append or --update options,
              this exit code means that some files were changed while being
              archived and so the resulting archive does not contain the
              exact copy of the file set.

       2      Fatal error.  This means that some fatal, unrecoverable error
              occurred.

       If a subprocess that had been invoked by tar exited with a nonzero
       exit code, tar itself exits with that code as well.  This can happen,
       for example, if a compression option (e.g. -z) was used and the
       external compressor program failed.  Another example is rmt failure
       during backup to a remote device.

Suggestion

Change Line 45 in

if proc.returncode:

to only exit on proc.returncode > 1 for not stopping backing up further files/folders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant