VPS Snapshots
Complete guide to creating, managing, and restoring VPS snapshots for backup and cloning purposes.
What are Snapshots?
Snapshots are point-in-time copies of your VPS instance, including:
- Operating system and all files
- Applications and configurations
- Data stored on the instance
- Complete system state at capture time
Snapshots vs Backups
| Feature | Snapshots | Traditional Backups |
|---|---|---|
| Speed | Very fast (minutes) | Slower (hours) |
| Downtime | None required | May require downtime |
| Restore | Complete system restore | File-level restore |
| Use Case | System cloning, migrations | Data recovery |
| Storage | Block-level | File-level |
Why Use Snapshots?
Backup Before Changes
Take a snapshot before:
- System updates
- Application upgrades
- Configuration changes
- Installing new software
- Database migrations
Disaster Recovery
- Quick recovery from failures
- Protection against mistakes
- Rollback bad deployments
- Restore corrupted systems
Cloning & Scaling
- Create identical instances
- Scale horizontally
- Test environments
- Development copies
Migration
- Move to a different host
- Upgrade instance size
- Change configurations
- Platform migration
Automated Snapshots
Every running VPS is snapshotted automatically on a daily schedule — no setup required. Automated snapshots:
- Run only while the instance is running, so you're never charged for wasted backups of stopped instances
- Are kept for a rolling retention window and cleaned up automatically once they age out
- Appear alongside your manual snapshots (tagged automated) and can be restored or cloned the same way
- Get a second copy in the platform backup store (see below)
You can still take manual snapshots anytime before risky changes — those are kept until you delete them, or until 30 days after you delete their VPS (see Snapshots of a Deleted VPS).
Second copies
Beyond the primary snapshot stored with your instance, snapshots are exported to the platform backup store, a separate storage system in the same datacenter. That is a second copy, not an offsite one: the protection label on a snapshot says second copy, and it reads as verified once the hourly check has confirmed the copy is there. That offsite export is also what makes cloning a snapshot into a brand-new instance possible. If an export fails, you can retry it from the Snapshots page.
Creating Snapshots
Via Dashboard
- Navigate to Pods (VPS)
- Click on your instance name
- Go to Snapshots tab
- Click Create Snapshot
- Enter snapshot details:
- Name: Descriptive name
- Description: Purpose and context
- Click Create
Creation Time: 2-5 minutes depending on disk size
Snapshot Naming Best Practices
Good Names:
pre-update-2024-10-11
before-nginx-upgrade
production-backup-daily
staging-clone-v2
migration-source
Poor Names:
snapshot1
backup
test
my-snapshot
Naming Convention
[environment]-[purpose]-[date]
prod-pre-deploy-2024-10-11
staging-backup-2024-10-11
dev-clone-2024-10-11
Snapshot Details
What's Included
- Operating System: All OS files
- Applications: Installed software
- Configurations: All config files
- Data: Application data, databases
- Users: User accounts and permissions
- Logs: System and application logs
What's Not Included
- RAM Contents: Active memory state
- Network Connections: Active connections
- Temporary Files: /tmp contents may vary
- Process State: Running processes
Best Practices Before Snapshot
Stop Services (optional but recommended):
Bash# Stop database sudo systemctl stop mysql # Stop application sudo systemctl stop nginxFlush Caches:
Bash# Sync filesystem sync # Drop caches sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'Database Backup:
Bash# MySQL mysqldump -u root -p --all-databases > backup.sql # PostgreSQL pg_dumpall > backup.sqlDocument State:
- Running services
- Important processes
- Configuration details
Managing Snapshots
View Snapshots
- Go to VPS instance page
- Click Snapshots tab
- See all snapshots:
- Name and description
- Creation date
- Size
- Status
Snapshot Statuses
- Creating: Snapshot in progress
- Available: Ready to use
- Restoring: Being restored
- Deleting: Being removed
- Error: Failed creation/restore
Snapshot status and progress update live on the page — no refresh needed — including offsite export progress.
Delete Snapshot
Warning: Deletion is permanent!
- Go to Snapshots tab
- Click Delete next to snapshot
- Confirm deletion
- Snapshot removed immediately
Only the project owner and administrators can do this. An editor can create snapshots and clone one into a new instance.
Note: You're charged for snapshot storage until the snapshot is deleted.
Snapshots of a Deleted VPS
Deleting a VPS deletes its automated snapshots with it. Its manual snapshots stay, with their second copies, for 30 days after the VPS is deleted, and are then deleted automatically. They're billed for snapshot storage until then. The API's snapshot list keeps showing them: vps_instance.deleted_at says when the VPS was deleted, and expires_at says when the snapshot will be deleted.
Restoring from Snapshots
Replace the Existing Instance
Warning: This puts the snapshot's data back into your current instance; everything written after the snapshot is lost.
Only the project owner and administrators can do this, because it replaces the disk. An editor can create snapshots and clone one into a new instance.
You can start it from either the per-instance Snapshots tab or the Backups & recovery page. When replacing is open for your account, the action opens the restore wizard in replace mode: a safety snapshot of the current disk is taken first unless you decline it, the review states the data-loss cutoff, and you type the instance name to confirm. The wizard uses the local snapshot while it is intact, otherwise the exported copy.
- Back up current data if needed
- Go to the Snapshots tab on the instance page, or open Backups & recovery in the sidebar
- Choose Replace existing next to the snapshot
- Review the impact, type the instance name, and start the restore
- Follow the operation page; a restore takes 5-10 minutes from a local snapshot and longer from the exported copy
What Happens:
- The VM is stopped if running
- Disk data is replaced with the snapshot contents
- The VM is restarted automatically
- Any data created after the snapshot will be lost
Create New Instance from Snapshot (Clone)
Safer option - doesn't affect the existing instance. A snapshot is not tied to the instance it came from: you can create separate new VPS instances from it, one after another. Each new VPS needs its own unique name, and only one clone runs at a time per snapshot: wait for one to finish before starting the next. Each new VPS is billed like any VPS, at the current price of the source's plan.
Cloning a VPS from a snapshot uses the export-based clone workflow, which requires the snapshot's exported copy to be completed first.
Prerequisites:
- Snapshot status must be Ready
- Export (the second copy) must be Completed
- No other clone operation in progress for this snapshot
If the button is greyed out, hover it or open the snapshot's details: they say why, for example that the second copy is still being made. If the reason says the feature is not available on your account yet, contact support to have it turned on.
Steps:
- Go to the Snapshots tab on the instance page, or open Backups & recovery in the sidebar
- Click Create new VPS from snapshot (copy icon) next to an eligible snapshot, or in the snapshot's details panel
- Enter a name in the New VPS name field for the new VPS instance (lowercase letters, numbers, and hyphens; 3-32 characters)
- Click Create new VPS from snapshot
Clone Process: The clone operation downloads the snapshot data from offsite storage, decompresses it, and deploys a new VPS. You can track progress through these stages:
- Preparing - Setting up the clone operation
- Downloading - Retrieving snapshot data from S3 storage
- Decompressing - Extracting the disk image
- Importing - Creating the new disk volume
- Deploying - Launching the new VPS instance
What the New VPS Inherits:
- Operating system and all files from the snapshot
- Plan, CPU, memory, disk size, image, datacenter and CPU platform of the original instance
Sign-in and network: the new VPS signs in like the original: the same root password when the original used one, and the original's SSH key as long as that key has not been deleted. It is ordered on the original's network tier: a clone of a 10 Gb VPS gets, and is billed for, the 10 Gb add-on when its host can provide it.
Firewall: the new VPS gets its own default firewall, as a newly ordered VPS does: SSH (22), HTTP (80) and HTTPS (443) are open inbound, all other inbound TCP is blocked, and outbound SMTP (25 and 465) is blocked. If the original served other ports, open them on the new VPS's firewall.
Not Carried Over: the original's firewalls, attached volumes, private network attachments and floating IPs stay with the original. Attach them to the new VPS yourself if you need them. When no public IPv4 address is free for a clone, you can give it one of your reserved Floating IPs as its primary address instead (the API takes primary_ipv4_floating_ip_id on POST /snapshots/vps/{id}/clone).
What's New:
- New IPv4 (and optionally IPv6) address
- New MAC address
- New instance name
Duration: 10-30 minutes depending on disk size.
Centralized Snapshots Page
Open Backups & recovery in the sidebar to access the centralized page at /snapshots. This page shows all snapshot types (VPS, Cache, Database) in a single view.
Features:
- Filter by instance type (VPS, Cache, Database), status, and automated/manual
- Search by instance name
- Restore any snapshot to its parent instance
- Create new VPS from snapshot (for VPS; Restore to new resource for caches and databases) to create a new instance from a snapshot
- Delete snapshots that are no longer needed
- Retry failed offsite backups
Restoring a snapshot over its instance and deleting a snapshot are for the project owner and administrators, for every snapshot type on this page. An editor can filter, search, clone and retry.
After Restore
Verify System:
Bash# Check system status uptime df -h free -h # Verify services sudo systemctl status nginx sudo systemctl status mysqlUpdate Configurations:
- Update IP addresses
- Update DNS records
- Update environment variables
- Update API endpoints
Start Services:
Bashsudo systemctl start nginx sudo systemctl start mysql sudo systemctl start your-app
Snapshot Use Cases
Use Case 1: Safe System Updates
Scenario: Ubuntu system update
# 1. Create snapshot via dashboard
# Name: "pre-update-2024-10-11"
# 2. Perform update
sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
# 3. Test system
# If problems occur, restore from snapshot
# If all good, keep running
# 4. Delete old snapshot after confirmed working
Use Case 2: Application Deployment
Scenario: Deploy new application version
# 1. Create snapshot
# Name: "pre-deploy-v2.0"
# 2. Deploy new version
git pull origin main
npm install
npm run build
sudo systemctl restart app
# 3. Test thoroughly
# If issues, restore snapshot
# If successful, keep and delete old snapshot
Use Case 3: Development Environment
Scenario: Create dev copy of production
- Create snapshot of production instance
- Restore to new instance
- Rename new instance to "dev-environment"
- Update configurations:
- Change database credentials
- Update API keys (use test keys)
- Disable production integrations
- Update application URLs
Use Case 4: Horizontal Scaling
Scenario: Add more web servers
Prepare one server perfectly:
- Install all software
- Configure everything
- Test thoroughly
Create snapshot "web-server-template"
Create multiple instances from snapshot:
- web-server-01
- web-server-02
- web-server-03
Configure load balancer to distribute traffic
Use Case 5: Migration
Scenario: Move to larger instance
- Create snapshot of current instance
- Create new instance from snapshot
- Choose a larger profile
- Test new instance
- Update DNS to point to new instance
- Delete old instance
- Delete old snapshot
Automation with API
VPS snapshots have their own endpoints, under https://danubedata.ro/api/v1/snapshots/vps. The API token needs snapshot:read to list snapshots, snapshot:write to create them and snapshot:delete to delete them.
Create Snapshot
import requests
from datetime import datetime
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
data = {
"vps_instance_id": "vps-abc123",
"name": f"auto-backup-{datetime.now().strftime('%Y-%m-%d')}",
"description": "Automated daily backup"
}
response = requests.post(
"https://danubedata.ro/api/v1/snapshots/vps",
headers=headers,
json=data
)
snapshot = response.json()["snapshot"]
print(f"Snapshot created: {snapshot['id']}")
List Snapshots
The list covers every VPS in your team, newest first, a page at a time. Each snapshot names its vps_instance_id. Snapshots of a deleted VPS stay in the list until they expire: their vps_instance.deleted_at is set, and expires_at says when they will be deleted.
response = requests.get(
"https://danubedata.ro/api/v1/snapshots/vps",
headers=headers,
params={"per_page": 200}
)
snapshots = response.json()["data"]
for snap in snapshots:
if snap["vps_instance_id"] == "vps-abc123":
print(f"{snap['name']}: {snap['created_at']}")
Automated Daily Backup Script
#!/usr/bin/env python3
import requests
import os
from datetime import datetime, timedelta, timezone
API_TOKEN = os.environ['DANUBEDATA_API_TOKEN']
VPS_ID = "vps-abc123"
RETENTION_DAYS = 7
headers = {
"Authorization": f"Bearer {API_TOKEN}",
"Content-Type": "application/json"
}
# Create new snapshot
data = {
"vps_instance_id": VPS_ID,
"name": f"daily-backup-{datetime.now().strftime('%Y-%m-%d')}",
"description": f"Automated backup - {datetime.now()}"
}
response = requests.post(
"https://danubedata.ro/api/v1/snapshots/vps",
headers=headers,
json=data
)
if response.status_code == 201:
print(f"Snapshot created successfully")
else:
print(f"Error: {response.json()}")
exit(1)
# Delete old snapshots of this VPS. The oldest are on the last pages.
snapshots = []
page = 1
while True:
response = requests.get(
"https://danubedata.ro/api/v1/snapshots/vps",
headers=headers,
params={"per_page": 200, "page": page}
)
body = response.json()
snapshots += body["data"]
if page >= body["pagination"]["last_page"]:
break
page += 1
cutoff_date = datetime.now(timezone.utc) - timedelta(days=RETENTION_DAYS)
for snap in snapshots:
if snap['vps_instance_id'] != VPS_ID:
continue
snap_date = datetime.fromisoformat(snap['created_at'].replace('Z', '+00:00'))
if snap_date < cutoff_date and snap['name'].startswith('daily-backup'):
print(f"Deleting old snapshot: {snap['name']}")
requests.delete(
f"https://danubedata.ro/api/v1/snapshots/vps/{snap['id']}",
headers=headers
)
Schedule with Cron:
# Add to crontab
0 2 * * * /usr/local/bin/backup-vps.py
Snapshot Pricing
Storage Costs
- Price: €0.073 per GB per month
- Billed: Hourly (prorated)
- Size: Based on used disk space
Cost Examples
| Instance Size | Used Space | Monthly Cost |
|---|---|---|
| 20 GB disk | 10 GB used | €0.73 |
| 40 GB disk | 25 GB used | €1.83 |
| 80 GB disk | 40 GB used | €2.92 |
| 160 GB disk | 80 GB used | €5.84 |
Cost Optimization
- Delete old snapshots regularly
- Clean disk before snapshot:Bash
sudo apt clean sudo journalctl --vacuum-time=7d docker system prune -a - Keep only necessary snapshots
- Use compression before snapshot
- Remove unused files
Best Practices
Regular Snapshots
Daily Production:
- Before any changes
- Automated nightly backups
- Keep 7 days
Weekly Development:
- End of sprint
- Before major updates
- Keep 4 weeks
Pre-Change Always:
- Before system updates
- Before deployments
- Before configuration changes
Naming Strategy
[frequency]-[environment]-[date]
daily-prod-2024-10-11
weekly-staging-2024-10-11
pre-deploy-prod-2024-10-11
Testing Restores
Monthly: Test restore process
- Create test instance from snapshot
- Verify all services work
- Confirm data integrity
- Document restore time
- Delete test instance
Documentation
Keep a snapshot log:
Date | Name | Purpose | Retention
-----------|-------------------|-------------------|----------
2024-10-11 | pre-update-v2 | Before Ubuntu 24 | 30 days
2024-10-11 | daily-prod | Daily backup | 7 days
2024-10-10 | pre-deploy-api | Before API v3 | 14 days
Troubleshooting
Snapshot Creation Fails
Check:
- Disk space available
- Instance is running
- No other operations in progress
- Account limits not exceeded
Solution:
# Free up space
sudo apt clean
sudo journalctl --vacuum-time=7d
rm -rf /tmp/*
# Check disk
df -h
Restore Fails
Possible Causes:
- Insufficient resources
- Snapshot corrupted
- Network issues
Solution:
- Try again
- Contact support
- Use different snapshot
- Check system logs
Slow Snapshot Creation
Factors:
- Disk size
- Data amount
- Disk activity
- Network speed
Optimization:
- Stop services temporarily
- Reduce disk I/O
- Schedule during low-traffic
- Clean disk before snapshot
Limitations
Size Limits
- Maximum snapshot size: Based on disk size
- Storage per account: Check account limits
Quantity Limits
- Snapshots per instance: 50 (default)
- Request increase if needed
Region
- Snapshots are stored redundantly in the same region (Falkenstein, Germany)
- For offsite copies, download or export the snapshot
Time Limits
- Creation time: 2-10 minutes
- Restore time: 5-15 minutes
- Depends on size
Security Considerations
Data Protection
Warning: The local snapshot is stored unencrypted, like the disk it copies. Encrypt sensitive data inside the server if it must be encrypted at rest.
- Access Control: Only account members can access
- Isolated Storage: Separate from instance storage
- Backup Redundancy: Multiple copies maintained
Sensitive Data
Before Snapshot:
- Review for sensitive data
- Remove temporary secrets
- Clear logs with sensitive info
- Document included credentials
After Restore:
- Rotate credentials
- Update API keys
- Change passwords
- Verify access controls
Next Steps
Need help with snapshots? Contact support through the dashboard.