Closed r748 closed 5 months ago
Facing the same issue, however, in my case the repository size is not being altered in the web UI. Also, no info on "Last Change".
Running v2.2.0 from Docker Hub on a Ubuntu Server 22.04 machine.
I'm not seeing any info on "Last Change" either...
@rarrais Regarding updating of the repository size: Have you set up a cron job for this as described in the docs?
Hello, there are two tasks planned to update the status and the volume. Can you confirm that you have set up these two scheduled tasks? They are indicated in the documentation, whether in docker installation or in baremetal under debian.
If you've set up your cron tasks correctly, can you manually make the curl call and give me the return command here please? Thanks
Hello Ravinou,
Thanks for your reply!
I have set up both scheduled tasks. When I manually make the calls, I get {"success":"Status cron has been executed."}
and {"success":"Storage cron has been executed."}
. However the stautus button remains red and "Last Change" is showing "-", despite running successful nightly backups on the repository. The 2nd call seems to be working and "Storage Used" is updated regularly.
@r748 so you are on Debian install, not docker ?
@Ravinou
After deleting and recreating repositories for hours without ever seeing a green button, I finally went through your source code and found the reason causing this issue!
My backup server only has a small system drive. Therefore I created a symlink to my mirrored 4TB drives holding the repos
directory. On Line 29 of helpers/shells/getLastSave.sh
you limit the find
command to -type d
and -mindepth 1
, so my symlinked repos directory isn't found and the function returns [].
Changing that line to:
if [ -n "$(find "${home}"/repos -mindepth 1 -maxdepth 1 -type d)" ] || [ -n "$(find "${home}"/repos -maxdepth 0 -type l)" ]; then
is giving me the desired response ([{"repositoryName": "c89ed573","lastSave": 1710024079}]
). So it would be great, if you could include this in the next version.
On another note, it would be great if the .env
file would allow configuring a custom repos
directory! Using Docker I guess this is less of an issue, since volumes can easily be mapped. But in my case of running borgwarehouse on bare metal Debian with a small system disk, it would avoid the symlink issue.
Thanks for all your effort!!!
Thank you very much for sharing your solution. Most people never come back to post here when they solve their problem and I have to figure it out on my own.
Plus this case is interesting because I recommend using symbolic link to use another storage directory. But I had never done the test because I'm no longer in this case, I use Docker. However, I'm determined to succeed in maintaining Docker-free usage. I'll study the modification so as not to impact Docker usage, I'll update the documentation and publish a fix soon.
As for the choice of directory, you'll notice that I had begun to consider the case, because bash scripts are indeed relative to an .env
file. But, it's a big effort for me in terms of development because I have to be very careful that it doesn't disrupt Docker usage. I prefer to recommend the use of a symbolic link, which is a common and practical practice. I'm not saying it's impossible, but I am saying that for a result equivalent to the symbolic link, the effort on my part is significant, knowing that there are other features (more interesting in my humble opinion) that I'd like to develop.
I hope you'll understand my position and, of course, I'll make the necessary changes to use a symbolic link.
Thank you for your detailed answer and willing to maintain the Docker-free option, I really appreciate your work!
Regarding an option to set the repository path in the .env
file: I can live with using a symlink, but to me, adding an .env setting would also seem like a fairly simple task... Couldn't you just add an optional variable (e.g. REPOSITORY_PATH). Then in the 5 (if I counted correctly) files (deleteRepo.sh, getLastSave.sh, getStorageUsed.sh, createRepo.sh, recreateRepoConfigFile-v1.sh) where you are setting : "${home:=/home/borgwarehouse}"
and then using "${home}"/repos
, you check if the variable REPOSITORY PATH is set and either use that, or if not set use "${home}"/repos
.
I'm not seeing any info on "Last Change" either...
@rarrais Regarding updating of the repository size: Have you set up a cron job for this as described in the docs?
I can confirm that I was missing the cron job set up. Thank you very much, @r748.
Thank you also, @Ravinou, for the fantastic software!
Borgwarehouse is showing a red button for my repository and I am receiving down status notification e-mails, despite successful daily backups and repository size increasing. Borgwarehouse is reflecting the increasing storage used, however status is showing red anyway.