Chrome OS has evolved from a lightweight web-centric operating system into a robust development platform, thanks to its integrated Linux development environment (known internally as Crostini). Developers frequently configure custom toolchains, databases, compilers, and IDEs within their Debian-based Linux containers. However, hardware transitions, system resets (Powerwashes), or accidental container corruption can result in total loss of development environments. Chrome OS provides native backup utilities to export and restore complete container images effortlessly.
Understanding Crostini Container Architecture
The Linux environment in Chrome OS runs inside a virtual machine (named termina) containing an LXD/LXC container (typically named penguin). The built-in backup utility packages the complete root filesystem, user home directories, installed packages, and configuration dotfiles into a compressed tarball with a .tini extension. This allows developers to restore an exact snapshot of their working environment in minutes.
Creating a Manual Container Backup via Chrome OS Settings
The simplest method to safeguard your Linux development setup is through the native system interface:
- Open Settings on your Chromebook.
- In the left sidebar, navigate to About ChromeOS > Linux development environment.
- Click Backup and restore.
- Beside Back up Linux apps and files, click Back up.
- In the file picker dialog, select your target destination. It is strongly recommended to choose an external USB flash drive, external SSD, or a dedicated folder in Google Drive rather than local Downloads storage.
- Enter a descriptive filename (e.g.,
crostini_backup_node20_python311.tini) and click Save. - A system notification appears showing backup progress. Avoid launching or executing intensive tasks in the Linux terminal while the snapshot compresses.
Exporting Containers via the Crosh Terminal
Advanced users and system administrators can execute backups directly from the Chrome OS Developer Shell (crosh) using the LXC management interface:
- Press
Ctrl + Alt + Tto open the crosh terminal tab. - Start the Termina virtual machine shell:
vsh termina - Export the container to the Downloads directory:
lxc export penguin /mnt/shared/MyFiles/Downloads/penguin_backup.tar.gz
Restoring a Backup Image on a New or Reset Chromebook
To restore your development environment after a system reset or when setting up a new device:
- Ensure the Linux development environment is enabled in Settings > Linux development environment.
- Navigate to Backup and restore and click Restore.
- A warning prompt will notify you that restoring will overwrite the current Linux container. Click Restore to confirm.
- Select your saved
.tinior backup archive and click Open. - Once the restoration completes, open the Terminal app to resume coding with your exact packages, aliases, and project repositories intact.
Regularly exporting Crostini container backups ensures resilience against data loss and streamlines workspace migrations across Chrome OS devices.