Creating Backups

On this Page
Docs Menu
  • Explore
  • Develop
  • Administer
  • Setup
  • Overview

    You can create a backup of a basic Looker installation simply by making a copy of the Looker user’s home directory (including all normal and hidden subdirectories). This may be accomplished via scp, rsync, or any standard backup application. Similarly, restoring a basic Looker installation just requires restoring the files and starting up Looker.

    In clustered environments Looker uses an external MySQL database for application settings, user accounts, and other data. In this case we recommend creating a backup of the MySQL database, in addition to the Looker home directory.

    We highly recommend creating these backups on a daily basis. We also recommend performing a test restoration once per quarter.

    As an added convenience, Looker uploads a backup of its internal database to an Amazon S3 bucket on a daily basis, if possible (see below). However, this is not a replacement for creating your own, local backups.

    Directory Structure

    The standard subdirectories under the Looker user’s home directory (usually /home/looker) are described below.

    Directory Backup Required Change Frequency Description
    .ssh Yes Rare ssh keys used for authenticating to Git
    looker/.backup No Daily Temporary directory for S3 backup files
    looker/.cache No Frequent Temporary cache files
    looker/.db Yes Frequent Looker internal database
    looker/.snapshots No On Upgrade A backup copy of the Looker jar and .db directory are stored here during upgrades
    looker/.ssl Maybe Rare Self-signed SSL certificates (see note below)
    looker/.tmp No Frequent Temporary files
    looker/log Maybe Frequent Log files; only needed if required by your retention policies
    looker/models No Variable Production models, copied from the source repository (usually GitHub)
    looker/models-user-* Yes Variable Each user’s development models are stored in separate directories with the user’s ID number

    SSL Note: By default the SSL directory only contains a self-signed SSL cert, which does not need to be retained. However, if you store any additional files in this directory - such as SSL certificates signed by a certificate authority - this directory should be added to your backup.

    Files outside of the Looker home directory, which should be added to your backup, are:

    Directory Backup Required Change Frequency Description
    /etc/init.d/looker Yes Rare System startup script for Looker
    SSL Certificates Yes Rare If you are using SSL certificates, ensure all required files are included

    Although it doesn’t typically cause problems, some customers have reported issues if they include the looker/.db/looker.lck file in their backups. You can safely exclude this file if necessary.

    Creating a Looker Backup

    You can create a Looker backup with any standard backup application, as well as with command line tools such as rsync.

    It is best for the backup process to run when the application is as lightly used as possible. In addition to normal user interaction, consider the times that scheduled Looks might be running, derived tables might be re-building, etc.

    Clustered Environments

    Clustered Lookers store their application configuration, user accounts, and other data in an external MySQL database. We recommend creating a backup of this database at the same time as the Looker application. See the MySQL documentation for more details on how to backup MySQL databases.

    Automatic Amazon S3 Backups

    Looker cannot create S3 backups if it is using an external database for storing its configuration (such as in clustered environments), or if it is unable to send network traffic to S3 and the Looker license server (see outbound port requirements)

    Looker automatically creates an encrypted backup, once per day, of all the information stored in its internal database. This backup includes:

    • User accounts
    • User roles
    • Spaces
    • Looks
    • Application settings

    This backup does NOT include:

    • LookML files. LookML files which have been commited and pushed to production will be stored in the source repository (usually GitHub). LookML files which have not been pushed are stored only on the Looker hosts’ local filesystem.
    • The Looker startup script
    • SSL certificates
    • SSH keys
    • Logs

    Using a Custom Bucket for Backup

    By default, all Looker instances send their backups to a Looker S3 bucket.

    A custom bucket may be defined by going to AdminServer - Backup. You will need to provide the bucket name, along with an S3 key and secret.

    Restoring Backups

    If you need to restore a Looker backup, see our Restoring Backups page.

    Next Step

    After you have setup backups you’re ready to ensure Looker can access necessary services.

    Still have questions?
    Go to Discourse - or - Email Support
    Top