Skip to end of banner
Go to start of banner

How to import multiple spaces with a sleep value using Confluence Command Line Interface app (CLI)

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 8 Next »

This article explains how to import multiple spaces with a sleep value using Confluence Command Line Interface app (CLI). 

Instructions

Follow the below steps to import large spaces:

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


    We would use the system -a sleep value 5" to 

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



    Please refer to below example where spacemk1.zip and spacemk2.zip are space import files. 

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


    The Parameters used above are. 


    --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