---
description: Methods that can be used regardless of collection.
---

# Collection

### `createBackup()`

Create a backup of the collection.

> returns [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)<\[BackupFilename]> | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
>
> Example:
>
> ```javascript
> example_collection.createBackup(); // -> EXAMPLE_COLLECTION_2022-03-20_AUTO.pea
> ```

\


### `loadBackup(filename)`

Load a backup to the collection.

| Parameter | Description                                                                                                                                        |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| filename  | <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a><br>The filename of the backup.</p> |

> returns [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
>
> Example:
>
> ```javascript
> example_collection.loadBackup("EXAMPLE_COLLECTION_2022-03-20_AUTO.pea"); // -> true
> ```

\


### `drop()`

Drop the collection.

> returns [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
>
> Example:
>
> ```javascript
> example_collection.drop(); // -> true
> ```
