← Back to context

Comment by y4mi

6 years ago

You might want to read the Wikipedia definition, because you're technically mistaken.

https://en.m.wikipedia.org/wiki/Backup

That's a long article; please quote the part you're referring to so we're all looking at the same text.

> a backup, or data backup is a copy of computer data taken and stored elsewhere so that it may be used to restore the original after a data loss event

Since a "replica" is a copy, that seems technically correct.

  • all fruits are apples because apples are fruit, right?

    • Your definition claims "a backup is a copy."

      The original claim was "a backup is a replication of the live dataset, although, usually out of sync to be useful when the main dataset goes bad."

      The only thing that makes a replica special is that it's in sync. Once you add the caveat that it's out of sync, it's just a copy.

      1 reply →

I'm not, you can't do backup without replicating data, hence, if you do backup, you are doing replication.

  • It can be, it just doesn't have to be

    Let's say a typical admin of a small shop wants to backup his postgres database.

    The first thing he'll use is probably pg_dumpall which he'll output to a storage.

    No replication involved. The backup is just a bunch of sql statements to recover the last known state of the database. It's a different kind of format however, which -by definition- isn't a replica anymore.

    (And this process has several caveat's-one of which is that it can produce unusable dumps in some rare cases and isn't complete. users, triggers etc aren't dumped iirc.. could be wrong there)

    • > It's a different kind of format however, which -by definition- isn't a replica anymore.

      All non-trivial replication has to cross machine boundaries. To transmit to another machine, you have to use a serial format since there are no pointers on the wire. So insisting that a replica must be the same format prohibits the concept of replication in practice.

      3 replies →

    • > (And this process has several caveat's-one of which is that it can produce unusable dumps in some rare cases and isn't complete. users, triggers etc aren't dumped iirc.. could be wrong there)

      Triggers are dumped, users need pg_dumpall (as they live across multiple databases, same with tablespaces).

    • > No replication involved. The backup is just a bunch of sql statements to recover the last known state of the database.

      You probably should look up the definition of “replication”.

      2 replies →