# What backup routines are recommended?

**URL:** <https://farmos.discourse.group/t/what-backup-routines-are-recommended/2203>\
**Category:** Hosting farmOS\
**Created:** [January 15, 2025, 4:19pm UTC](https://farmos.discourse.group/t/what-backup-routines-are-recommended/2203 "2025-01-15T16:19:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pat](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/pat/32/1050_2.png) [@pat](https://farmos.discourse.group/u/pat)\
**Post date:** [January 15, 2025, 4:19pm UTC](https://farmos.discourse.group/t/what-backup-routines-are-recommended/2203/1 "2025-01-15T16:19:24Z")

</div>

I’ve been running farmOS for a while now, with rather random backup routines. This has to change..

I made 2 bash scripts. One for making a user-triggered backup, and one script for automatic backup (with cron) :

### Manual backup:

- pgdump from db-container
- file copy from sites volume : …web//sites  
Not via docker commands.
- And finally a **docker commit** to make snapshots of the db and www containers.

Database and site files are placed in a backup folder with timestamped subfolders.

### For automatic daily backup:

- pgdump from db-container
- file copy from sites volume : …web//sites
- rsync files and database over to a different server
- “Different server” makes incremental backup to external drive with Backrest backup software.

It’s for sure a step up from random backups.

Plan is to run a manual backup before every update.  
And also have simple restore if something breaks.

Did I miss some vital parts?
