sudo -u postgres -i psql -h localhost -U bj -d bj -W -c "update t_server set ip = '<new_ip>' where ip= '<old_ip>';"
sudo -u postgres -i psql -h localhost -U bj -d bj -W -c "update rc_users set mail_host = '<new_ip>' where mail_host= '<old_ip>';"
sudo -u postgres -i psql -h localhost -U bj -d bj -W -c "update t_systemconf set configuration = configuration || hstore('host', '<new_ip>' || hstore('hz-member-address', '<new_ip>');"
sudo -u postgres -i psql -h localhost -U bj -d bj -W -c "update t_systemconf set configuration = configuration || hstore('host','<new_ip>') || hstore('hz-member-address', '<new_ip>');" |