I need to add printer queues to /etc/hosts for a variety of reasons; this is not a recommended approach though. I am running two sets of dual nodes; prod1 & prod2; prodstby1 & prodstby2.
What I am trying to do is:
1) modify /etc/hosts of prod1 and let /etc/hosts of prod2 pick up the change on /etc/hosts of prod1
We can simply overwrite /etc/hosts of prod2 with /etc/hosts of prod1, but if there is a way that it just appends the new entry added of prod1 onto /etc/hosts of prod2, that will be great. Also, we can run crontab to overwrite/append on certain intervals (every hour, every two hours, etc). But, I am wondering if it recognizes the change on /etc/hosts of prod1 and then overwrite/append whenever the change occurs.
2) make copy of /etc/hosts file under /etc
Backing up file is critical always. I like to back up /etc/hosts with the naming convention i.e. hosts200708011235 (yyyymmddhhmm) so that I know when the backup was made
3) Now, copying /etc/hosts to prodstby1 & prodstby2
prod1 & prod2; prodstby1 & prodstby2 have two different /etc/hosts entries, so I can’t just overwrite /etc/hosts of prodstby1 & prodstby2 with the one of prod1 & prod2. If I can append the change on /etc/hosts of prod1, it will be great. If not, I need to rcp the latest /etc/hosts file, i.e. hosts200708011235, to prodstby1 & prodstby2.
Please let me know how to accomplish these tasks.
thx so much
What I am trying to do is:
1) modify /etc/hosts of prod1 and let /etc/hosts of prod2 pick up the change on /etc/hosts of prod1
We can simply overwrite /etc/hosts of prod2 with /etc/hosts of prod1, but if there is a way that it just appends the new entry added of prod1 onto /etc/hosts of prod2, that will be great. Also, we can run crontab to overwrite/append on certain intervals (every hour, every two hours, etc). But, I am wondering if it recognizes the change on /etc/hosts of prod1 and then overwrite/append whenever the change occurs.
2) make copy of /etc/hosts file under /etc
Backing up file is critical always. I like to back up /etc/hosts with the naming convention i.e. hosts200708011235 (yyyymmddhhmm) so that I know when the backup was made
3) Now, copying /etc/hosts to prodstby1 & prodstby2
prod1 & prod2; prodstby1 & prodstby2 have two different /etc/hosts entries, so I can’t just overwrite /etc/hosts of prodstby1 & prodstby2 with the one of prod1 & prod2. If I can append the change on /etc/hosts of prod1, it will be great. If not, I need to rcp the latest /etc/hosts file, i.e. hosts200708011235, to prodstby1 & prodstby2.
Please let me know how to accomplish these tasks.
thx so much