# Automating Backups to Multiple Repos (SMB & B2) & Policy Questions - New User

**URL:** <https://kopia.discourse.group/t/automating-backups-to-multiple-repos-smb-b2-policy-questions-new-user/3904>\
**Category:** Support\
**Created:** [April 26, 2025, 7:13pm UTC](https://kopia.discourse.group/t/automating-backups-to-multiple-repos-smb-b2-policy-questions-new-user/3904 "2025-04-26T19:13:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![97b4958b055b](https://avatars.discourse-cdn.com/v4/letter/9/47e85d/32.png) [@97b4958b055b](https://kopia.discourse.group/u/97b4958b055b)\
**Post date:** [April 27, 2025, 3:59pm UTC](https://kopia.discourse.group/t/automating-backups-to-multiple-repos-smb-b2-policy-questions-new-user/3904/2 "2025-04-27T15:59:07Z")

</div>

First things first: I’m still working out, around the _numerous_ rough edges of this software before I begin full shake down & burn in tests but these questions are pretty basic though quite important when trying to get oriented. I’ve already set similar confs up so:

1. SOP would be to keep all repos connected unless there’s a specific need to disconnect (eg: failed drive on target). You can specify which repo to run a snapshot against via `kopia snapshot --path="$path" --config-file="$HOME/.config/kopia/repository-N.config"`
2. Use `systemd-timers` for server/desktop. Cron is going to eventually be phased out as SystemD is more mainstream than ever on mainline distros. It looks to instead be regulated more & more to embedded Linux. For SystemD you might want to give [timertab](https://github.com/amlamarra/timertab) a punt.
  - There’s a Kopia policy you can set to regulate snapshot frequency. Eg: `--snapshot-interval="10m"`
    - `--ignore-identical-snapshots="true"` (should) ensure you’re not making needless writes of metadata for identical snapshots.

  - You’ll have to write your own _pre_ & _post_ actions shell scripts.
    - Kopia Actions support [`bash` arguments](https://linuxconfig.org/how-to-pass-arguments-in-bash-script) so you can save considerable effort when having to use the same script for multiple repos. I won’t write an action-related sh without them.
      - Keep it all in git before publishing for deployment. You’ll thank yourself later.
        - Highly recommended: set up [powerline-go](https://github.com/justjanne/powerline-go); it really helps navigating git repos & makes statuses/dirs much more readable
          - Set up [zoxide](https://github.com/ajeetdsouza/zoxide); `cd $path` is a waste of time, keystrokes.

      - `#!/usr/bin/env bash` for portability; `#!/bin/bash` for [heightened security](https://www.baeldung.com/linux/bash-shebang-lines#comparison)
      - `exit 0` for success; `exit 1` for fail/error. That’s needed to ensure _[must succeed](https://kopia.io/docs/advanced/actions/#configuring-actions)._
      - Set up [ShellCheck](https://linuxconfig.org/how-to-improve-and-debug-your-shell-scripts-with-shellcheck)

3. Kopia UI is merely [Kopia CLI with a Electron wrapper](https://github.com/kopia/kopia/blob/master/BUILD.md). Note it does not seem to refresh when making changes via the CLI unless you relaunch Kopia UI.
  - Once global policies are applied they are to apply to any child repos (via 'inherit`). That can be toggled per-repo if needed (supposedly).
    - Be sure to give a quick read of my thread of [a related issue](https://kopia.discourse.group/t/bug-v0-19-0-cli-appimage-global-policies-not-applied/3900).
    - You may want to check what sort of files you are going to back up. There’s no sense compressing what’s already compressed. See below.

  - If you want full access to Kopia’s advertised capabilities you’ll need the CLI. The GUI does not have feature parity.

4. If you have the option for a ZFS file system _**[do it](https://kopia.discourse.group/t/best-practices-relative-to-reliability-checks-lately/3871/13)**_. Otherwise trial [BTRFS starting with blake2b](https://wiki.tnonline.net/w/Btrfs/Checksum_Algorithms) until you find an acceptable perf v hash rate.

Never update Kopia in situ, in production. I’ve read there’s been at least one repo breaking change (IIRC) but cannot recall the source ATM. Regardless be sure _every_ endpoint has its ‘auto-update’ file removed (`rm $HOME/.config/kopia/*.update-info.json`). I block it from communicating to any Google (which hosts most golang packages which [Kopia itself is programmed in](https://pkg.go.dev/github.com/kopia/kopia)) & GitHub ASN in the firewall to help as extra insurance.

Keep a separate browser up for [the docs](https://kopia.io/docs) & keep a log while confirming your changes while testing, [bench marking](https://kopia.io/docs/reference/command-line/common/), confirming, reproducing, deploying. Be sure to document/cite your sources.

Be prepared for [unexpected behavior](https://kopia.discourse.group/t/bug-v0-19-0-cli-gui-appimage-repository-config-over-writes-without-warning/3899)/[nasty surprises](https://kopia.discourse.group/t/disk-full-snapshot-delete-not-possible/1759/3). You’re dealing with software from macbook toting, ‘cloud native,’ ‘developers’ that [have never considered any other end-user’s perspective](https://kopia.discourse.group/t/please-read-dont-use-safety-none-for-routine-maintenance/1199/36).

> [@\[Mac, Linux, Win\] Policies: Never Compress Extension List (750+)](https://kopia.discourse.group/t/mac-linux-win-policies-never-compress-extension-list-750/3895/4):
>
> 868 on this one. It seems .tar is only a collated file so it was removed. It needs to be passed with -a or --auto-compress to be compressed at the time of creation. tar.gz, .tar.bz2 & such variants should be covered by their respective wildcards (eg: \*.gz). Note this reversion also omits .jpg, .jpeg. file-ext-never-compress-20250425T011333UTC.list # // Last modified: 20250425 01:13:33 # // Created: 20250422 12:33:00 # desc : file extensions never to be compressed by kopia's policies as # …

---

_[View the full topic](https://kopia.discourse.group/t/automating-backups-to-multiple-repos-smb-b2-policy-questions-new-user/3904)._
