I
I
Ivan Sergeev2017-05-12 22:40:38
linux
Ivan Sergeev, 2017-05-12 22:40:38

How to dynamically exclude files that cause an error when creating an archive?

Good evening!
Can anyone tell me if it is possible to dynamically exclude files from it at the time of creating the archive, which will lead to the creation of a "broken" archive?
As an example - creating a backup of site files, after archiving tar by cron, an error comes to the mail
: tar: path/to/file/: Can't translate pathname 'path/to/file/' to UTF-8
The archive is saved, but after, when unzipping, displays unexpected end of archive
How can you avoid files that cause such "breakdowns"? Tracking manually and checking with each backup is not an option, because. the script can be used on many sites and should handle such situations without external intervention.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Smithson, 2019-09-04
@ivan3008

I'm probably on time, but still :)
--format gnutar set when calling the container and there will be no problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question