How to tar a site

Clovertech Forums Read Only Archives Cloverleaf Support Web How to tar a site

  • Creator
    Topic
  • #47500
    Rick Brown
    Participant

      How to tar a site

      These are the steps to follow when support needs your site for testing.

      In order to recreate a problem, the sites configuration files, tcl procs, hl7 variants if any or frls will be needed.

      Usually, we’ll need the Netconfig, the /Xlate, the /formats. the /tclprocs, the /pdls, and /tables.

      Note: Before you start be sure to be in site that you plan to tar.

      1. tar -cvf ./filename.tar ./NetConfig ./Xlate ./formats ./tclprocs….etc (if 3.6.X or higher, add ./Views)

      2. compress filename.tar (If the file is large after you have tarred it up, then run this command)

      3. Then move the file to your new site and untar it.

      4. zcat filename.tar.Z | tar -xvf- (this is the command to untar a compresses file or “.Z”)

    Viewing 4 reply threads
    • Author
      Replies
      • #55890
        Anonymous
        Participant

          We do external support, where we sometimes need the site tarred and sent to us too. To that end we created a shell script called ‘mktar’ that’ll do the tarring for us. We place this in the $HCIROOT/usercmds/ directory so it can be called anywhere. Contents:

          # Author : Remco Kloet, E.Novation LifeLine Networks bv, cloverleaf@lifeline.nl

          cd $HCIROOT
          cp $HCIROOT/vers/license.dat $HCISITE/license_`date +%Y%m%d`.dat

          find ./$HCISITE -name “*.bak” -exec rm {} ;
          find ./$HCISITE -name “*.old” -exec rm {} ;
          find ./$HCISITE -name core -exec rm {} ;

          tar -cvf /tmp/${HCISITE}_`date +%Y%m%d`_`echo $HCIROOT | awk -F”/” ‘{print $3}’`.tar ./$HCISITE/NetConfig ./$HCISITE/Alerts ./$HCISITE/exec/processes ./$HCISITE/eoalias ./$HCISITE/formats ./$HCISITE/java_uccs ./$HCISITE/pdls ./$HCISITE/Tables ./$HCISITE/tclprocs ./$HCISITE/vb_messages ./$HCISITE/views ./$HCISITE/Xlate
          compress -f /tmp/${HCISITE}*.tar > /dev/null

          rm -f ./$HCISITE/license_`date +%Y%m%d`.dat > /dev/null

          The Network Configurator will not remove scripts under Await Replies (including Reply Generate/Resend). Although they may look inactive, they are still evaluated in start mode upon thread start. If you have stuff in there or if you have globals, they might interfere with other stuff you have set up.

          So remove the scripts first before unchecking the Await Replies box.[code]# Author : Remco Kloet, E.Novation LifeLine Networks bv, cloverleaf@lifeline.nl

          cd $HCIROOT
          cp $HCIROOT/vers/license.dat $HCISITE/license_`date +%Y%m%d`.dat

          find ./$HCISITE -name “*.bak” -exec rm {} ;
          find ./$HCISITE -name “*.old” -exec rm {} ;
          find ./$HCISITE -name core -exec rm {} ;

          tar -cvf /tmp/${HCISITE}_`date +%Y%m%d`_`echo $HCIROOT | awk -F”/” ‘{print $3}’`.tar ./$HCISITE/NetConfig ./$HCISITE/Alerts ./$HCISITE/exec/processes ./$HCISITE/eoalias ./$HCISITE/formats ./$HCISITE/java_uccs ./$HCISITE/pdls ./$HCISITE/Tables ./$HCISITE/tclprocs ./$HCISITE/vb_messages ./$HCISITE/views ./$HCISITE/Xlate
          compress -f /tmp/${HCISITE}*.tar > /dev/null

          rm -f ./$HCISITE/license_`date +%Y%m%d`.dat > /dev/null

          The Network Configurator will not remove scripts under Await Replies (including Reply Generate/Resend). Although they may look inactive, they are still evaluated in start mode upon thread start. If you have stuff in there or if you have globals, they might interfere with other stuff you have set up.

          So remove the scripts first before unchecking the Await Replies box.

        • #55891
          Robert Kersemakers
          Participant

            I use this script, but I took the directory $HCISITEDIR/exec/processes out of making the tar, because it contains all the SMAT-files. These are so large, that the script caused the /tmp filesystem to completely fill up.

            I don’t think you really need this directory. And if you do include these SMAT-files in the tar, you’d have one hell of a job emailing the tar to someone!  ðŸ™‚

            Alexander Henket wrote:

            We do external support, where we sometimes need the site tarred and sent to us too. To that end we created a shell script called ‘mktar’ that’ll do the tarring for us. We place this in the $HCIROOT/usercmds/ directory so it can be called anywhere. Contents:

            <...>

            Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

          • #55892
            Kathy Zwilling
            Participant

              When tarring up a site, is it necessary to have the site down (processes shutdown and lock mgr/monitor daemon) before running the tar procedure if I want to create a mirror image of the site minus smat files for testing?

              Thank you!

            • #55893
              Robert Kersemakers
              Participant

                I have never brought down a site to make a tar. And I ‘ve never had any comments on those tars, so as far as I know there’s no need to bring the site down.

                Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

              • #55894
                Anonymous
                Participant

                  Hi All,

                  There’s two reasons why you might want to tar a site; one is to re-create a problem and the other is to archive.

                  If you want to re-create a problem then you probably want everything including the database.  In that case make sure that the tar file includes the exec directory where all the runtime files are located.

                  If you want to archive a site then don’t include the runtime files (database and logs).  When you make the tar just don’t inlcude the exec directory.

                  Each of us develops preferences when we do tasks like this.  My personal preference, when I make site tar’s, is to navigate into the site directory and tar exactly those files and directories that I want without the relative paths.  That way I can move the tar file into any empty site (i.e. the site name doesn’t matter) and unload the tar and I can give it to someone else and they don’t have to worry about the name of the site where they unload it.

                  I also wrote a script to do this automatically so that I could archive a version of my sites automatically.

              Viewing 4 reply threads
              • The forum ‘Support Web’ is closed to new topics and replies.