Skip to end of banner
Go to start of banner

How to import spaces using Confluence Command Line Interface (CLI) app

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

This article explains how to import spaces using Confluence Command Line Interface (CLI)

Instructions

Follow the below steps to import large spaces:

  1. Combine runFromListwith the --listparameter, and restoreExport to import multiple spaces. 

    -a runFromList --list "aaa,bbb" -i "-a restoreExport -f @entry@" -i "system -a sleep value 5"



    Please refer to below example:

    -a runFromList --list "spacemk1.zip,spacemk2.zip" -i "-a restoreExport -f @entry@" -i "system -a sleep --value 5"

    --list  input the filename of the exported space you want to restore.
    --value specify the time value in seconds.

    The output of the CLI action:

    Run: -a restoreExport -f spacemk1.zip
    Restore has been started with taskId a2f5af67-3a34-47cc-860f-b8709bc6f8ff. Task status can be checked at https://confluence.example.com/rest/api/latest/longtask/a2f5af67-3a34-47cc-860f-b8709bc6f8ff.
    
    Waiting for task completion: 0% complete. Importing objects. 
    
    Waiting for task completion: 5% complete. Importing objects. 
    
    Waiting for task completion: 13% complete. Importing objects. 
    
    Waiting for task completion: 23% complete. Importing objects. 
    
    Waiting for task completion: 37% complete. Importing objects. 
    
    
    Waiting for task completion: 100% complete. Applying special processing. 
    Restore completed.
    
    Run: system -a sleep --value 5
    Continue after sleeping for 5 seconds.
    
    Run: -a restoreExport -f spacemk2.zip
    Restore has been started with taskId 3d862460-0d87-4c82-81ae-b19592653863. Task status can be checked at https://confluence.example.com/rest/api/latest/longtask/3d862460-0d87-4c82-81ae-b19592653863.
    
    Waiting for task completion: 37% complete. Importing objects. 
    
    
    Waiting for task completion: 100% complete. Complete. 
    Restore completed.
    
    Run: system -a sleep --value 5
    Continue after sleeping for 5 seconds.
    
    Run completed successfully. 4 actions were successful 


  • It is recommended to test this scenario in a non-production environment, or run the action with the --simulate parameter, to verify the behavior before deploying in production environment.
  • No labels