geonode-project icon indicating copy to clipboard operation
geonode-project copied to clipboard

Backup.sh procedure is just able to run once

Open christianbraun opened this issue 10 months ago • 10 comments

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?

christianbraun avatar Feb 27 '25 14:02 christianbraun

I have the same issue! @christianbraun Did you resolve it?

caocuongngo avatar May 26 '25 16:05 caocuongngo

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 avatar May 27 '25 14:05 caocuongngo

@caocuongngo I think you can make a PR to solve the issue ?

kikislater avatar May 27 '25 16:05 kikislater

@kikislater I don't have write access.

caocuongngo avatar May 28 '25 01:05 caocuongngo

It is like every project: make a fork, then modify the code and you can purpose a PR!

kikislater avatar May 28 '25 04:05 kikislater

@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 avatar May 28 '25 07:05 christianbraun

@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}", ]

caocuongngo avatar May 28 '25 07:05 caocuongngo

@etj can you take a look at this?

giohappy avatar Aug 21 '25 16:08 giohappy

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)

etj avatar Aug 22 '25 11:08 etj

We should troublsehoot GWC, we cannot simply skip it @christianbraun

giohappy avatar Aug 22 '25 15:08 giohappy