Skip to main content
added 38 characters in body
Source Link
Laiv
  • 15k
  • 2
  • 34
  • 72

This isn't a proper use for Github, which is mainly a source code repository and not a general file store. Your assumptions about saving time by only storing the daily updates in git do not hold, database files are binary, and the changes cannot be expressed as textual diffs.

Forget about using a git repository and look at other ways of doing differential backups. https://dba.stackexchange.com/questions/257833/is-it-possible-to-take-full-and-differential-backup-in-postgresql-like-sql-serveThis question and https://stackoverflow.com/questions/5529603/best-method-for-postgresql-incremental-backupthis other might be starting points.

Note that if you play around with your copy of the database you're most likely not able to merge later changes from the production database. You will have to restore the playground database to a copy of the production again. However, with WAL archiving that should be much faster (you're basically storing a full backup of the production database with the ability to restore to any point in time, and incremental update of this backup from the production server).

Note2: I have no practical experience doing this, just gathered that info using a search engine, so YMMV, but I'm very positive about not using githubGitHub or any other source code repository tool for this. And of course, what mtj@mtj said: Production database content does not belong on a publicly accessible service. Ever.Production database content does not belong on a publicly accessible service. Ever. And what JanRecker@JanRecker said, as well: it probably doesn't belong on your computer either.it probably doesn't belong on your computer either.

This isn't a proper use for Github, which is mainly a source code repository and not a general file store. Your assumptions about saving time by only storing the daily updates in git do not hold, database files are binary, and the changes cannot be expressed as textual diffs.

Forget about using a git repository and look at other ways of doing differential backups. https://dba.stackexchange.com/questions/257833/is-it-possible-to-take-full-and-differential-backup-in-postgresql-like-sql-serve and https://stackoverflow.com/questions/5529603/best-method-for-postgresql-incremental-backup might be starting points.

Note that if you play around with your copy of the database you're most likely not able to merge later changes from the production database. You will have to restore the playground database to a copy of the production again. However, with WAL archiving that should be much faster (you're basically storing a full backup of the production database with the ability to restore to any point in time, and incremental update of this backup from the production server).

Note2: I have no practical experience doing this, just gathered that info using a search engine, so YMMV, but I'm very positive about not using github or any other source code repository tool for this. And of course, what mtj said: Production database content does not belong on a publicly accessible service. Ever. And what JanRecker said, as well: it probably doesn't belong on your computer either.

This isn't a proper use for Github, which is mainly a source code repository and not a general file store. Your assumptions about saving time by only storing the daily updates in git do not hold, database files are binary, and the changes cannot be expressed as textual diffs.

Forget about using a git repository and look at other ways of doing differential backups. This question and this other might be starting points.

Note that if you play around with your copy of the database you're most likely not able to merge later changes from the production database. You will have to restore the playground database to a copy of the production again. However, with WAL archiving that should be much faster (you're basically storing a full backup of the production database with the ability to restore to any point in time, and incremental update of this backup from the production server).

Note2: I have no practical experience doing this, just gathered that info using a search engine, so YMMV, but I'm very positive about not using GitHub or any other source code repository tool for this. And of course, what @mtj said: Production database content does not belong on a publicly accessible service. Ever. And what @JanRecker said, as well: it probably doesn't belong on your computer either.

added 86 characters in body
Source Link
Hans-Martin Mosner
  • 18.6k
  • 1
  • 37
  • 48

This isn't a proper use for Github, which is mainly a source code repository and not a general file store. Your assumptions about saving time by only storing the daily updates in git do not hold, database files are binary, and the changes cannot be expressed as textual diffs.

Forget about using a git repository and look at other ways of doing differential backups. https://dba.stackexchange.com/questions/257833/is-it-possible-to-take-full-and-differential-backup-in-postgresql-like-sql-serve and https://stackoverflow.com/questions/5529603/best-method-for-postgresql-incremental-backup might be starting points.

Note that if you play around with your copy of the database you're most likely not able to merge later changes from the production database. You will have to restore the playground database to a copy of the production again. However, with WAL archiving that should be much faster (you're basically storing a full backup of the production database with the ability to restore to any point in time, and incremental update of this backup from the production server).

Note2: I have no practical experience doing this, just gathered that info using a search engine, so YMMV, but I'm very positive about not using github or any other source code repository tool for this. And of course, what mtj said: Production database content does not belong on a publicly accessible service. Ever. And what JanRecker said, as well: it probably doesn't belong on your computer either.

This isn't a proper use for Github, which is mainly a source code repository and not a general file store. Your assumptions about saving time by only storing the daily updates in git do not hold, database files are binary, and the changes cannot be expressed as textual diffs.

Forget about using a git repository and look at other ways of doing differential backups. https://dba.stackexchange.com/questions/257833/is-it-possible-to-take-full-and-differential-backup-in-postgresql-like-sql-serve and https://stackoverflow.com/questions/5529603/best-method-for-postgresql-incremental-backup might be starting points.

Note that if you play around with your copy of the database you're most likely not able to merge later changes from the production database. You will have to restore the playground database to a copy of the production again. However, with WAL archiving that should be much faster (you're basically storing a full backup of the production database with the ability to restore to any point in time, and incremental update of this backup from the production server).

Note2: I have no practical experience doing this, just gathered that info using a search engine, so YMMV, but I'm very positive about not using github or any other source code repository tool for this. And of course, what mtj said: Production database content does not belong on a publicly accessible service. Ever.

This isn't a proper use for Github, which is mainly a source code repository and not a general file store. Your assumptions about saving time by only storing the daily updates in git do not hold, database files are binary, and the changes cannot be expressed as textual diffs.

Forget about using a git repository and look at other ways of doing differential backups. https://dba.stackexchange.com/questions/257833/is-it-possible-to-take-full-and-differential-backup-in-postgresql-like-sql-serve and https://stackoverflow.com/questions/5529603/best-method-for-postgresql-incremental-backup might be starting points.

Note that if you play around with your copy of the database you're most likely not able to merge later changes from the production database. You will have to restore the playground database to a copy of the production again. However, with WAL archiving that should be much faster (you're basically storing a full backup of the production database with the ability to restore to any point in time, and incremental update of this backup from the production server).

Note2: I have no practical experience doing this, just gathered that info using a search engine, so YMMV, but I'm very positive about not using github or any other source code repository tool for this. And of course, what mtj said: Production database content does not belong on a publicly accessible service. Ever. And what JanRecker said, as well: it probably doesn't belong on your computer either.

Source Link
Hans-Martin Mosner
  • 18.6k
  • 1
  • 37
  • 48

This isn't a proper use for Github, which is mainly a source code repository and not a general file store. Your assumptions about saving time by only storing the daily updates in git do not hold, database files are binary, and the changes cannot be expressed as textual diffs.

Forget about using a git repository and look at other ways of doing differential backups. https://dba.stackexchange.com/questions/257833/is-it-possible-to-take-full-and-differential-backup-in-postgresql-like-sql-serve and https://stackoverflow.com/questions/5529603/best-method-for-postgresql-incremental-backup might be starting points.

Note that if you play around with your copy of the database you're most likely not able to merge later changes from the production database. You will have to restore the playground database to a copy of the production again. However, with WAL archiving that should be much faster (you're basically storing a full backup of the production database with the ability to restore to any point in time, and incremental update of this backup from the production server).

Note2: I have no practical experience doing this, just gathered that info using a search engine, so YMMV, but I'm very positive about not using github or any other source code repository tool for this. And of course, what mtj said: Production database content does not belong on a publicly accessible service. Ever.