Kopia file activity while in iddle or not tasks running

I use a timer (after 15 mins on idle) to spun-down my drive so is only activated once a day when the backups happens.
But for some reason Kopia do writes/reads to the disks when there are no tasks programmed.

Is there a way to stop this behavior?

** Disk 3 **
Feb 06 22:57:12 OPEN => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f
Feb 06 22:57:12 OPEN => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f
Feb 06 22:57:12 OPEN => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f
Feb 06 22:57:12 CREATE => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f.tmp.d55fd9ac031bc7db
Feb 06 22:57:12 OPEN => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f.tmp.d55fd9ac031bc7db
Feb 06 22:57:12 ATTRIB => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f.tmp.d55fd9ac031bc7db
Feb 06 22:57:12 MODIFY => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f.tmp.d55fd9ac031bc7db
Feb 06 22:57:12 MOVED_FROM => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f.tmp.d55fd9ac031bc7db
Feb 06 22:57:12 MOVED_TO => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f
Feb 06 22:57:12 OPEN => /mnt/disk3/Backup/Kopia/Unraid/kopia.maintenance.f

I presume you use kopia server? There’s currently no way to disable maintenance that runs in server, but that would not be the only source of idle traffic, due to how the server is currently implemented.

To have full control of when reads/writes happen, I suggest using kopia snapshot create --all from a cron job and not using server for that purpose. You will lose the native kopia scheduling mechanism, though.

I personally use crontab to schedule backups on my main NAS:

40 * * * * /usr/bin/kopia content verify --log-level=warning
22,43 * * * * /usr/bin/kopia snapshot create --all --log-level=warning --no-progress
11,30 * * * * /usr/bin/kopia --config-file ~/.config/kopia/repository2.config snapshot create --all --log-level=warning --no-progress
1 Like

I use it on docker I guess I can’t do that.
Maybe I will schedule docker start/stop tasks.

Anyway If this could be avoided by a “fix” it would be nice

Question, shouldn’t you also have a kopia maintenance run as well?

Maintenance will run automatically at the end of kopia snapshot when it’s due.

1 Like

I created a PR to improve the docs for snapshot create to mention maintenance. I would like to add to “getting started” docs a suitable crontab example with some description. Would a PR for that be acceptable?

E.g., (unless the content verify can be run simultaneously with snapshot create in which case two lines like you have would be most appropriate?)

40 * * * * /usr/bin/kopia content verify --log-level=warning && /usr/bin/kopia snapshot create --all --log-level=warning --no-progress

PRs to improve docs are always welecome. I don’t think you need to run kopia content verify all the time - regular maintenance does it automatically since it walks all contents anyway.