I’m trying to generate
.bat batch files (for Windows) and
.sh shell scripts (for Linux) to perform automated backups.
Is there a
kopia snapshot create command where I can actually specify the destination repo? i.e. Without it being reliant on whatever commands may or may not have been run before it? (and whether those previous commands succeeded or failed)
I’m concerned about race conditions and other issues in the case where the source servers have multiple repos they connect to, and it also just makes scripting a lot more complicated needing to to deal with this “modal” nature of running separate commands to “connect” to one repo at a time, and then actually do backups to which ever is the “current” repo is. Or maybe I’ve misunderstood how Kopia works?
Ideally I’m also looking for a command that can first check if the repo exists first, and auto-create it if it doesn’t. Is this possible?
I’d love a simple one-liner that gives consistent results like:
kopia snapshot create --auto-create-repo --repo="b2:bucketname/prefixpath/" /home/my-stuff-to-backup
This would greatly simplify the usage of Kopia without needing to write complicate scripts for this common use case.
Or could this somehow be done with environment variables? Are they documented somewhere?
Sorry if I’ve missed something! I’ve been trying to figure this out today and yesterday, but haven’t been able to figure out if it’s possible at all.