# Backup The Moodle Data Folder

### Backing Up The Moodle Data Folder

#### Compress the data folder

1. Compress the Moodle data folder with the command below

```
tar -czvf name-of-archive.tar.gz /path/to/moodle-data-folder

Here’s what those switches actually mean:

  -c: Create an archive.
  -z: Compress the archive with gzip.
  -v: Display progress in the terminal while creating the archive, also known as “verbose” mode. 
      The v is always optional in these commands, but it’s helpful.
  -f: Allows you to specify the filename of the archive.
```

#### Downloading the file

1. Once the folder is compressed, download to a backup medium for safekeeping