Backup.sh procedure is just able to run once
Hi everyone,
I'm working on a 4.4.1 GeoNode project using Docker. I'm about to set up the backup procedure, and I noticed something strange. If I run backup.sh just once, it finishes successfully. But if I run it again, it gets stuck trying to contact GeoServer and waits forever.
After restarting the Docker Compose, backup.sh works again, but it fails during a second call.
Any ideas on what could be causing this?
I have the same issue! @christianbraun Did you resolve it?
I found the issue: it's the GeoWebCache that creates a lock, thus backup can't acquire it --> resulting hang up. Override backup.py with BK_SKIP_GWC=true to solve the issue.
@caocuongngo I think you can make a PR to solve the issue ?
@kikislater I don't have write access.
It is like every project: make a fork, then modify the code and you can purpose a PR!
@caocuongngo , thanks for investigating and finding a fix. I guess I have to inject the variable into the _options list in line 247 of backup.py?
@christianbraun Yes, I override create_geoserver_backup and create _options = [ "BK_CLEANUP_TEMP=true", "BK_SKIP_SETTINGS=false", "BK_SKIP_SECURITY=false", "BK_SKIP_GWC=true", f'BK_BEST_EFFORT={("true" if ignore_errors else "false")}', f"exclude.file.path={config.gs_exclude_file_path}", ]
@etj can you take a look at this?
Skipping B/R of GWC config does not seem a good idea to me. Anyway something is definitely wrong with the backup of the GWC stuff in GeoServer, since we also have some other issues about it, for instance https://github.com/GeoNode/geonode/issues/11912 (only a workaround for it was implemented in GeoNode)
We should troublsehoot GWC, we cannot simply skip it @christianbraun