Child pages
  • WHM API 1 Functions - restore_queue_list_completed

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function lists the restoration queue's completed tasks.


Warning
titleImportant:

This function's output varies dramatically. The method that added the restoration task determines this output. 

Include Page
LIB:_SPFC7Note
LIB:_SPFC7Note

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/restore_queue_list_active?api.version=1



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/restore_queue_list_active?api.version=1



Expand
titleCommand Line


Code Block
languagebash
whmapi1 restore_queue_list_active

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Expand
titleClick to view an example for a task that the /scripts/restorepkg script added...


Code Block
languagetext
linenumberstrue
{  
   "data":{  
      "restore_job":[  
         {  
            "status_info":{  
               "log":"Extracting Domain....Done\n Done\n 
    \n 
     Restoring cpanel user config file    Done\n    \n 
     Restoring reseller packages and features (if any)       \n 
     Restoring reseller privs (if any)       \n 
     Restoring Locale Setting       \n 
     Restoring SSL keys and Certificates    Done\n 
    \n 
     Restoring frontpage (if installed)    Done\n    \n 
     Restoring access logs....     Done\n 
    \n 
     Restoring domain keys....     Done\n 
    \n 
     Restoring MySQL databases....     Database \"cptmpdb_azri8qf8_0KuzT3yEH7JFeeSi\" dropped Done\n 
 Successful creation of roundcube cp_schema_version table \n 
Initial run through schema migration: from '0.2b' to '0.8.4' \n 
Please ignore non-fatal warnings, such as duplicate keys, columns, indexes, or tables already existing. \n 
Successfully saved version 0.8.4 to cp_schema_version table \n 
DBD::mysql::st execute failed: Table 'cptmpdb_azri8qf8_7WIKvg175f2M02yn.users' doesn't exist at /usr/local/cpanel/Cpanel/Email/RoundCube/DBI.pm line 503,  line 1. DBD::mysql::st execute failed: Table 'cptmpdb_azri8qf8_7WIKvg175f2M02yn.users' doesn't exist at /usr/local/cpanel/Cpanel/Email/RoundCube/DBI.pm line 503,  line 1. Transfer failed from temp database to Roundcube database.\n Done\n Done    \n
     Restoring MySQL privs    Done\n    \n 
    Reloading MySQL    Done\n 
    \nRestoring PostgreSQL databases.... ERROR:  role \"azri8qf8\" already exists      Restoring PostgreSQL privs     Done\n
    \n 
     Restoring Mailman lists    Done\n 
    \n 
     Restoring Mailman Archives    Done\n 
    \n 
      Restoring shell    Current shell /usr/local/cpanel/bin/noshell is up to date. Done\n 
    \n 
     Restoring password    Password for azri8qf8 has been changed Done\n 
    \n 
     Restoring proftpd file    Done\n 
    \n 
     Resyncing FTP Passwords    Updating ftp passwords for azri8qf8Ftp password files updated.Ftp vhost passwords syncedDone\n
    \n 
     Linking old home directories       \n 
     Parsing Domain Databases    ...Subdomains......ParkedDomains......AddonDomains...   \n 
     Restoring Domains    \n 
    \n 
     Restoring Bandwidth Data    Done    \n 
     Restoring Counter Data       \n 
     Restoring Homedir....    Done\n    \n     Doing fileprotect conversion       \n 
     Restoring nobody owned files    Done\n    \n 
     Restoring Mail files    Done\n 
    \n 
     Restoring userdata....     Done\n    \n 
     Restoring custom virtualhost templates....        \n 
     Converting email to cPanel 5+ (if needed)    Done\n    \n 
     Cleaning up filters (if needed)    vfilter converter v3.0Updating vfilter files to latest format.Running for azri8qf8 only (force=0) (has_spam_acl=0)Processing azri8qf8......DoneDone\n
    \n 
     Fixing mail permissions    Done\n 
    \n 
     Restoring crontab    Done\n 
         Converting to maildir if needed    Done\n 
         Restoring Dns Zones    Restoring zone: 28-ps1n25d.test.db Zone updates: 28-ps1n25d.test    \n 
     Adding missing subdomain DNS entries (if needed)       \n 
     Update Proxy subomains    Adding proxy subdomains for domain 28-ps1n25d.test.28-ps1n25d.test                    [28-ps1n25d.test, 10.215.215.229, no changes needed]Done\n 
    \n 
     Updating SPF Records    Done\n    \n 
     Restoring quota    Done\n 
    \n 
   \n 
     Update mail routing    LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for 28-ps1n25d.test's mail.: This configuration has been manually selected. Done\n 
    \n 
     Rebuilding Apache Conf    Built /usr/local/apache/conf/httpd.conf OK   \n 
     Restore Complete    Account Restore Complete Unlocking password for user azri8qf8.passwd: Success.   \n",
               "started":"1355840811",
               "finished":"1355840823",
               "result":1
            },
            "restore_job":{  
               "restore_point":"YYYY-MM-DD",
               "options":{  
                  "give_ip":0,
                  "mysql":1,
                  "subdomains":1,
                  "mail_config":1
               },
               "user":"example"
            }
         },
         {  
            "status_info":{  
               "log":"",
               "started":"1355840823",
               "finished":"1355840823",
               "result":0
            },
            "restore_job":{  
               "restore_point":"YYYY-MM-DD",
               "options":{  
                  "give_ip":1,
                  "mysql":1,
                  "subdomains":0,
                  "mail_config":0
               },
               "user":"bcow"
            }
         }
      ]
   },
   "metadata":{  
      "version":1,
      "reason":"OK",
      "result":"1",
      "command":"restore_queue_list_completed"
   }
}



Expand
titleClick to view an example for a task that the restore_queue_add_task function added...


Code Block
languagetext
linenumberstrue
{
   "data" : {
      "restore_job" : [
         {
            "restore_job" : {
               "options" : {
                  "give_ip" : 0,
                  "mail_config" : 0,
                  "mysql" : 0,
                  "subdomains" : 0
               },
               "restore_point" : "2014-12-04",
               "user" : "narf"
            },
            "status_info" : {
               "finished" : 1417706324,
               "log" : "OK",
               "result" : 1,
               "started" : 1417706298
            }
         },
         {
            "restore_job" : {
               "options" : {
                  "give_ip" : 0,
                  "mail_config" : 1,
                  "mysql" : 1,
                  "subdomains" : 1
               },
               "restore_point" : "2014-12-04",
               "user" : "narf"
            },
            "status_info" : {
               "finished" : 1417709351,
               "log" : "OK",
               "result" : 1,
               "started" : 1417709314
            }
         }
      ]
   },
   "metadata" : {
      "command" : "restore_queue_list_completed",
      "reason" : "OK",
      "result" : "1",
      "version" : 1
   }
} 




Expand
titleOutput (XML)


Expand
titleClick to view an example for a task that the /scripts/restorepkg script added...


Code Block
languagexml
linenumberstrue
<result>
   <data>
      <restore_job>
         <status_info>
            <log>
Extracting Domain....Done Done Restoring cpanel user config file Done Restoring reseller packages and features (if any) Restoring reseller privs (if any) Restoring Locale Setting Restoring SSL keys and Certificates Done Restoring frontpage (if installed) Done Restoring access logs.... Done Restoring domain keys.... Done Restoring MySQL databases.... Database "cptmpdb_azri8qf8_0KuzT3yEH7JFeeSi" dropped Done Successful creation of roundcube cp_schema_version table Initial run through schema migration: from '0.2b' to '0.8.4' Please ignore non-fatal warnings, such as duplicate keys, columns, indexes, or tables already existing. Successfully saved version 0.8.4 to cp_schema_version table DBD::mysql::st execute failed: Table 'cptmpdb_azri8qf8_7WIKvg175f2M02yn.users' doesn't exist at /usr/local/cpanel/Cpanel/Email/RoundCube/DBI.pm line 503, line 1. DBD::mysql::st execute failed: Table 'cptmpdb_azri8qf8_7WIKvg175f2M02yn.users' doesn't exist at /usr/local/cpanel/Cpanel/Email/RoundCube/DBI.pm line 503, line 1. Transfer failed from temp database to Roundcube database. Done Done Restoring MySQL privs Done Reloading MySQL Done Restoring PostgreSQL databases.... ERROR: role "azri8qf8" already exists Restoring PostgreSQL privs Done Restoring Mailman lists Done Restoring Mailman Archives Done Restoring shell Current shell /usr/local/cpanel/bin/noshell is up to date. Done Restoring password Password for azri8qf8 has been changed Done Restoring proftpd file Done Resyncing FTP Passwords Updating ftp passwords for azri8qf8Ftp password files updated.Ftp vhost passwords syncedDone Linking old home directories Parsing Domain Databases ...Subdomains......ParkedDomains......AddonDomains... Restoring Domains Restoring Bandwidth Data Done Restoring Counter Data Restoring Homedir.... Done Doing fileprotect conversion Restoring nobody owned files Done Restoring Mail files Done Restoring userdata.... Done Restoring custom virtualhost templates.... Converting email to cPanel 5+ (if needed) Done Cleaning up filters (if needed) vfilter converter v3.0Updating vfilter files to latest format.Running for azri8qf8 only (force=0) (has_spam_acl=0)Processing azri8qf8......DoneDone Fixing mail permissions Done Restoring crontab Done Converting to maildir if needed Done Restoring Dns Zones Restoring zone: 28-ps1n25d.test.db Zone updates: 28-ps1n25d.test Adding missing subdomain DNS entries (if needed) Update Proxy subomains Adding proxy subdomains for domain 28-ps1n25d.test.28-ps1n25d.test [28-ps1n25d.test, 10.215.215.229, no changes needed]Done Updating SPF Records Done Restoring quota Done Update mail routing LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for 28-ps1n25d.test's mail.: This configuration has been manually selected. Done Rebuilding Apache Conf Built /usr/local/apache/conf/httpd.conf OK Restore Complete Account Restore Complete Unlocking password for user azri8qf8.passwd: Success.
            </log>
            <started>1355840811</started>
            <finished>1355840823</finished>
            <result>1</result>
         </status_info>
         <restore_job>
            <restore_point>YYYY-MM-DD</restore_point>
            <options>
               <give_ip>0</give_ip>
               <mysql>1</mysql>
               <subdomains>1</subdomains>
               <mail_config>1</mail_config>
            </options>
            <user>example</user>
         </restore_job>
      </restore_job>
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>restore_queue_list_finished</command>
   </metadata>
</result>



Expand
titleClick to view an example for a task that the restore_queue_add_task function added...


Code Block
languagexml
linenumberstrue
<result>
    <data>
        <restore_job>
            <status_info>
                <log>OK</log>
                <started>1417706298</started>
                <finished>1417706324</finished>
                <result>1</result>
            </status_info>
            <restore_job>
                <restore_point>2014-12-04</restore_point>
                <options>
                    <give_ip>0</give_ip>
                    <mysql>0</mysql>
                    <subdomains>0</subdomains>
                    <mail_config>0</mail_config>
                </options>
                <user>narf</user>
            </restore_job>
        </restore_job>
        <restore_job>
            <status_info>
                <log>OK</log>
                <started>1417709314</started>
                <finished>1417709351</finished>
                <result>1</result>
            </status_info>
            <restore_job>
                <restore_point>2014-12-04</restore_point>
                <options>
                    <give_ip>0</give_ip>
                    <mysql>1</mysql>
                    <subdomains>1</subdomains>
                    <mail_config>1</mail_config>
                </options>
                <user>narf</user>
            </restore_job>
        </restore_job>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>restore_queue_list_completed</command>
    </metadata>
</result> 



Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
restore_jobarray of hashesAn array of hashes that contain of information about a completed task in the restoration queue.

This array of hashes includes the status_info and restore_job hashes.

 

status_info

hash

A hash of information about the task's status.

The function returns this hash in the restore_job array.

This hash includes the log, started, finished, and result returns.

 

log

string

The task's log information.

The function returns this value in the status_info hash.

One or more log messages.


Expand
titleClick to view...
Extracting Domain....Done Done Restoring cpanel user config file Done Restoring reseller packages and features (if any) Restoring reseller privs (if any) Restoring Locale Setting Restoring SSL keys and Certificates Done Restoring frontpage (if installed) Done Restoring access logs.... Done Restoring domain keys.... Done Restoring MySQL databases.... Database "cptmpdb_azri8qf8_0KuzT3yEH7JFeeSi" dropped Done Successful creation of roundcube cp_schema_version table Initial run through schema migration: from '0.2b' to '0.8.4' Please ignore non-fatal warnings, such as duplicate keys, columns, indexes, or tables already existing. Successfully saved version 0.8.4 to cp_schema_version table DBD::mysql::st execute failed: Table 'cptmpdb_azri8qf8_7WIKvg175f2M02yn.users' doesn't exist at /usr/local/cpanel/Cpanel/Email/RoundCube/DBI.pm line 503, line 1. DBD::mysql::st execute failed: Table 'cptmpdb_azri8qf8_7WIKvg175f2M02yn.users' doesn't exist at /usr/local/cpanel/Cpanel/Email/RoundCube/DBI.pm line 503, line 1. Transfer failed from temp database to Roundcube database. Done Done Restoring MySQL privs Done Reloading MySQL Done Restoring PostgreSQL databases.... ERROR: role "azri8qf8" already exists Restoring PostgreSQL privs Done Restoring Mailman lists Done Restoring Mailman Archives Done Restoring shell Current shell /usr/local/cpanel/bin/noshell is up to date. Done Restoring password Password for azri8qf8 has been changed Done Restoring proftpd file Done Resyncing FTP Passwords Updating ftp passwords for azri8qf8Ftp password files updated.Ftp vhost passwords syncedDone Linking old home directories Parsing Domain Databases ...Subdomains......ParkedDomains......AddonDomains... Restoring Domains Restoring Bandwidth Data Done Restoring Counter Data Restoring Homedir.... Done Doing fileprotect conversion Restoring nobody owned files Done Restoring Mail files Done Restoring userdata.... Done Restoring custom virtualhost templates.... Converting email to cPanel 5+ (if needed) Done Cleaning up filters (if needed) vfilter converter v3.0Updating vfilter files to latest format.Running for azri8qf8 only (force=0) (has_spam_acl=0)Processing azri8qf8......DoneDone Fixing mail permissions Done Restoring crontab Done Converting to maildir if needed Done Restoring Dns Zones Restoring zone: 28-ps1n25d.test.db Zone updates: 28-ps1n25d.test Adding missing subdomain DNS entries (if needed) Update Proxy subomains Adding proxy subdomains for domain 28-ps1n25d.test.28-ps1n25d.test [28-ps1n25d.test, 10.215.215.229, no changes needed]Done Updating SPF Records Done Restoring quota Done Update mail routing LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for 28-ps1n25d.test's mail.: This configuration has been manually selected. Done Rebuilding Apache Conf Built /usr/local/apache/conf/httpd.conf OK Restore Complete Account Restore Complete Unlocking password for user azri8qf8.passwd: Success.


started

integer

The restoration process's start time for this task.

The function returns this value in the status_info hash.

A date in Unix time format.

1355840811

finished

integer

The restoration process's finish time for this task.

The function returns this value in the status_info hash.

A date in Unix time format.

1355840823

result

Boolean

Whether the task completed successfully.

The function returns this value in the status_info hash.

  • 1 — Success.
  • 0 — Failure.
1

restore_job

hash

A hash of the task's settings.

The function returns this hash in the restore_job array.

This hash includes the restore_point and user returns and the options hash.

 

options

hash

A hash of information about the task's options.

The function returns this hash in the restore_job hash.

This hash includes the give_ip, mysql, subdomains, and mail_config returns.

 

give_ip

Boolean

Whether the task assigned the account a dedicated IP address.

The function returns this value in the options hash.

  • 1 — Assigned.
  • 0 — Did not assign.
1

mysql

Boolean

Whether the task restored the account's MySQL® databases.

The function returns this value in the options hash.

  • 1 — Restored.
  • 0 — Did not restore.
1

subdomains

Boolean

Whether the function restored the account's subdomains.

The function returns this value in the options hash.

  • 1 — Restored.
  • 0 — Did not restore.
1

mail_config

Boolean

Whether the function restored the account's email configuration.

The function returns this value in the options hash.

  • 1 — Restored.
  • 0 — Did not restore.
1

user

string

The cPanel account's username.

The function returns this hash in the restore_job hash.

A valid cPanel username.username

restore_point

string

The date of the backup that the task used.

The function returns this hash in the restore_job hash.

A backup creation date, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the date.
2015-10-21