> For the complete documentation index, see [llms.txt](https://documentation-com.gitbook.io/application-backup-service/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation-com.gitbook.io/application-backup-service/prerequisites.md).

# Prerequisites

## Docker and Docker Compose

```
Docker version 28.4.0
Docker Compose version v2.39.2
```

## Install Docker and Docker Compose

1. To install Docker and Docker Compose it was used a previously created ansible playbook:

```
sudo nano docker_install.yml
```

```yaml
---

- name: Install Docker Compose and Docker
  hosts: localhost
  become: true
  any_errors_fatal: true
  max_fail_percentage: 0

  tasks:
    - name: Update apt cache
      apt:
        update_cache: yes
      when: ansible_distribution in ['Ubuntu', 'Debian']

    - name: System update
      apt:
        update_cache: yes
      changed_when: false
      when: ansible_distribution in ['Ubuntu', 'Debian']

    - name: Dist upgrade
      apt:
        upgrade: dist
      register: upgrade_output
      when: ansible_distribution in ['Ubuntu', 'Debian']

    - name: Install required packages
      apt:
        name:
          - apt-transport-https
          - ca-certificates
          - software-properties-common
          - curl
        state: present
      when: ansible_distribution in ['Ubuntu', 'Debian']

    - name: Add Docker APT key to trusted.gpg.d
      shell: "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg"
      when: ansible_distribution in ['Ubuntu', 'Debian']

    - name: Add Docker APT repository
      apt_repository:
        repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable
        state: present
      when: ansible_distribution in ['Ubuntu', 'Debian']

    - name: Install Docker
      apt:
        name: docker-ce
        state: latest
      when: ansible_distribution in ['Ubuntu', 'Debian']

    - name: Download and Install Docker Compose
      get_url:
        url: https://github.com/docker/compose/releases/latest/download/docker-compose-Linux-x86_64
        dest: /usr/bin/docker-compose
        mode: '0755'
      when: ansible_distribution in ['Ubuntu', 'Debian']
```

2. Then the playbook was runned using the command <mark style="color:red;">`sudo ansible-playbook docker_install.yml`</mark>.
3. Then we cheked the version of Docker and Docker Compose, with the command <mark style="color:red;">`docker --version`</mark> and <mark style="color:red;">`docker compose version`</mark>, to see if it match the following output:

```
Docker version 28.4.0, build d8eb465
Docker Compose version v2.39.2
```

## Create the Backup Directory

1. Create the directory and assign the right permissions:

```
sudo mkdir -p /mnt/backups
sudo chown $(id -u):$(id -g) /mnt/backups
```
