Find the answer to your Linux question:
Results 1 to 9 of 9
How can I transfer all my centos settings and installed programs to another centos installation ?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    34

    moving centos


    How can I transfer all my centos settings and installed programs to another centos installation ?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,383
    1) manually
    - by listing all installed rpms & installing them on the new machine
    - copying all needed configs
    2) by creating manifests for puppet according to what the old machine has and applying these to the new one

    2) is better, as it will ensure repeatablility and a "living documentation" (at least for the ones who can read manifests)
    You must always face the curtain with a bow.

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,383
    Be aware though, that moving between major versions of centos requires extra care.
    You must always face the curtain with a bow.

  4. #4
    Just Joined!
    Join Date
    Feb 2013
    Posts
    34
    Quote Originally Posted by Irithori View Post
    2) by creating manifests for puppet according to what the old machine has and applying these to the new one
    Can you explain better what is this ?

  5. #5
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,383
    puppet is a system and configuration management tool.
    There is an agent on each node and a central server (plus some components)
    The idea is to write "manifests", that describe how a particular service (apache, ntp, <whatever> ) needs to be installed and configured, based on e.g. environment or other criteria.

    So you do no longer manually configure server by server via ssh or local console.
    You design and code manifests according to your needs and can then use these to setup and control an arbitrary number of machines.
    It no longer matters if you have 1 or 1000 machines.

    At the same time, manifests act as kind of documentation. At least for devops guys.
    As you no longer login to a machine and modify stuff but rather modify manifests, these manifests always represent what is going on on the machines.
    The central server also collects a lot of data of the nodes, which can be used to draw pretty graphs for management.
    You must always face the curtain with a bow.

  6. #6
    Just Joined!
    Join Date
    Feb 2013
    Posts
    34
    puppet seems quite complex, isn't there something easier ?

  7. #7
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,383
    Well, puppet, chef and cfengine are most popular.
    These are also the tools with the most external documentation and support.
    But recently Ansible caught my eye. Seems quite promising.

    If you dont want to learn such a tool and have only one machine to move, then maybe the manual way is more suited.
    You must always face the curtain with a bow.

  8. #8
    Just Joined!
    Join Date
    Feb 2013
    Posts
    34
    how can I manually install hundreds of packets, this need too many time ...

  9. #9
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,383
    Well, the packages are the least of the problem.
    Just installing a base centos will put most of them on a given machine.
    Then you add the ones you need.

    If you want to clone the package list from one machine to another, then this can be done as well.
    Note: You need to stay within a major version of centos.

    With this you can create a package list on the old machine, that you can feed to the yum command on the new one.
    Code:
    rpm -qa --queryformat '%{NAME}\n' |sort |uniq |xargs echo -n

    Config and datafiles will probably take more time to migrate.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •