FAQ: Linux post-conversion scripting

  • 7005604
  • 02-Apr-2010
  • 27-Apr-2012

Environment

PlateSpin Protect/Migrate

Situation

This article describes steps that will be necessary to ensure that post-conversion scripts scheduled to run properly on the target server during the Post Conversion Actions step.

Because Linux file systems allow different characters in file names, and because Linux file systems support different ACL (Access Control List) permissions than Windows, therefore special care should be taken when creating post conversion scripts.

Resolution

1) It is suggested that the post conversion action scripts be tested in a self contained directory structure on a sample Linux host.

2)      Once the Action is deemed to work correctly, use tar (or a similar tool) to amalgamate the Action's directory structure into one file.

   

Example:

        cd /tmp

        tar -czvf NewAction.tgz /path/to/Action/Action_Folder/

  

* This will create a single file NewAction.tgz containing all files contained in the folder Action_Folder. The permissions of the files contained will be preserved.

 

3)      Copy the file NewAction.tgz to your Portability Suite Client Desktop

4)      Create a new custom post conversion Action, that will extract the tgz file

 

Example script:

        #!/bin/sh

        /bin/tar -xvzf NewAction.tgz

        #Exec the main executable / script in the NewAction folder

        Action_Folder/Action_script.sh