Snapshot Import Fails - Resource Def File Missing

Snapshot import fails when a PBS resource definition file is missing from the tarfile representing a snapshot of the HPC complex.


When importing a snapshot, the following error message is displayed:
While executing consume_task() request_method POST. Error while importing 
model: Traceback (most recent call last):
  File "/opt/pbsworks/exec/pbsworks-admin/pbswadministrator/drivers/services/simulate/", 
line 1396, in model_action
  File "/opt/pbsworks/home/pbs-control-simulator/lib/pbssim/storage/drivers/", 
line 843, in validate_artifacts
    (self.path_to, error, traceback.format_exc())
PBSSimArchiveError: While validating snapshot artifacts for 
snapshot artifact server_priv/resourcedef is missing, Traceback (most recent call last):
  File "/opt/pbsworks/home/pbs-control-simulator/lib/pbssim/storage/drivers/", 
line 838, in validate_artifacts
    raise PBSSimArchiveError(validation_error)
PBSSimArchiveError: snapshot artifact server_priv/resourcedef is missing


The tarfile is missing a resourcedef file.


  1. Extract the contents of the tarfile.
    tar -xvf <snapshot.tgz>
  2. Navigate to the server_priv directory.
  3. Create an empty resourcedef file:
    touch resourcedef
  4. Recreate the tar file:
    tar -cvf <snapshot.tgz> <snapshot_dir>
  5. Import the new tarfile.