Hello! I’ve recently been testing out PieFed (I followed the Docker install instructions), it’s actually working quite well… However, I’m a bit of a newbie system administrator, I was wondering if there was a guide or documentation available on how to back up/restore a PieFed instance installed this way? Being able to back up and restore the instance is the one stumbling block I need to get past in order to self host PieFed, so I would certainly appreciate any help that people can provide 😀 Thanks!

    • Phoenix1@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 days ago

      Thanks, that should be simple to figure out if it’s just one step, although I’ve never dumped a database from a Docker image before…I’ll have to do some searching and see if I can figure it out!

      • hendrik@palaver.p3x.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 days ago

        In addition to the DB, there’s also a media directory with a lot of stuff like images. I guess that should be saved as well. Not sure how that’s done with Docker but I’m sure it has some mechanism to back up volumes. It’s called “media” in the docker compose file, or “app/static/media/” in my non-containerized install.

        • Phoenix1@piefed.socialOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 days ago

          Unfortunately I haven’t been able to figure this out, I was able to write a script for Mastodon that automated the process of dumping the database, copying the system folder and so on, I was able to restore a test backup I made successfully as well. I only say that to indicate that I have at least some familiarity with the shell, but not much 😁 In the case of Mastodon it’s running on “bare metal” so to speak rather than Docker, so this is probably much easier for someone who is familiar with Docker!

          • Rimu@piefed.socialM
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 days ago

            You could use PieFed in docker with the DB connection set in .env.docker in such a way that it connects to a database on the host. That’d be easier to get to.

  • wjs018@piefed.wjs018.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 days ago

    I haven’t had to restore from my backup in production yet, but I run two instances and just periodically rsync the mapped volumes to a backup folder. I also use S3 for my media, so it is really just the database that is critical.

    Doing dev work, when I know I am about to really fuck up my database doing an experiment, I will rsync myself a backup…blow everything up…tear down the docker stack and swap back in my database folder and it is good to go.