About Chromebooks

Chromebook, ChromeOS and Google Chrome browser news

Project Crostini Terminal

Native backup and restoring of Linux containers in Crostini targeted for Chrome OS 74

While using Linux on a Chromebook is helpful, if something happens to the Linux container, you could easily lose all of your installed apps, data, and settings. There is a manual method to import and export a container if you’re familiar with LXD in Linux, but Crostini in Chrome OS is getting a native function to do the same according to the Chromium commit log.

The “Implement export and import for crostini container” effort actually surfaced back in December, but in the past few weeks, quite a bit of the code needed for this has been written. First was the “crostini-backup” flag that was added to enable or disable the functionality. And last week a number of commits to support the importing and exporting of Crostini containers were added to Cicerone, the Chrome OS daemon that communicates with containers.

For a listing of everything involved to make Crostini work, you can view all the bits and their definitions here.

Project Crostini Eclipse installed

One of the Crostini parts buried in the definition document is making several appearances in the code for Crostini backups, namely Tremplin, which appears to be the service that will manage and execute the container backup and restore process. I found mention of Tremplin in a bug report from last May since the original method to use containers — still in use today — is a shell script that wasn’t meant to be a long term solution; Tremplin was envisioned as a way to use APIs with LXD for containers:

Tremplin is a daemon that runs in the VM to provide a gRPC wrapper for LXD. This includes basic functionality such as creating and starting containers, but also provides other Crostini-specific integration such as setting up a container’s primary user, and setting up apt repositories in the guest to match the Chrome OS milestone.

Technical terms and funky names aside, the gist is that once Tremplin is implemented, not only will Linux containers on Chrome OS be started and stopped by this new service but you’ll be able to backup and restore your containers.

Since I’m using my Pixel Slate for this semester’s CompSci class, for example, this will be a very welcome addition. Currently, if I lose my Linux container, I can lose all of my coding assignments and third-party development tools. At the moment, I’m saving my code files in the cloud to offset some of the risks — GitHub and the new Google Drive mounting in Crostini are saving my bacon — but the ability to back up the entire container (and restore it, if needed) on a regular basis would also mitigate any data loss.

The current target for Templin’s implementation of exporting and importing Crostini containers is Chrome OS 74, so bits and pieces of it should start appearing in the Canary channel if they haven’t already.

author avatar
Kevin C. Tofel

3 thoughts on “Native backup and restoring of Linux containers in Crostini targeted for Chrome OS 74

  1. Does anyone know when or if the HP Chromebook 13 G1 will support or have project crostini. I have one and have been waiting for a while with no luck unfortunately.

  2. I had one until a week ago but I’ve bought a Pixelbook precisely because I don’t believe that the Skylake chipset will ever support Crostini now. There is absolutely no sign of support coming and I think it has become highly unlikely that Google will invest the effort now. This means no Crostini for the HP G1, C302 or Samsung CBP – all high end devices.

    I gave my G1 to my son and now I’m using the Pixelbook.

  3. This was an interesting article. Currently the process for backing up containers is unnecessarily complex and is really suitable only for the most technically adept users. Having native backup capability should be very useful.

Comments are closed.

Scroll to top