Symptoms
-
Migrating a subscription to a new Plesk server fails:
Plesk restore report problem:
Execution of /usr/local/psa/admin/plib/api-cli/dns.php --set example.com -list /usr/local/psa/PMM/tmp/pmm-dns-fQ7RWv -ignore-nonexistent-options failed with return code 1.
Stderr is
Incorrect DNS record values were specified: ns1.example.com. IN A 203.0.113.2: ('ttl' = '0')
Incorrect DNS record values were specified: example.com. IN NS ns2.example.com.: ('ttl' = '0')
Incorrect DNS record values were specified: ns2.example.com. IN A 203.0.113.3: ('ttl' = '0')
Incorrect DNS record values were specified: example.com. IN NS ns1.example.com.: ('ttl' = '0') -
Unable to restore the mentioned DNS zone from a backup:
Warning: Restore DNS zone "example.com"
Execution of "C:Program Files (x86)Pleskbindns.exe" --set example.com -list "C:Program Files (x86)PleskPMMtmp/pmm-dns-01xABCx0" -ignore-nonexistent-options failed with return code 1.
Stderr is
Incorrect DNS record values were specified: host.example.com. IN A 203.0.113.3: ('ttl' = '0') -
Unable to create a DNS record on Plesk with TTL = 0:
Value is invalid. It can be from 1 second to 2147483647 seconds.
Cause
Plesk bug #PPPM-13621 "DNS records with TTL 0 cannot be used."
Resolution
Until the bug is fixed, apply one the following workarounds:
Change the DNS records on the source server before migration:
-
Connect to the source server via SSH.
-
Update the
ttl
value for these records to the default one:# plesk db
update dns_recs set ttl=DEFAULT(ttl) where ttl=0;
Query OK, 767 rows affected (0.047 sec)
Rows matched: 767 Changed: 767 Warnings: 0select * from dns_recs where ttl=0;
Empty set (0.003 sec) -
Re-sync the migration on the destination server.
-
Customize TTL on the destination server using the following request to the database for the required DNS record:
# plesk db "update dns_recs set ttl=0 where host like '%affected_record%';"