Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.
/ backup4vultr.py Public archive

A script for backup Vultr Server by use snapshot.

License

Notifications You must be signed in to change notification settings

myuki/backup4vultr.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A script for backup Vultr Server

Use snapshot to backup Vultr VPS. It can delete the oldest snapshot when it reaches the limit.

You can specify the limit or use the default limit (Each Vultr account has 10 quotas). You also can specify which snapshot should be reserved and not be deleted.

By use cron, it can be used to auto backup Vultr Server.

0 0 */7 * * python3 .../backup4vultr.py/backup4vultr.py backup > /dev/null 2>&1

Command

list - List all instances and snapshots

backup - Backup by create a snapshot (Delete the oldest snapshot if snapshots reach the limit)

config.json

If config.json doesn't exist, it will use the default value in backup4vultr.py. You also can direct modify the backup4vultr.py to config if you like.

{
  "apiToken": "",
  "instanceID": "",
  "description": "snapshot4vultr.py",
  "reservedSnapshotList": [
    "137e9227-657f-480d-a325-e643310d112b"
  ],
  "reservedSnapshotDescription": [
    "Description substring1",
    "Description substring2"
  ]
}

You can specify which snapshots need be reserved. Also, you can use description to mark snapshots to be reserved. Each value is independent and will take effect if the description includes the value.

Dependencies

requests

About

A script for backup Vultr Server by use snapshot.

Topics

Resources

License

Stars

Watchers

Forks

Languages