On Tue, Mar 22, 2022 at 8:52 AM Tomas Kuchta <tomas.kuchta.li...@gmail.com>
wrote:

> On Tue, Mar 22, 2022, 09:16 Rich Shepard <rshep...@appl-ecosys.com> wrote:
>
> > Last night's incremental backup for /home has an error:
> > Rsync-Errors
> (/media/backup/salmo-home/20220322-0030/tree/../rsync_error):
> > =========================================================================
> > RSYNC_ERR:
> > RSYNC_ERR:
> > RSYNC_ERR:        *** Execution cycle 0 ***
> > RSYNC_ERR:
> > RSYNC_ERR:        file has vanished:
> > "/home/rshepard/.spamassassin/bayes.lock"
> > RSYNC_ERR:        rsync warning: some files vanished before they could be
> > transferred (code 24) at main.c(1189) [sender=3.1.3]
> >
> > I want to understand this error.
> >
> > Looks to me that the bayes.lock is created when a new email message
> arrives
> > and is removed when spamassassin has processed the message. If that's the
> > case why would rsync be looking for a file that was removed?
> > .
>
>
> There is delay between a) when rsync collecting what needs to transfer and
> b) the actual transfer. Files changed between a) and b), that is what is
> happening.
>
> You could avoid it by 1) not writing/deleting stuff on the disk when your
> backup is in progress or 2) by making filesystem snapshot and backing up
> the snapshot. 1) is probably not practical. 2) would require filesystem
> change to COW filesystem such as btrfs on Linux or zfs on BSD. Common
> practice is to live with the errors or 2).
>
> Best, Tomas
>

Additional options,

3) exclude files/folders that don't need to be ( or should not be ) backed
up, e.g. lock files.
4) shut down processes before making backups ( variation of #1 )
5) run things in a VM/container, snapshot the VM/container, and backup from
the snapshot ( or save the entire snapshot ).

As for filesystems, IIRC, LVM allows for snapshotting.  I haven't played
with that in a while ( haven't had a need ), so I'm fuzzy on remembering
the details.  Also, I believe ZFS is available for Linux.  I haven't tried
it on Linux, so can't speak to how well it works compared to its
implementation on BSD.

One last thought: I remember years ago chatting with a veteran sysadmin (
before DevOps became a thing ) who said "I don't give a rats about your
backup.  When was the last time you tested a restore?" ( paraphrased, as
his word choice was a bit more colorful. )

Good luck and let us know how things go.

Regards,
- Robert

Reply via email to