Backup and restore of FarmOS - need to redo server

Hi all, I need to reload my server, is there any specific steps to follow? Or is it as easy as backing up current docker container config folder, then after OS Install, docker setup, and farmos and postgres container install and initial setup to restore into the new farmos docker config folder?

Thanks

1 Like

There’s a couple strategies you could employ. Regardless of the strategy, you should test restoring your backup (either on the new server or some other computer) before you delete anything on the old server.

If you installed everything via the recommended docker containers for farmOS and Postgres, it should be possible to simply shut down the containers and tar.gz/rsync the relevant folders to another server.

Alternatively, there’s Drupal modules like Backup and Migrate that I’ve personally had good luck with.

1 Like

Thanks, I will have a look at your suggestions

1 Like

FYI the Backup and Migrate module does not currently support PostgreSQL databases, so it’s not a great solution for farmOS v2 unfortunately. See this issue: https://www.drupal.org/project/backup_migrate/issues/2930369

The pg_dump command that comes with PostgreSQL is all around the most flexible way to take a backup of the database, and if you use it to create a *.sql file with SQL commands you can feed it directly into the psql command to restore.

In general there are three types of things that need to be migrated:

  1. The database
  2. The codebase
  3. The sites directory (with uploaded files, settings.php, etc)

As long as you replicate everything on the new server in the same way as the old, it should work!

Agree strongly with @Symbioquine’s advice:

Regardless of the strategy, you should test restoring your backup (either on the new server or some other computer) before you delete anything on the old server.

Good luck!

1 Like