Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added util to backup everydns records for all domains.
Needs everydnslib (http://hostingfu.com/article/everydns-python-api-and-command-shell)
- Loading branch information
Showing
3 changed files
with
416 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
username: your_username | ||
password: your_password | ||
|
Oops, something went wrong.