Fire in the datacenter, that’s one of the last things you ever consider as a risk factor in your business, but even in the year 2021, it is still a possibility, despite all the safeguards and electronic monitoring systems. After a devastating fire in OVH, one of the biggest datacenters in Europe, millions of websites went offline for a while and some lost their precious data, because they did not have an offsite backup or a database node.
Europe’s largest cloud services provider told clients including the French government, the Centre Pompidou and cryptocurrency exchange Deribit to activate their disaster recovery plans following the blaze.
There are a lot of things that can go wrong in your servers and fire is only a small possibility. Hardware failures, security vulnerabilities, compromised auth credentials, software bugs and faulty codes, unintentional deletion of files, all can lead to permanent data loss, if you and your business are not prepared enough.
Most people are aware of the importance of having a local backup and setup periodic backups and snapshots, but maintaining a backup on your server, without also creating an offsite backup, relies on the assumption that this server is safe from mishaps.
Big companies like Apple, Google and Facebook also take natural disasters like an earthquake, flood or even war into account. That’s why they have datacenters in other continents.
Having backups in another cloud service or server which is in a different geographical location helps to lower the damage in case of data loss. Today, the cloud backup market has become saturated, offering consumers a wide variety of services from which to choose. In addition to free services such as the basic versions of Google Drive or DropBox, users can also pay for a cloud backup provider tailored to their unique needs. No two businesses are alike, and there are several factors to take into consideration when choosing a backup service provider.
You can also use an S3 object storage or a simple FTP/SFTP to store backups in an offsite location.
When disaster strikes, you can use your backups to spin a new server up in another datacenter and don’t wait for the firefighters to put off the fire. Everyone is concerned about the security of their data and for this, nothing could be as secure as having an encrypted VM for your remote backups. You better use a server with Raid and secure it up as much as possible to protect it against cyber threads and hardware failures.
In recent years, object storage solutions have become popular alternatives to traditional offsite backup services. While public cloud backup services are popular for their simplicity and easy implementation, object storage services offer a level of flexibility that could be better suited for some companies’ storage needs.
Thanks to the design of the object storage model, object storage services can allow users to store very large amounts of data at a lower cost when compared to remote backup or file-sharing services. This makes them highly scalable, which is appealing to companies that are positioning themselves for future growth. Also, because of features like replication and erasure coding, object storage makes it easy to duplicate data, bringing another layer of protection against data loss and ensuring high availability.
Object storage isn’t always a perfect solution, especially if a user needs to make frequent changes to their data and perform lots of random data access. However, if you’re in need of relatively static archival storage, object storage services are a convenient, elegant, and highly affordable solution for securely storing your company’s key information.
Database Replication
When you withdraw $100 from the ATM your transaction is sent to a database and your account balance is updated. The bank is smart - they know there's a small chance of a hardware failure, network failure or some catastrophe occurring in the town where that database, the primary database, is located, so they have a copy of the primary database running in another town. If the primary database fails the second one can automatically take over. This is the bank's failover database.
The failover database wouldn't be much use to the bank if they didn't quickly copy your $100 withdrawal to their failover database, just in case something bad happened to the primary database. That act of copying your transaction is called replication.
Database replication allows you to store data in more than one site. The replication process involves maintaining a database in multiple databases. Database replication is fast and Reliable that protects the availability of applications.
If one database is corrupt or crashes, you can switch to the failover replica. If you’re sufficiently clever and have some hardware support such as load balancers, you can make the fail-over procedure automatic or nearly so, so there is little or no user-visible downtime from the failover procedure.
If you’re using a replication strategy, you typically will have at least three replicas, so you don’t lose the failover capability once you’ve done a failover, as it may take hours or days to repair the DB that failed.
People also still may have backups even if they have replication, as you may have a massive disaster and still need to rebuild the DB - a not-unknown scenario is the app messes up the DB and you need to restore an entire cluster to the state as it was before the app “broke the DB” - as well as backups for forensic or compliance reasons.
Build backups from snapshots
A virtual machine snapshot is a copy of the VM state as it exists in server memory at a particular moment, along with any settings and the state of any virtual disks assigned to the VM. The VM snapshot is saved to disk, typically the SAN.
A snapshot backup is an important data-protection tool for VMs, but it should not be the only backup technique. The VM snapshot backup process treats virtual machine disk files as a single file, so the entire instance must be restored to recover a lost text or deleted note. This has long forced administrators to restore the VM snapshot to a lab or other nonproduction server to recover specific files within the VM. However, this is changing with the introduction of more robust and capable tools that can look inside VM snapshots and find specific data.
The advantage of having an additional copy of the snapshot data that is stored outside of the storage array is that, if the storage array becomes unavailable because of a hardware failure or a disaster, then the snapshot is still available on a different media.
Remote Code Repositories
Learning version control nowadays is something we all must be familiar with. A remote repository is, at its core, another instance of the repository you're working in that is linked so that changes made to one can be pushed to the other. The remote repository could be hosted on a Git hosting service like GitHub or BitBucket, it could be on a co-workers machine, or it could even be another folder on your local machine.
In a typical Git project there is one remote repository known as the "Central" repository. The central repo is almost always hosted either on a private server setup for this explicit purpose, or on a Git hosting service. Because creating your own Git server is fairly complex, and unnecessary for the average user, most people rely on a Git hosting service to house our central repository.
If you'd like to work on a website locally (which is faster, and helps prevent making mistakes on your live site) you can pull the central repo to your live server and host the site from that copy. Then, work away on your local machine, knowing that nothing you do will affect the live copy. Once you're happy with the changes, You can push them to the central repo, and pull them to the live site.
Since Git is at its core a version control system, you can then roll the code back to its previous working state in case something does goes wrong.
Remote repositories can serve you as a mean of code backup, but they offer you lots of other good things like online collaboration and version control. You can also track issues more easily.
Continuous Integration (CI) allows you to continuously integrate code into a single shared and easy to access repository. Continuous Delivery (CD) allows you to take the code stored in the repository and continuously deliver it to production. CI/CD creates a fast and effective process of getting your product to market before your competition as well as releasing new features and bug fixes to keep your current customers happy.
Conslusion
Offsite backups guarantee a high level of security and peace of mind as it allows data storage off site/online. It helps you in saving time and costs too. It provides much better protection against the natural disasters. Also allows unlimited amount of data retention.
With any good data recovery plan, keeping local copies of backups is essential. However, due to risks associated with physical disasters, ransomware, theft, and other threats, keeping local backups should never be the only facet of your strategy.