Home / Linux / How to Back Up Important Linux Files

How to Back Up Important Linux Files

A practical checklist of what to back up on a Linux VPS (configs, web files, SSH keys, databases) and how to archive them safely.

Views: 18 Unique: 16 Updated: 2026-03-19

What this is

This guide explains what files are typically important to back up on a Linux VPS and how to bundle them.

What it is for

  • Recover after accidental deletion or server failure
  • Migrate to another VPS

What you should back up (common checklist)

  • /etc (system and service configuration)
  • /var/www (websites)
  • /home (user files, SSH keys)
  • Web server configs: Nginx/Apache sites
  • Database dumps (MySQL/PostgreSQL) stored separately

Step-by-step: create an archive backup

Step 1) Create a backup folder

mkdir -p ~/backups
cd ~/backups

Step 2) Create a tar.gz archive

sudo tar -czvf linux_files_backup.tar.gz /etc /var/www /home

Expected output: Lists files as they are added.

Step 3) Verify the archive

ls -lah linux_files_backup.tar.gz
sudo tar -tzf linux_files_backup.tar.gz | head -n 20

Warnings & notes

  • Backups can contain secrets (passwords, keys). Store them securely.
  • Do not keep only one copy on the same VPS. Copy off-server.

Conclusion

Backing up the right files makes recovery much faster. Combine file backups with database dumps and snapshots.

Back to category