Skip to content

Commit

Permalink
Added util to backup everydns records for all domains.
Browse files Browse the repository at this point in the history
  • Loading branch information
amit committed Nov 17, 2009
1 parent f6a3101 commit f38b127
Show file tree
Hide file tree
Showing 3 changed files with 416 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backup_all.py
@@ -0,0 +1,12 @@
import everydnslib,yaml
from time import strftime
filename="dnsbackup-"+strftime("%Y%m%d-%H%M%S")+".yml"
data=yaml.load(file('config.yml').read())
e=everydnslib.EveryDNS(data['username'], data['password'])
records = e.cache_domains()
for record in records:
record['records'] = e.cache_records(record['domain'])
f= open(filename, "w")
yaml.dump(records,f)
f.close()

3 changes: 3 additions & 0 deletions config.yml
@@ -0,0 +1,3 @@
username: your_username
password: your_password

0 comments on commit f38b127

Please sign in to comment.