There are many threats to your data. And although malware is not as prevalent for GNU / Linux systems, that does not mean there is no risk of ransomware. In addition to that, there can be any kind of software error that corrupts the data, a hard drive crashing, fire, flood, crash, power outage, etc. Therefore, you should think about making backup copies so that these problems do not catch you unarmed and you have a backup to be able to recover all that information (or most of it).
Even more when you are teleworking. Now, with the pandemic, all people who work from home have surely been forced to have tax data, customer data, company documents, etc., all on their PC. In these cases, the reasons for backing up are much stronger than for a home user. In fact, the more relevant the data you handle, the greater the frequency of backups you make ...
Other LxA articles have already commented on a multitude of programs to make backup copies in GNU / Linux, as well as some tutorials to show how they were done in a practical way. This time it will be something more theoretical, but no less important for that. And they are a series of rules or tips to perform backups safely and correctly.
Backup Rule 3–2–1
It is a very easy to remember and that works great for backups. Consists in:
- 3Make three different copies of the information. If possible, use reliable media. In other words, avoid using optical discs, which can get scratched or damaged over the years.
- 2- Store these backups on at least two different media. That is, do not bet everything on the same storage medium, or if that medium has problems, you would also lose everything.
- 1: Store one of the copies in a different location. Not all backups need to be stored in one place. Imagine that place is flooded, burned, or robbed. In that case, you will always have another copy in a different place. It is strange that that other place also suffers the same fate ...
This rule works so well for simple probability and location:
- Imagine that a hard drive fails 1 time every 100.000 hours, for example. Well, if you have two copies on two different disks, the probability that your data will be affected would be 1 in 10.000.000.000.
- By physically separating the backups, you prevent problems of fire, theft, flood, etc., from wiping out all existing backups.
Rabbits for backups
In addition to following that rule, there are also other tips that you should keep in mind when applying a good backup policy at home and work, so that you will not have to regret that your data has been lost when something happens:
- What type of backups is right for me? Think about the type of backups that are best for you:
- Complete: this should be the first backup, since you don't have anything previously copied. That is, it is a type of backup that makes an integral copy, with all the data. Obviously, it will be a type of backup that will take up more space, and will take longer to do, so it is only recommended on a specific basis. For example, the first time, when the offices are closed at the end of the week, before the holidays, etc.
- Incremental- Only files that have been modified since the last copy after a full copy are copied. That is, it will compare the data from the source and the data from the destination, and it would only copy the ones that have changed based on their modified date. Therefore, it takes less time to complete, takes less time by not creating duplicates of all the data.
- Differential: is similar to incremental the first time it is carried out. That is, it will only back up data that has changed or has been modified since the last backup. On the other hand, the successive times it is started, it will continue to copy all the data that has changed from the previous full copy, so it will take longer and take more time than the incremental one.
- Calendar- Design a backup plan or schedule automatic backups every so often. The frequency will depend on the rate of creation of new data and the importance of the same. For example, if you are a home user you could relax the policy a bit. On the other hand, if the data is very important, such as business data, then the copies should be much more frequent to avoid that from the last backup until the problem occurred, there is a considerable difference and important data is lost.
- Records!: If you have automated them, don't take anything for granted. Check the logs to see if they are actually taking place. Maybe something has happened and you are sure that they are done and it is not.
- Verification: Check the copies once they are complete. It is not enough to do them, you must check that they are correct and consistent, that they are not corrupt.
- Encryption and compression- Depending on the user, the data may need to be compressed to take up less space and encrypted to prevent access by third parties. Instead, these practices have their risks and cost of resources and time. When encrypting, the key could be forgotten, thus preventing you from accessing them as well, or during compression, the compressed packet could be corrupted, etc. Therefore, before doing it, you should think very well if it suits you.
- Know where your data is- Local backups are ideal, but sometimes cloud storage systems need to be used for backups. You should choose a safe and reliable service for this, ideally with data centers in the EU.
- Disaster recovery plan- You should have a marked route to know how to act when disaster strikes and you need to reset the emergency system Leaving everything to chance is not a good idea. Even more so when it comes to a company that must give an urgent service to its customers.