Continuously monitor the database storage for available storage to avoid a similar problem from arising in the future.
There may be, but the following procedure has not been tested.
- Detach the project directory.
- Prepare and set aside a copy of the project directory, in case the following steps result in unintended and unwanted changes to the project directory.
- Post under this topic any questions you may have regarding the procedure below.
- Save the following script to a file
build_manifest.py:project_dir = "/path/to/unattached/copy/of/projectdir/" manifest_path = "/tmp/WpPwiAf5vi.job_manifest.json" failed_job_docs_path = "/tmp/WpPwiAf5vi.failed.json" import pathlib import json jobs = [] failed_job_dirs = {} for doc in pathlib.Path(project_dir).glob('J*/job.json'): job_dir = doc.parts[-2] with open(doc) as handle: try: assert job_dir[1:].isdigit(), f"{doc} is not a valid job document path." data = json.load(handle) assert job_dir == data['uid'], f"Job uid does not match directory name {job_dir}." jobs.append(data['uid']) except Exception as e: failed_job_dirs[job_dir] = str(e) with open(manifest_path, 'w') as mhandle: json.dump({'jobs': sorted(jobs)}, mhandle, indent=4) if failed_job_dirs: with open(failed_job_docs_path, 'w') as fhandle: json.dump(failed_job_dirs, fhandle, indent=4) - In
build_manifest.py, edit theproject_dirdefinition on the first line to point to the unattached copy of the project directory. - Run the command
python3 build_manifest.py - The command may take some time to complete. After completion, inspect (without modifying) the
*.job_manifest.jsonand*.failed.jsonfiles created by the script inside the/tmp/directory.*.job_manifest.jsonshould include most job IDs in the project.*.failed.jsonshould include records for a few job IDs along with errors that lead to those job’s exclusion from the job manifest. - Copy the
*.job_manifest.jsonto the unattached project directory as a file namedjob_manifest.json. - Create a “synthetic”
workspaces.jsonfile as described in Attach a project without workspace.json - #2 by wtempel, as applicable given theworkspace_uidspresent in all the project’s jobs’job.jsonfiles. - After creating and placing inside the project directory the
job_manifest.jsonandworkspaces.jsonfiles, try again attaching the project.