[Borgbackup] What don't you like about Borg?
Marian Beermann
public at enkore.de
Thu Oct 20 08:04:47 EDT 2016
On 20.10.2016 13:59, heiko.helmle at horiba.com wrote:
>
> "Borgbackup" <borgbackup-bounces+heiko.helmle=horiba.com at python.org>
> wrote on 20.10.2016 13:57:10:
>
>> From: Marian Beermann <public at enkore.de>
>> To: borgbackup at python.org
>> Date: 20.10.2016 13:57
>> Subject: Re: [Borgbackup] What don't you like about Borg?
>> Sent by: "Borgbackup"
> <borgbackup-bounces+heiko.helmle=horiba.com at python.org>
>>
>> There is something for changed files, iirc it has been improved since
>> 1.0.x. It looks like this in 1.0.x:
>>
>
> That's not what I meant. TAR brings a warning if the file changed
> _during_ backup.
>
> If another process writes to a file during backup the backupped file is
> probably corrupt. That's why tar gives a warning in that case.
That would be very useful indeed.
I looked up how tar does it:
if ((timespec_cmp (get_stat_ctime (&final_stat), original_ctime) != 0
/* Original ctime will change if the file is a directory and
--remove-files is given */
&& !(remove_files_option && is_dir))
|| original_size < final_stat.st_size)
{
WARNOPT (WARN_FILE_CHANGED,
(0, 0, _("%s: file changed as we read it"),
quotearg_colon (p)));
set_exit_status (TAREXIT_DIFFERS);
}
It stores the ctime before reading the file and then compares it after
it is done with a file. This works on *nix, since the c(hange)time is
always updated and can't be changed by user space processes.
Cheers, Marian
More information about the Borgbackup
mailing list