Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. This might be a dumb question, but in order to back up a Mastodon instance, if one were simply to rsync the /home/mastodon/ folder, would it then work to simply restore that folder in the case of a failure?

This might be a dumb question, but in order to back up a Mastodon instance, if one were simply to rsync the /home/mastodon/ folder, would it then work to simply restore that folder in the case of a failure?

Scheduled Pinned Locked Moved Uncategorized
mastoadminselfhostingselfhosted
8 Posts 6 Posters 14 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • fname@kamloops.socialF This user is from outside of this forum
    fname@kamloops.socialF This user is from outside of this forum
    fname@kamloops.social
    wrote last edited by
    #1

    This might be a dumb question, but in order to back up a Mastodon instance, if one were simply to rsync the /home/mastodon/ folder, would it then work to simply restore that folder in the case of a failure?

    #MastoAdmin #SelfHosting #SelfHosted

    maya_b@hachyderm.ioM sheogorath@microblog.shivering-isles.comS admina@meerjungfrauengrotte.deA westfox35@wcgw.cafeW 4 Replies Last reply
    0
    • fname@kamloops.socialF fname@kamloops.social

      This might be a dumb question, but in order to back up a Mastodon instance, if one were simply to rsync the /home/mastodon/ folder, would it then work to simply restore that folder in the case of a failure?

      #MastoAdmin #SelfHosting #SelfHosted

      maya_b@hachyderm.ioM This user is from outside of this forum
      maya_b@hachyderm.ioM This user is from outside of this forum
      maya_b@hachyderm.io
      wrote last edited by
      #2

      @fname

      depends - if you restore something that file structure that broke the instance in the first place, then you'll be restoring the break as well.

      syncthing does versioned backups, and is bascially rsync on steroids, so you might be able to mitigate the above with a more selective restore in the event of calamity.

      fname@kamloops.socialF 1 Reply Last reply
      0
      • maya_b@hachyderm.ioM maya_b@hachyderm.io

        @fname

        depends - if you restore something that file structure that broke the instance in the first place, then you'll be restoring the break as well.

        syncthing does versioned backups, and is bascially rsync on steroids, so you might be able to mitigate the above with a more selective restore in the event of calamity.

        fname@kamloops.socialF This user is from outside of this forum
        fname@kamloops.socialF This user is from outside of this forum
        fname@kamloops.social
        wrote last edited by
        #3

        @maya_b
        Oooh. Good point.

        Right now I keep versioned snapshots of the VM (5 days worth) as well as a complete daily copy of the VDI.

        1 Reply Last reply
        0
        • fname@kamloops.socialF fname@kamloops.social

          This might be a dumb question, but in order to back up a Mastodon instance, if one were simply to rsync the /home/mastodon/ folder, would it then work to simply restore that folder in the case of a failure?

          #MastoAdmin #SelfHosting #SelfHosted

          sheogorath@microblog.shivering-isles.comS This user is from outside of this forum
          sheogorath@microblog.shivering-isles.comS This user is from outside of this forum
          sheogorath@microblog.shivering-isles.com
          wrote last edited by
          #4

          @fname You usually don't need to backup that directory. It should be all reproducible by the install instructions. What you want to backup: Your database, your uploads, and your config. There isn't really more to do. (Redis/Valkey exists but can be reproduced.)

          https://docs.joinmastodon.org/admin/backups/

          It's not uncommon that your uploads are on S3 and your database uses a different directory, therefore the only thing you backup, when backing up /home/mastodon is your config.

          fname@kamloops.socialF 1 Reply Last reply
          0
          • sheogorath@microblog.shivering-isles.comS sheogorath@microblog.shivering-isles.com

            @fname You usually don't need to backup that directory. It should be all reproducible by the install instructions. What you want to backup: Your database, your uploads, and your config. There isn't really more to do. (Redis/Valkey exists but can be reproduced.)

            https://docs.joinmastodon.org/admin/backups/

            It's not uncommon that your uploads are on S3 and your database uses a different directory, therefore the only thing you backup, when backing up /home/mastodon is your config.

            fname@kamloops.socialF This user is from outside of this forum
            fname@kamloops.socialF This user is from outside of this forum
            fname@kamloops.social
            wrote last edited by
            #5

            @sheogorath
            Ok, but wouldn’t it take just as much or more time/effort to go through a complete reinstall, and the restore the database than just to restore the whole folder intact? 🤔

            scott@mastodon.clitheroe.caS 1 Reply Last reply
            0
            • fname@kamloops.socialF fname@kamloops.social

              This might be a dumb question, but in order to back up a Mastodon instance, if one were simply to rsync the /home/mastodon/ folder, would it then work to simply restore that folder in the case of a failure?

              #MastoAdmin #SelfHosting #SelfHosted

              admina@meerjungfrauengrotte.deA This user is from outside of this forum
              admina@meerjungfrauengrotte.deA This user is from outside of this forum
              admina@meerjungfrauengrotte.de
              wrote last edited by
              #6

              @fname
              I don't think so. You would have to backup the database, too. And Mastodon needs some required software (nginx...), you would have to install.

              1 Reply Last reply
              0
              • fname@kamloops.socialF fname@kamloops.social

                @sheogorath
                Ok, but wouldn’t it take just as much or more time/effort to go through a complete reinstall, and the restore the database than just to restore the whole folder intact? 🤔

                scott@mastodon.clitheroe.caS This user is from outside of this forum
                scott@mastodon.clitheroe.caS This user is from outside of this forum
                scott@mastodon.clitheroe.ca
                wrote last edited by
                #7

                @fname @sheogorath As with all things, "it depends". I tend to agree with your VM backup approach - Postgres is transaction logged, so if your VM level backups invoke a helper that halts guest operating system I/O while the snapshot is being taken (eg. qemu-guest-agent or whatever), you have a complete DB file and a complete transaction log at the time of backup. That means restoring the VM is going to restore a consistent point in time DB as well.

                1 Reply Last reply
                0
                • fname@kamloops.socialF fname@kamloops.social

                  This might be a dumb question, but in order to back up a Mastodon instance, if one were simply to rsync the /home/mastodon/ folder, would it then work to simply restore that folder in the case of a failure?

                  #MastoAdmin #SelfHosting #SelfHosted

                  westfox35@wcgw.cafeW This user is from outside of this forum
                  westfox35@wcgw.cafeW This user is from outside of this forum
                  westfox35@wcgw.cafe
                  wrote last edited by
                  #8

                  @fname Assuming you have no S3 storage and are using local, then you need to backup public/system, along with the postgresql database. And you need to backup the .env.production.

                  1 Reply Last reply
                  1
                  0
                  • R relay@relay.mycrowd.ca shared this topic
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups