New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(site): Add 'How do I automate backups?' to FAQ #3358
base: master
Are you sure you want to change the base?
Conversation
A few thoughts on this: (1) IMO, if a guide or tip or whatever is fairly long, such as the proposed changed, it should be on its own page rather than in the FAQs. We can create a FAQ for it but then use the FAQ to link to the new page rather than within the FAQ. Otherwise, the FAQ will get way too long (2) The proposed change is incomplete as it does not discuss KopiaUI, which you don't need to do anything to automate snapshots (3) I don't use Kopia CLI, but I thought that too allowed you to automate backups by setting up policies? Without the need to use cron? |
Many thanks for your feedback!
Fair enough, I agree, do you have a suggestion on where it would go?
If I understand correctly, KopiaUI runs
This is exactly the kind of confusion I would like to see cleared up and clarified in the docs, and I'm very happy to be pointed at the information about how to do it if so. Kopia docs are unclear as it seems to imply automation that doesn't come out of the box if you install on linux at least. From what I can tell you have to run kopia server, which is what I tried to suggest using |
@jkowalski can clarify about whether Kopia CLI explicitly needs to be set to run via cron or setting a policy is enough to automate backups. Im pretty sure setting a policy is enough, but as I said I don't use Kopia CLI. If setting the policy is enough, then we don't really need an extra page for this. We could create a FAQ and do a short one paragraph writeup in that FAQ that says something like "Kopia automatically runs backups based on the policies that you create." The getting started guide already has information on setting up policies. If you do need to use cron to automate, then I think a dedicated page is the way to go and then just link to that page in the FAQ. |
@basldfalksjdf Kopia CLI doesn't imply any sort of automatic backup. You need a daemon, or something like that, running to execute the policies. What is the daemon for kopia? I can clearly see the confusion that @jmbrunskill raises as I had the same confusion when setting up automatic kopia backups in my cronjobs. Maybe there is an easier way by running I now use export KOPIA_CONFIG_PATH="${HOME}/path/to/config"
# need to securely provide password:
export KOPIA_PASSWORD="some-password"
# snip
${KOPIA_CMD} snapshot create --tags="${BACKUP_TAGS}" "${BACKUP_TARGET}" | tee -a "${logFile}" |
note that passing kopia password is generally only needed on The exception is when you pass |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3358 +/- ##
==========================================
+ Coverage 75.82% 75.87% +0.04%
==========================================
Files 465 463 -2
Lines 37171 37100 -71
==========================================
- Hits 28185 28149 -36
+ Misses 7057 7025 -32
+ Partials 1929 1926 -3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good starting point.
Adds an FAQ section on how to automate backups based on discourse answer here:
https://kopia.discourse.group/t/basics-questions-thanks-for-your-time/258/5
A colleague spent a lot of time trying to figure out how to automate kopia backups, which makes me think adding some basic docs & explaination is useful.
The design is a little confusing because policies can setup scheduled, but they don't run without the server running or a cron job.
I've put in very minimal examples cron jobs and systemd service, neither of which have had much testing.
Perhaps it's better to explain the socket based systemd approach mentioned here?
https://kopia.io/docs/repository-server/#kopia-with-systemd
I don't really understand it though, so would need some input on that.
This docs current focus on linux, but I think it would be helpful to have similar docs for windows, and mac.