# Backing up Mender

**URL:** <https://hub.mender.io/t/backing-up-mender/3535>\
**Category:** General Discussions\
**Tags:** mender-server\
**Created:** [April 22, 2021, 2:57am UTC](https://hub.mender.io/t/backing-up-mender/3535 "2021-04-22T02:57:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![james-onsolution](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@james-onsolution](https://hub.mender.io/u/james-onsolution)\
**Post date:** [April 22, 2021, 2:57am UTC](https://hub.mender.io/t/backing-up-mender/3535/1 "2021-04-22T02:57:05Z")

</div>

Hi,

I’m just implementing a backup script for our self-hosted Mender server (backing up to S3) following the commands outlined here: [Backup and restore | Mender documentation](https://docs.mender.io/2.6/server-installation/backup-and-restore)

I was just wondering about the requirement for the docker containers to be turned off during the backup process. I don’t have any experience with Mongo, but it seems strange to need to turn off a production system to be able to do a backup. Surely there is a way to do the backup while Mender keeps running?

Any insight into why this needs to happen would be greatly appreciated

Thanks

James

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [April 22, 2021, 1:19pm UTC](https://hub.mender.io/t/backing-up-mender/3535/2 "2021-04-22T13:19:52Z")

</div>

@tranchitella @peter can either of you comment?

---

<div class="post-metadata">

**Author:** ![tranchitella](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tranchitella/32/606_2.png) [@tranchitella](https://hub.mender.io/u/tranchitella)\
**Post date:** [April 23, 2021, 8:09am UTC](https://hub.mender.io/t/backing-up-mender/3535/3 "2021-04-23T08:09:51Z")

</div>

@james-onsolution docker-compose doesn’t provide volume snapshot functionalities. While it is not strictly mandatory to turn the database off before copying the volume, there is no guarantee a hot copy of the mongodb data files while the server is running will produce a working backup.

If you need to backup the database without turning it off, you can use the [mongodump](https://docs.mongodb.com/database-tools/mongodump/) instead of relying on a copy of the data files.
