2 Replies Latest reply: Feb 15, 2011 7:12 AM by YoungWinston RSS

    Clone Sun

    580095
      We have a Sun machine that contains only one application, we intend to discontinue this machine and pass this application to a new server Sun.
      Since the costs of migration of applications is very high (time and resources involved) we seek a solution that allows copying the file system of the old machine to new machine.

      There is the possibility of cloning the old machine to new machine? or only just the file system that contains the application?

      Thank's in advance.
        • 1. Re: Clone Sun
          PhHein
          Moderator action: thread moved from Java Programming
          • 2. Re: Clone Sun
            YoungWinston
            RMSoares wrote:
            We have a Sun machine that contains only one application, we intend to discontinue this machine and pass this application to a new server Sun.
            Since the costs of migration of applications is very high (time and resources involved) we seek a solution that allows copying the file system of the old machine to new machine.

            There is the possibility of cloning the old machine to new machine? or only just the file system that contains the application?
            Back when I did that stuff, we used to use 'tar', which work for any directory structure, regardless of filesystem, providing you run it as root, viz:
            cd {source-directory};
            tar cf - .|{ cd {target-directory}; tar xvf - ;}
            If your app is fully contained under a single root directory, you can use the above technique to copy the entire structure. You'll probably have to add an ssh step in there if your source machine can't "see" the target one.

            Winston

            Edited by: YoungWinston on Feb 15, 2011 2:02 PM

            PS: *You should make sure that all users and groups are moved over from the old machine before you do your structure copy*; and a slightly easier alternative to the piped version above is
            # Old machine:
            cd {source-directory}
            tar cvf . app.tar
            # copy over the resulting app.tar file to the target directory on the new machine.
            # New machine:
            cd {target-directory}
            tar xvf app.tar
            You can also compress the tar file contents (if I remember right, you add a 'B' to the flags in both directions; ie, 'tar cvfB ...').

            HIH