Pages

Sunday, January 3, 2016

Previous value removed by cPanel transfer auto-merge

So i have been doing a hardware upgrade, and during the migration of the accounts, the target server named zone files got polluted with stuff like this:

( ; Previous value removed by cPanel restore auto-merge on 20151223145307 GMT
; 2015112200 ;Serial Number ; Previous value removed by cPanel restore auto-merge on 20151223145307 GMT
; 43200 ;refresh ; Previous value removed by cPanel restore auto-merge on 20151223145307 GMT
; 7200 ;retry ; Previous value removed by cPanel restore auto-merge on 20151223145307 GMT
; 2419200 ;expire ; Previous value removed by cPanel restore auto-merge on 20151223145307 GMT
; 86400 ;minimum ; Previous value removed by cPanel restore auto-merge on 20151223145307 GMT
; ) ; Previous value removed by cPanel restore auto-merge on 20151223145307 GMT



In order to clean things up, you can do something like this:

1 –  backup your named folder : cd /var;tar czf named.tgz named

2 – cd /var/named

perl -i.bak -ne ‘next if (/^; .+ ; Previous value removed by cPanel transfer auto-merge on/); print;’ /var/named/*.db

/scripts/restartsrv_named

/scripts/restartsrv_named

No comments:

Post a Comment