Eberprot P / guides

How-to guides

The first guide in this section covers 3-2-1 backups with integrity checks. The result: three copies of your important files on different drives, and a way to confirm in a minute that a copy is readable and unchanged.

Linux commands were tested by our editors on Ubuntu 24.04.5 LTS (bash 5.2, GNU coreutils 9.4, GNU tar 1.35). Windows and macOS commands are based on documentation and were not tested.

Before you start

  • Decide which folders really matter: documents, photos, work projects
  • Get a second drive ready: an external drive or USB stick with enough capacity
  • Choose somewhere away from home for the third copy: cloud storage or a drive kept with relatives
  • Make sure the drives have enough free space

What is the 3-2-1 rule?

Three copies of your data (the working copy and two backups), on two different types of storage, with one of them kept somewhere else. The rule protects against drive failure, accidental deletion, theft and fire: a single event is unlikely to destroy all three copies at once.

Steps

  1. Gather your important files in one folder

    Checking one folder is easier than checking dozens of scattered ones. In this example, the folder is called src.

    Don't copy the entire system drive: it takes a long time, and restoring a single file from it is harder.

  2. Calculate checksums

    A SHA-256 checksum is a "fingerprint" of a file's contents. Save the checksums to a file alongside the data.

    Linux
    Tested by our editors
    sha256sum src/notes.txt > SHA256SUMS
    Windows (PowerShell)
    Based on documentation, not tested
    Get-FileHash .\src\notes.txt -Algorithm SHA256
    macOS
    Based on documentation, not tested
    shasum -a 256 src/notes.txt > SHA256SUMS

    For multiple files on Linux: find src -type f -exec sha256sum {} + > SHA256SUMS

  3. Copy to a second drive

    Copy the folder, preserving timestamps and permissions. Adding the date to the copy's name is handy.

    Linux
    Tested by our editors
    cp -a src /media/backup/copy-$(date +%F)
    Linux, archive
    Tested by our editors
    tar -czf /media/backup/archive.tar.gz src

    The path /media/backup is just an example: use your drive's mount point instead.

  4. Send the third copy somewhere else

    Cloud storage or a drive kept away from home. If the data is sensitive, encrypt the archive before sending it.

    Check that cloud sync won't automatically delete the copy when the original is deleted.

  5. Verify the copy

    Run the check on the drive holding the copy. OK means the file matches the original; FAILED means it has been changed or corrupted.

    Linux
    Tested by our editors
    sha256sum -c SHA256SUMS
    src/notes.txt: OK

    We deliberately modified the file after calculating its checksum: the command printed "src/notes.txt: FAILED" and exited with code 1.

  6. Test a restore

    A backup is only useful if you can restore data from it. Every few months, extract the archive to a temporary folder and open a couple of files.

    Linux
    Tested by our editors
    tar -tzf /media/backup/archive.tar.gz
    src/
    src/notes.txt

Common mistakes

Alternatives

Limitations

A checksum confirms that a file hasn't changed since the checksum was calculated, but it doesn't tell you the original file was intact. If the original was already corrupted, the copy will be corrupted in exactly the same way.

Article catalog for English-speaking readers

This section will feature articles written for English-speaking readers around the world. They are independent publications created for this audience, not translations of articles from other language versions of the site.

Topics our editors are planning

  • Setting up a new laptop: updates, backups and basic security
  • Using a password manager: getting started and moving your passwords in
  • Cleaning up and organizing cloud storage without losing files
  • Checking whether an email or text message is a scam

Editorial rules

  • Articles in this catalogue are written separately for each language version and are not translations.
  • Some articles link to third-party websites, including gaming services; we do not control their content, prices or terms.
  • We do not publish content about hacking, cheats or bypassing protection, or unverifiable ratings and reviews.

Sources and verification

Software and service interfaces change. We list the versions we tested commands on; on other versions the steps may differ.