Skip to content

Cloudbox Backup and Restore

desimaniac edited this page Sep 25, 2019 · 114 revisions

Intro

Backup and Restore is a built-in feature of Cloudbox that makes it easy to back-up your entire Cloudbox setup, with the ability to restore it anywhere.

Note 1: Only app data located in '/opt' and relevant config files are backed up. For more details, see here.

Note 2: If you wish to move your Cloudbox to another server via Backup / Restore, see Migrating Cloudbox.

Cloudbox Backup

Cloudbox Backup backs up the Docker container app data (i.e. /opt), and all relevant config files, and uploads it to an Rclone or Rsync remote (if they are enabled).

Backup can be ran manually (steps below), for an immediate, one-time backup, or scheduled to run periodically.

Note: During backup, all Cloudbox managed Docker containers will be shut down (i.e. Plex will be unavailable) while the tarball files are being made.

Steps to run a manual backup:

  1. Go into your Cloudbox folder

    cd ~/cloudbox
  2. Make sure backup settings (i.e. backup_config.yml) are filled out.

  3. Run the backup command

    sudo ansible-playbook cloudbox.yml --tags backup

    via screen:

    screen -dmS cloudbox-backup sudo ansible-playbook cloudbox.yml --tags backup
    screen -r
    CTRL A + D

For scheduled backups, see here.

Cloudbox Restore

Cloudbox Restore downloads the backup from the cloud (if Rclone or Rsync were enabled) and restores it to the /opt folder (this is done automatically and requires no manual intervention).

If a local backup (e.g. /opt tarball files) already exists in the backup folder, those tarball files will be used instead.

Backup can be restored on the same server or brand new one, with everything exactly as you left it at the time of backup. See Migrating Cloudbox for more info.

Steps below assume you are restoring to a new / wiped server.

  1. Install dependencies and download the Cloudbox project repository.

  2. If the Restore Service was enabled in settings (i.e. restore_service credentials were supplied in backup_config.yml), you will be able automatically restore the config files into the ~/cloudbox folder.

    To do so run the following command (replace USERNAME and PASSWORD with your restore_service credentials).

    curl -s https://cloudbox.works/scripts/restore.sh | bash -s 'USERNAME' 'PASSWORD'
    
  3. If the Cloudbox Restore Service was not enabled (i.e. restore_service credentials were NOT supplied in backup_config.yml)... (CLICK TO EXPAND)
    • Find the following files in your backup and drop them into the ~/cloudbox folder:

      • ansible.cfg

      • accounts.yml

      • settings.yml

      • adv_settings.yml

      • backup_config.yml

      • rclone.conf

    • Note 1: These files were backed up separately from the backup tarball files so they can easily be copied here.

    • Note 2: During the restore process, the rclone.conf file will be moved to ~/.config/rclone/rclone.conf.

    • Note 3: The /opt folder gets downloaded/restored automatically in the next step, and doesn’t require manual downloading or unpacking.

    • If you had Ansible Vault set up before, you'll need to create a Ansible Vault password file using the same vault password as last time.

  4. If the Cloudbox Restore Service was not enabled (i.e. restore_service credentials were NOT supplied in backup_config.yml)... (CLICK TO EXPAND)
    • If you had Ansible Vault set up before, you'll need to create a Ansible Vault password file using the same vault password as last time.

  5. Run preinstall command to create a user account and login as that user:

    cd ~/cloudbox
    sudo ansible-playbook cloudbox.yml --tags preinstall

    Note: It's ok to do this in root as it will create a new user account and move the cloudbox folder and config files to that new user's home folder.

  6. Run the restore command:

    cd ~/cloudbox
    sudo ansible-playbook cloudbox.yml --tags restore
  7. Install the relevant Cloudbox type: Cloudbox, Mediabox, or Feederbox. Example below.

    Example:

    sudo ansible-playbook cloudbox.yml --tags cloudbox
  8. Reboot.

  9. If you had any extra, or non-default, containers previously (e.g Community Roles), you can install those now.

All applications, and their data, will now be restored.

Home

Basics

  1. Introduction
  2. Cloudbox Install Types
  3. Cloudbox Paths
  4. Accessing Cloudbox Apps

Prerequisites

  1. Overview
  2. Presumptions
  3. Server
  4. Domain Name
  5. Cloudflare
  6. Cloud Storage
  7. Plex / Emby - Account
  8. Usenet vs. BitTorrent

Install Cloudbox

Cloudbox
  1. Overview
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Preinstall
  6. SSH
  7. Rclone
  8. Cloudbox
  9. Application Setup
    1. NZBGet
    2. ruTorrent
    3. NZBHydra2
    4. Jackett
    5. Plex Media Server
    6. Plex Autoscan
    7. Sonarr
    8. Radarr
    9. Lidarr
    10. PlexPy (Tautulli)
    11. Ombi
    12. Portainer
    13. Organizr

Install Mediabox / Feederbox

Feederbox (do this first)
  1. Overview
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Preinstall
  6. SSH
  7. Rclone
  8. Feederbox
  9. Application Setup
    1. NZBGet
    2. ruTorrent
    3. NZBHydra2
    4. Jackett
    5. Sonarr
    6. Radarr
    7. Lidarr
    8. Portainer
    9. Organizr

Mediabox
  1. Overview
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Preinstall
  6. SSH
  7. Rclone
  8. Mediabox
  9. Application Setup
    1. Feeder Mount
    2. Plex Media Server
    3. Plex Autoscan
    4. PlexPy (Tautulli)
    5. Ombi

Recommended Reading

Backup and Restore

More Information

Advanced Configuration

Experimental

Extras

Docs coming soon for ...

  • Radarr4K
  • Sonarr4K

Misc Guides

Reference

Troubleshooting

Links

Community Project

Clone this wiki locally
You can’t perform that action at this time.