Backup and Restore

Hello! I had a bit of a server crisis over the weekend and managed to obtain a backup from my baserow instance. I used the recommended baserow backup method to take a backup the container itself. I have moved servers and am now trying to restore the backup. I do have some issues. I created a full backup from the original baserow container.

  1. I have a backup.tar.gz file.
  2. I extracted the contents of this file into a host path because that’s how I need to mount the baserow/data directory.
  3. I mapped this host directory to the /baserow/data directory.
  4. Started the container.
  5. After starting the container, base row recreates the standard directories without restoring anything that is in the data directory.

I followed the restoration instructions and surmised what I should do from the docker commands.

I also have these directories present after extracting the backup archive:

everything_but_user_tables
user_tables_batch_0
user_tables_batch_1
etc etc

I might have missed something, but maybe I should have extracted the backup file into a different location?

Thanks for the help in advance.

I am going to reply to myself here, because I have figured it out.

Using the baserow backup command dumps pg. I needed to use the baserow backend-cmd restore from a running baserow instance. The way I did that was by going into a bash prompt in a running docker container, adjusting .pgpass into /baserow/data directory adding the new password for my database user because when running the command it copied the .pgpass that was already setup. Also, I needed to standup a new postgres instance, additionally adding the baserow role. I created a new database called baserow in the new instance and set the baserow restore options appropriately. The database was restored successfully.

Theres a much easier way to to do this. I took the difficult route.

EDIT: I will rewrite this for clarity later

1 Like

Hi robert! :wave:t2:

Thanks for taking the time to come back to your question and submitting an answer, that is highly appreciated since it can benefit futures readers. :pray:t2:

The CLI command seems to be more easier indeed! :grin: