Migrate the control node

I plan to migrate the control node. How can I retain the original usage records and other information?

  1. Take a backup of the configuration and files
/etc/pbs.conf
$PBS_HOME/sched_priv/sched_config
qmgr -c "print server"  > printserver.txt
qmgr -c "print sched" > printsched.txt
qmgr -c "print nodes @default" > printnodes.txt
qmgr -c "print queue @default" > printqueue.txt
qmgr -c "print hook @default" > printhook.txt
Note down the last jobid
backup any custom scripts or hooks
  1. stop the pbs services on the control node
    backup $PBS_HOME , $PBS_EXEC , /etc/pbs.conf , /etc/init.d/pbs , /etc/profile.d/pbs.*

  2. Bring up a new VM , note : the control node hostname and compute node hostname should be same in the /etc/hosts of this new VM.

install  PBS Pro 
start pbs pro services # do not submit any jobs 
migrate the configuration from the backup (qmgr < printserver.txt and so on )
copy the accounting logs from backup $PBS_HOME/server_priv  to $PBS_HOME/server_priv
edit the postgres and update the next jobid to be   last jobid+1
submit a test job

Please go through this guide : https://2021.help.altair.com/2021.1/PBSProfessional/PBSInstallGuide2021.1.pdf

How can I update the next jobid to be last jobid+1?

Please check the protocol here

Some jobs are in the queue and are being executed on the compute nodes (state R), while many other jobs are queued (state Q). How can I restore the system to its original state after the migration?
I encountered another problem: my compute node is completely out of disk space. PBS submits the job to this node, but it remains in the R state. I checked the logs and it seems to be repeatedly trying. Can’t PBS just terminate the job directly?

  • You cannot save the running jobs during migration. You have to set (qmgr: set server scheduling = false) and allow the running jobs to complete.
  • Also, it is better to ignore the queued and running jobs (and drain them) and do the migration
  • stop PBS services on the Server host and take a postgres dump
  • import the dump into the new server
  • copy the accounting logs
  • start the PBS services

Note: The migration discussed above was reconfiguring the new server node with respect to configuration and accounting logs and the next job id.