Skip to content

A routine for creating a snapshot of all your zones in UltraDNS

License

Notifications You must be signed in to change notification settings

sbarbett/udns_snapshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

udns_snapshot

This script provides a basic CLI for taking snapshots of all zones within an UltraDNS account. Additionally, there's functionality to restore zones to their most recent snapshots.

Features

  • Snapshot All Zones: Quickly generate snapshots for all zones in the UltraDNS account.
  • Restore Zones from Snapshots: Restore all zones to their most recent snapshot.
  • Selective Zone Processing: Specify a file to process only a subset of zones.

Prerequisites

  • Python 3.x
  • Libraries:
    • requests (should be automatically installed with ultra_auth)
    • tqdm
    • ultra_auth

Usage

  1. Clone the repository:

    git clone https://github.com/sbarbett/udns_snapshot.git
    
  2. Navigate to the directory:

    cd udns_snapshot
    
  3. Make sure the script is executable:

    chmod +x src/snapshot.py
    
  4. Run the script:

    ./src/snapshot.py [options]
    

    Options include:

    • Authentication:

      • -u or --username: Username for authentication.
      • -p or --password: Password for authentication.
      • -t or --token: Directly pass the Bearer token.
      • -r or --refresh-token: Pass the Refresh token (optional with --token).
    • Actions:

      • -s or --restore: Restore zones to their most recent snapshot.
      • -l or --log-file: Specify the log file name (default is output.log).
      • -d or --debug: Enable debug mode.
      • -z or --zones-file: Specify a file with a list of zones to process.

Notes

  • It's essential to use this script with caution, especially the restore functionality, as it's a destructive action that can't be undone.
  • By default, the script writes logs to output.log. You can change this with the -l option.

About

A routine for creating a snapshot of all your zones in UltraDNS

Topics

Resources

License

Stars

Watchers

Forks

Languages