Table of contents of the article:
Datto BD (business continuity) is a data backup and recovery solution designed to help small and medium-sized businesses protect their data from accidental loss or disaster recovery.
The solution offers a combination of backup, snapshots and data replication to ensure that data is always available and easily recoverable should the need arise.
Datto BD is a collection of hardware and software devices designed to work together to protect your company's data. The hardware appliance is a physical backup unit that is installed in the company office. This drive is then connected to the backup and recovery software, which is responsible for creating and maintaining data backups and snapshots.
Datto BD's solution is designed to be easy to use and configure, meaning that even companies with little or no IT staff can use it easily. The backup and restore software is intuitive and offers a simple and easy to use user interface. Additionally, Datto BD offers a number of advanced options for businesses that have more complex needs.
Datto BD main features: Backup, Snapshot, Restore, Replicate
The main features of Datto BD are backup, snapshots, restore and data replication.
- Backup: Datto BD automatically creates copies of your company's data so you can recover it in the event of an accidental loss or disaster event. Datto BD's backup software can be configured to create backups on a specific schedule or to create real-time backups. Additionally, Datto BD offers the ability to create incremental backups, which only copy the data that has changed since the last full backup, reducing the time needed to back up and the storage space needed.
- Snapshot: Datto BD creates snapshots of company data, which allows you to restore data to a specific point in time. Snapshots are useful for recovering data in the event of accidental file loss or human error, as they allow you to restore data to a point in time before the loss or error.
- Restoration: Datto BD offers a variety of data recovery options, including recovery of individual files or folders, recovery of entire systems, and recovery to a specific snapshot point. In addition, Datto BD offers the ability to restore data to another hardware drive or to a virtual machine, which means that data can be restored even in the event of total loss of the original hardware.
- Reply: Datto BD offers the ability to replicate data to another Datto BD drive or virtual machine, meaning that data can be recovered even in the event of total loss of the original office. Additionally, Datto BD can be configured to replicate data in real-time, meaning data is always available for recovery even in the event of a disaster.
Benefits of using Datto BD: Reduced downtime, Increased data reliability, Protection against data loss
Using Datto BD can provide many benefits for businesses, including reduced downtime, increased data reliability, and protection against data loss.
- Reduction of downtime: Datto BD automatically creates copies of your company's data so you can recover it in the event of an accidental loss or disaster event. In the event of data loss, businesses can quickly restore data from a backup or snapshot, meaning minimal downtime. In addition, Datto BD offers the ability to restore data to another hardware drive or to a virtual machine, which means that data can be restored even in the event of total loss of the original hardware, further reducing recovery time. inactivity.
- Greater data reliability: Datto BD creates backup copies of your company data so you can restore it in case of accidental loss or disaster event. Additionally, Datto BD can be configured to create data snapshots, which means that data can be restored to a specific point in time. This means that data is always available and easily recoverable, increasing its reliability.
- Data loss protection: Datto BD offers a variety of data backup, recovery and replication options, which are designed to protect your company's data from accidental loss or disaster events. Additionally, Datto BD can be configured to replicate data to another Datto BD drive or virtual machine, meaning that data can be recovered even in the event of total loss of the original office. This ensures that your company's data is always protected and available for recovery.
Use cases: SMB backup, cloud data protection, disaster recovery
Datto BD is a versatile solution that can be used in different use cases to meet the needs of small and medium businesses, for data protection in the cloud and for disaster recovery.
- Backup for small and medium businesses: Datto BD is an ideal solution for small and medium businesses as it offers a number of data backup, recovery and data replication options, which are designed to protect your business data from accidental loss or disaster. In addition, Datto BD is easy to use and configure, which means that small and medium-sized businesses can protect their data without having to hire an IT expert.
- Data protection in the cloud: Datto BD can be used to protect your data in the cloud, creating backup copies of your company data on one or more Datto BD drives or in a virtual machine. This ensures that company data is always protected and available for recovery even in the event of an accidental loss or disaster event.
- Disaster recovery: Datto BD can be configured to replicate data to another Datto BD drive or virtual machine, meaning that data can be recovered even in the event of total loss of the original office. Additionally, Datto BD offers the ability to restore data to another hardware drive or to a virtual machine, which means that data can be restored even in the event of a total loss of the original hardware. This ensures that company data is always protected and available for recovery in the event of a disaster event.
The snapshot problem in Linux
There are some basic tools in Linux for creating copy-on-write (COW) snapshots of filesystems. Among the most popular are LVM and device mapper (which LVM is built upon). Unfortunately, both have limitations that make them unsuitable for supporting snapshotting of servers running across disparate Linux environments. Both require an unused volume to be available on the machine to track the COW data. Servers, especially production ones, may not be preconfigured with the required backup volume. Also, these snapshotting systems only allow you to make a read-only volume writable.
Running backup requires dismounting the data volume, setting up a snapshot, mounting the snapshot, and then using a tool like dd or rsync to copy the original volume to a safe location. Many production servers simply cannot be powered down long enough to do this, and also any new data on the COW must eventually be merged back into the original volume (which requires even more downtime). This is practically impossible and extremely complicated, not to mention how inelegant it is.
Datto Block Driver (Linux Kernel Module / Driver)
The Datto Block Driver (dattobd) fixes the above problems and brings VSS-like functionality to Windows to a wide range of Linux kernels. Dattobd is an open source Linux kernel module for exact point real-time snapshotting. Dattobd can be loaded on a running Linux machine (no reboot) and creates a COW file on the original volume representing any block device at the time the snapshot is taken. After the first snapshot, the driver tracks incremental changes to the block device and then can be used to effectively update existing backups by copying only changed blocks. Dattobd is a true running snapshotting system that leaves the root volume running and available, without requiring a reboot.
Dattobd is designed to run on any Linux device, from small test VMs to running production servers, with minimal impact on I/O or CPU performance. Since the driver works at the block level, it supports most common filesystems, including ext 2,3 and 4 and xfs (although filesystems with their own block device management systems such as ZFS and BTRFS may not be supported) . All COW data is tracked to a file on the source block device itself, eliminating the need for a spare volume to take the snapshot.
Perform performing Incremental Backups
The main use of Dattobd is to backup running Linux systems. The general flow is to create a snapshot, copy it and move the snapshot in “incremental” mode. After that, you can move the incremental back to snapshot mode and efficiently update the first created backup. You can repeat this process to continue updating the backup image. Below is an example of using the driver for this purpose on a simple Ubuntu 12.04 installation with a single root volume at /dev/sda1. In this case, we are copying to another (larger) volume mounted at /backups. Other Linux distributions should work similarly, with minor changes.
1. Install the driver and related tools. Instructions for doing this are explained in INSTALL.md.
2. Create a snapshot:
dbdctl setup-snapshot /dev/sda1 /.datto 0
This will create a snapshot of the root volume at /dev/datto0 with a supporting COW file at /.datto. This file must exist on the volume that will be snapshotted.
3. Copy the image from the block device:
dd if=/dev/datto0 of=/backups/sda1-bkp bs=1M
dd is a standard image copy tool in Linux. In this case it simply copies the contents of the /dev/datto0 device into an image. Be careful when running this command as it can severely corrupt file systems if used incorrectly. NEVER run dd with the "of" parameter pointing to a volume that has important data on it. This can take some time to copy the entire volume. See the dd man page for more details.
4. Move the snapshot in incremental mode:
dbdctl transition-to-incremental 0
This command requests the driver to move the snapshot (/dev/datto0) in incremental mode. From now on, the driver will only track the block addresses that have changed (without the data itself). This mode is less system intensive, but is important later when we want to update /backups/sda1-bkp to reflect a later filesystem snapshot.
5. Continue using your system. After the initial backup, the driver will likely be in incremental mode most of the time.
6. Move incremental back in snapshot mode:
dbdctl transition-to-snapshot /.datto1 0
This command requires the name of a new COW file to start tracking changes again (here we chose /.datto1). At this point the driver is finished with our /.datto file that we created in step 2. The /.datto file now contains a list of blocks that have changed since our initial snapshot. We will use this in the next step to update our backup image. It's important not to use the same file name that we specified in step 2 for this command. Otherwise, we would overwrite the modified block list.
7. Copy the changes:
update-img /dev/datto0 /.datto /backups/sda1-bkp
Here we can use the update-img tool included with the driver. It takes 3 parameters: a snapshot (/dev/datto0), the list of modified blocks (/.datto from step 1) and an original backup image (/backups/sda1-bkp created in step 3). Copy the blocks listed in the block list from the new snapshot to the existing image, effectively updating the image.
8. Clean up leftover file:
rm /.datto
9. Go back to step 4 and repeat:
Keep in mind that it is important to specify a different COW file path for each use. If you use the same file name, you will overwrite the modified block list. As a result, you'll need to use dd to do a full copy again instead of using the faster update-img tool (which only copies changed blocks).
If you want to keep multiple versions of the image, we recommend copying your images to a snapshot file system (such as BTRFS or ZFS). You can then create a snapshot of the images after updating them (step 3 for full backup or 7 for differential). This will allow you to maintain a revision history of the image.
Driver Status
The current status of the dattobd driver can be read from the file /proc/datto-info. This is a JSON formatted file with 2 fields: a version number "version" and an array of "devices". Each device has the following fields:
minor: The minor number of the snapshot (for identification purposes).
cow_file: The path to the cow file relative to the block device mount point. If the device is in an unverified state, the path is presented as given to the driver. block_device: The block device tracked by this device.
max_cache: The maximum amount of memory that can be used for metadata cache for this device (in bytes).
fallocate: The pre-allocated size of the cow file (in bytes). This will not be printed if the device is in an unverified state.
seq_id: The sequence id of the snapshot. This number starts at 1 for new snapshots and is incremented on each snapshot transition.
uuid: Uniquely identifies a set of snapshots. It is not changed during state transition. error: This field will only be present if the device has failed. Shows the standard linux error code indicating what went wrong. More specific information is printed to dmesg.
state: An integer representing the current working state of the device. There are 6 possible states; for more information on these, refer to STRUCTURE.md.
0 = incremental dormant
1 = dormant snapshot
2 = incremental active
3 = snapshot active
4 = incremental not verified
5 = snapshot not verified nr_changed_blocks: The number of blocks that have changed since the last snapshot. version: On-disk format version of the COW header.