-
Notifications
You must be signed in to change notification settings - Fork 26
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
Misc improvements #163
Misc improvements #163
Conversation
…that getting the config of a repo is fast, but maybe not?)
|
||
# We prune potential manual backup older than 1 year | ||
"$borg" prune "$repo" --keep-within 1y 2>&1 >/dev/null | log_with_timestamp | ||
"$borg" prune --list --keep-within 1y |
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.
@kay0u I'm not very fond of pruning without the user being informed ?
Shouldn't this "1y" be a setting in the config panel, set to "never" by default ?
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.
This code was already there, it's a discussion for another PR. To me it's very reasonable to have pruning by default because you don't want backup to just pile up and eat space forever. 1 year is a reasonable value ... Most of the time when you need to restore a backup, you need one from say a few days ago ...
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.
I understand your point. It should at least be mentionned somewhere in the post-install notes for instance.
I'll try to see if I can work on this small matter.
Problem
Solution
BORG_REPO
env var instead of using$repo
all over the placelogging.conf
file, and the corresponding env var to manage logs instead of using| tee -a
borg prune -P
withborg prune --glob-archives "regex"
because -P is deprecated, and it should fix the mess about pruningapp
andapps__2
(tested on my side by spammingsystemctl start borg.service
)--stats
and--list
to have more infos in logsbackup-with-borg
(I think there was a problem here, after a restore thebackup-with-borg
file shouldn't exist if I read the code correctly)/var/log/$app/borg.log
to the ynh service to be able to see the logs in the webadminPR Status
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)