List of the Developer Portal exec commands

You can use the exec commands to backup, restore, and list some of the environment details of your Developer Portal service.

The following Developer Portal exec commands can be run in your API Connect installation project directory, where ptl is the name of your Portal service.
Tip: Running exec commands leaves completed jobs and pods on your subsystem. Therefore, it is recommended that you regularly delete those jobs and pods that have completed successfully, and whose logs are not required.
$ apicup subsys exec ptl backup-system
    Backup the portal system to the remote server

$ apicup subsys exec ptl backup-site <arg>
    Backup a portal site to the remote server.
    valid args:
       site uuid/url - will backup that site only to the remote server 
       installed     - will backup all installed sites to the remote server
    
$ apicup subsys exec ptl backup
    Backup the portal system and all its sites to the remote server

$ apicup subsys exec ptl list-backups <arg>
    List the portal backups either locally or on the remote server.
    valid args:
       local      - will list backups present on the pod's filesystem
       remote     - will list backups on the remote server

$ apicup subsys exec ptl list-platforms
    List the platforms that exist on the portal

$ apicup subsys exec ptl list-sites <arg>
    List the installed portal sites
    valid args:
       sites      - list only the sites
       platforms  - list the sites and their associated platform

$ apicup subsys exec ptl restore-system <arg>
    Restore the portal system from the remote server
    valid args:
       system_backup-1234.tgz   - restores the system from the given file which should exist on the pod's local filesystem or the remote server
       latest                   - restores from latest system backup found from either local filesystem or remote server

$ apicup subsys exec ptl restore-site <arg>
    Restore a portal site
    valid args:
       site-1234.tgz      - restore the site using this filename which should can be copied from the output of the list backups command 
       myportal.com       - find the latest backup for this URL (locally or remotely) and restore it.
       all                - restore all sites found on the remote server
NOTES:
If you specify a site TGZ / URL, the command runs restore_site with -f so overwrites any existing site
If you specify 'all', any installed sites will be reinstalled from the found backup

$ apicup subsys exec ptl restore-all <arg1> <arg2>
    Restore the portal system and all backed up sites from the remote server
    valid arg1:
       dry   - executes a dry-run of the command, returning the actions that will be performed
       run   - executes the command, restoring and replacing the system files and all sites. Any existing sites will be reinstalled
    valid arg2:
       now         - use the latest backups available
       <TIMESTAMP> - in 'YYYYMMDD.HHMMSS' format, specify a timestamp to retrieve the backup from. The nearest backup, searching backwards from this timestamp, will be used.