Skip to content

Allow 'list' while backup is in progress #110

@fukawi2

Description

@fukawi2

I've written a script to monitor the last archive timestamp (eg, with Nagios etc): https://github.com/fukawi2/check_attic

Unfortunately it looks like attic takes a lock on the file config when running list -- this means my script can't succeed within timeout periods while a backup is in progress, and I get text messages every 3 hours ;)

Here's the strace from attic list while attic create is in progress:

open("/mnt/bup/mail.attic/config", O_RDWR) = 4
ioctl(4, FIOCLEX)                       = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=148, ...}) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffee168fc0) = -1 ENOTTY (Inappropriate ioctl for device)
fstat(4, {st_mode=S_IFREG|0644, st_size=148, ...}) = 0
lseek(4, 0, SEEK_CUR)                   = 0
brk(0xb5d000)                           = 0xb5d000
lseek(4, 0, SEEK_CUR)                   = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffee168f10) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(4, 0, SEEK_CUR)                   = 0
fcntl(4, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}^C

Can we perhaps not lock files if we're performing a read-only operation (like list)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions