Introduction
Backups are an important consideration for any hosted system and should provide an easy and reliable method for recovering files in case of a mistaken file deletion or total system catastrophe. DigitalOcean provides a built-in backup system that can be enabled on any of your Droplets.
When Should I Use Backups?
Droplet backups are a convenient way to back up the disk contents of your Droplets, with no configuration required. They can be enabled for any Droplet, but may not be ideal for Droplets with a heavy I/O workload — such as database servers — since disk writes will have degraded performance while the backup snapshot is being created. Backups are taken once weekly for each Droplet where they’re enabled and are retained for four weeks.
If you’re looking for a one-time snapshot of your Droplet instead of an ongoing backup, then using a Snapshot may be more appropriate and cost effective. You can visit DigitalOcean Backups and Snapshots Explained to learn about the differences between backups and snapshots. If you require a more fine-grained backup solution, you can read about other options at How To Choose an Effective Backup Strategy for your VPS.
DigitalOcean Backups at a Glance
Pricing: Enabling backups for a Droplet adds 20% to the cost of the Droplet.
Retention: Backups are taken once per week, and each backup is retained for four weeks.
Availability: Backups are available for any Droplet and across all regions.
Enabling Backups on a New Droplet
To enable backups on a new Droplet, log in to your DigitalOcean account, open the Create menu, and select Droplets. Choose the distribution and Droplet size that fits your needs. Under the Select additional options header, click the Backups checkbox:
Note: Enabling backups for a Droplet adds 20% to the monthly Droplet cost.
Enabling Backups on an Existing Droplet
Even if you didn’t enable backups during Droplet creation, they can be enabled any time through the DigitalOcean Control Panel. To enable backups on an existing Droplet, navigate to the list of Droplets for your account, click the Droplet name for which you’d like to enable backups, and then click the Backups menu item. This will display the cost of backups for the given Droplet. Click the Enable Backups button to enable backups.
Backup Schedule
Once you’ve enabled backups, they will be scheduled to occur weekly during a specific time window which is automatically assigned by DigitalOcean. To view the time window when your backups will start, navigate to your Droplet in the DigitalOcean Control Panel, and click the Backups link. Backups for your Droplet will start sometime during that time window, but depending on when the backup is started and how large of a disk is being backed up, it may not complete by the end of the window listed.
Interacting With Backups
Once you have enabled backups for a Droplet, there are a few ways to interact with them. First, navigate to the Droplet in the DigitalOcean Control Panel, and then click the Backups link. Once at least one backup has been taken for your Droplet, it will be listed there with a drop-down menu offering the following options:
Convert to snapshot
Create Droplet
Restore Droplet
Convert to Snapshot
Choosing this option will convert the selected backup to a DigitalOcean snapshot. Unlike backups which are only retained for four weeks, a snapshot is retained indefinitely at the cost of $0.05/GB per month. When you choose to convert a backup to a snapshot, it will be removed from the list of available backups and added to the list of snapshots. This can be useful if there is a backup that you would like to retain for an extended period of time or if you would like to copy a snapshot to different regions — which is possible with a snapshot, but not with a backup.
Note: Once a backup is converted to a snapshot, snapshot pricing of $0.05/GB per month applies.
Create Droplet
Choosing Create Droplet from a backup allows you to create a new Droplet with the disk contents that were saved in the selected backup. This is useful for creating new Droplets with the same data and configuration as the Droplet being backed up. Alternatively, this can be used if you need to view or restore a small number of files to the original Droplet. Once the new Droplet is created from the backup, you will be able to copy files to the original Droplet using SCP or rsync. See How To Copy Files With Rsync Over SSH for more information on copying files between servers with rsync.
Restore Droplet
Selecting Restore Droplet from a backup will replace the current Droplet with the backup image. This will take your Droplet offline during the restore process, bringing it back online matching the point in time that the backup was taken. This is useful if you want to completely revert a Droplet to an older point in time, but you will lose any changes on the Droplet that happened after the backup was taken.
Disabling Backups
Backups can be disabled at any time under the Backups section of the Droplet Control Panel. Disabling backups will delete any existing backups for the Droplet, so if you want to retain any backup images, be sure to convert them to a snapshot before disabling backups.
What’s Next?
In this article, we’ve covered the basics of using Droplet backups for new or existing Droplets. Droplet backups are an effective, easy-to-configure backup solution for many Droplet use cases. However, they don’t fit every use case.
For on-demand or more frequent automated backups, see How To Use DigitalOcean Snapshots to Automatically Backup your Droplets.
If you’re working with databases, Understanding DigitalOcean Backups
For more control over what data is backed up and easier restoration of individual files, consider the options described in How To Choose an Effective Backup Strategy for your VPS.
خرید وی پی ان آنتی فیلترآنتی فیلتر