What is the format of the crostini backup .tini file?

331 views Asked by At

Crostini backup creates a xxx.tini file. What is the format of this file? Is there a way to view the file list of this file, ideally from within the Chromebook?

1

There are 1 answers

0
Kapil On

The format does not appear to be documented at the Crostini developer site so the following is based on checking an actual backup experimentally! (If someone finds a link, please add it or comment.)

This is a tar archive which is compressed with gzip with structure as follows:

  • The file system (usually /dev/vdb in btrfs format) mounted as / in the container is stored under the top-level directory rootfs in this archive. Note that this includes the rootfs/home sub-directory and its contents so be careful what you do with copies of the .tini file.
  • In addition, there is a top-level metadata.yaml file of which a version is reproduced below.
  • In addition, there is a top-level directory templates which contains the files hosts.tpl and hostname.tpl which are referred to in the metadata.yaml file. Presumably, this allows for additional templates to be added at a later stage via the metadata file.

metadata.yaml contents:

architecture: amd64
creation_date: 1573104613
expiry_date: 1575696613
properties:
  architecture: amd64
  description: Debian buster amd64 (20191107_05:24)
  name: debian-buster-amd64-default-20191107_05:24
  os: debian
  release: buster
  serial: "20191107_05:24"
  tremplinSetupFinished: "true"
  variant: default
templates:
  /etc/hostname:
    when:
    - create
    - copy
    create_only: false
    template: hostname.tpl
    properties: {}
  /etc/hosts:
    when:
    - create
    - copy
    create_only: false
    template: hosts.tpl
    properties: {}