Understanding Cpremote Restore Progress and File Lock Mechanism

cpremote restore

The Cpremote Restore Process

Cpremote use file lock mechanism to control the restore procedure. It mean each restore request under a cpanel account will start with a lock file. This will allow to run only one restore in a cpanel account at a time. You can run multiple restore in different accounts.

The Lock File name will be : /var/run/cpremote-restore-CPUSER.lock

Why cpremote allow only one restore at a time in a cpanel account ?

Multiple concurrent restore in a cpanel account may result in data lose and unexpected behavior. So it is always run one restore in a cpanel account at a time. This protection is for data safety. To ensure the data integrity cpremote have the lock mechanism, that will make it a unique feature.

What is the restore LOCK file ?

When the server admin or the cpanel user send a request for a restore under a cpanel account, it will create a lock file in /var/run/ folder ( eg : /var/run/cpremote-restore-fun.lock ) . This Lock file contains the restore log file name. Both admin and cpanel user can monitor the log files and locks from whm.

What is inside the LOCK file ?

This lock file contains the full path to the restore log file that executed at the time.

Restore not working but LOCK file exists ?

Some times there may be issues like storage pool failure, wrong backup , corrupted data, network issues, etc,. In such scenario , the restore request may fail without success. If a restore fail, then the LOCK files won’t be deleted. You need to check the log file associated with the LOCK file to see what is the reason behind the issues. Only the server admin can handle the locks and log files. So after solving your server problems , you can simply remove the LOCK file from whm and send the restore request too. As long as a restore lock file exists for a cpanel account, any further restore process will stop.