1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-03 09:59:53 +02:00
Commit Graph

28 Commits

Author SHA1 Message Date
Michael Paquier
78d92ff8fb Fix typo 2013-12-25 05:33:50 +09:00
Michael Paquier
1bc1f1d1b6 Improve backup mode management
This commit makes mandatory the presence of a full backup when doing
an incremental or archive backup on an existing timeline. In this case
the process will now simply error out and not take any backup. It looks
safer to use that as a default by the way, so as user will be forced
to take a full backup once a recovery has been done.

Database backup also contained the following condition when doing an
incremental backup:
prev_backup->tli != current.tli
This means that an incremental backup cannot be taken if there is not
already a full backup present in the same timeline. The same condition
should also be used for archive backup but it didn't seem to be the
case...
2013-12-25 05:27:25 +09:00
Michael Paquier
26b8870665 Fix archive backup mode due to incorrect timeline assigned
This bug has been introduced by some older code, it looks that it will be
necessary to re-create a battery of regression tests to test all those
things automtically, as former tests contain nothing to test archive
mode directly.
2013-12-25 04:36:07 +09:00
Michael Paquier
e5ab0917cc Fix pg_switch_xlog for archive mode
An additional parenthesis was present in the code.
2013-12-25 03:53:18 +09:00
Michael Paquier
05ce188607 Simplify code related to HAVE_DATABASE, HAVE_ARCLOG, TOTAL_READ_SIZE
Those macros were mainly used in code paths where they didn't make that
much sense, complicating heavily the code. Correct at the same time some
code comments.
2013-12-16 00:30:49 +09:00
Michael Paquier
96cfb3eb13 Simplify code for recovery target identification
Some unnecessary comments are removed and cleaned as well at the same
time.
2013-12-15 23:50:04 +09:00
Michael Paquier
f77d141b7c Simplify beginning of database backup
It was unclear what was being errored out at the beginning of the
process. But it happens that it is just necessary to check if the
backup running is only an archive or not, then return a NULL file
list before continuing process. This should be part of some safety
checks though.
2013-12-15 23:41:42 +09:00
Michael Paquier
4b0f88e4d5 Remove standby-site option
The documentation found on internet is rather unclear about the role
and the goal of this feature, which looks more like a kludge to cover
the fact that most of the system XLOG functions do not work on standby
nodes. Now that this restriction has been removed by using the control
file to look for the current timestamp, this feature is not needed.
2013-12-13 04:14:29 +09:00
Michael Paquier
308d00b80c Obtain timeline ID with control file and not XLOG system function
The system function used up to now was pg_xlogfile_name_offset, which
cannot be used on a node in recovery, and it was the only way present
to fetch the timeline ID of a backup, either incremental or full. So
instead scan the control file of server and fetch the timeline from
that. This also removes the restriction on which a backup could not
be taken on a standby node. The next step being to have the possibility
to take backups from streams.
2013-12-13 03:55:39 +09:00
Michael Paquier
b92d722bdb Clean up the snapshot related stuff
This is not really part of the core of pg_rman, rather better to
focus on incremental backup or stuff like that.
2013-12-13 00:20:20 +09:00
Michael Paquier
2a23a50743 Simplify LSN calculation from result of pg_stop_backup
New behavior relies on XLogFromFileName instead of having a custom sscanf
doing exactly the same thing.
2013-12-12 22:56:35 +09:00
Michael Paquier
5bc716415a Begin cleanup of version-related code
Due to changes in XlogRecPtr in 9.3, older version of pg_rman are
already incompatible either way, and it is a pain to maintain code
duplicated from past versions of Postgres, so rely a maximum on the
core structures.
2013-12-12 22:20:08 +09:00
Michael Paquier
4d7bf5373c Fix uint64 cast forgotten by latest commit 2013-12-10 03:24:01 +09:00
Michael Paquier
1bc0f9baff Support pg_rman for PG_VERSION_NUM >= 9.3
In Postgres 9.3, XLogRecPtr has been changed to a unique uint64, making
the old structure based on two uint32 obsolete. Note that this makes
pg_rman incompatible with PG <= 9.2.
2013-12-10 03:21:07 +09:00
otsuka.knj@gmail.com
0144cc4fd9 - Fix possible broken backup which is getting from standby.
Use --standby-host and --standby-port, if backup is getting from standby.
- Add --hard-copy restore option.
  The option can be used to copy archive WAL to archive directory instead of symlink.



git-svn-id: http://pg-rman.googlecode.com/svn/trunk@77 182aca00-e38e-11de-a668-6fd11605f5ce
2013-09-09 09:00:13 +00:00
otsuka.knj@gmail.com
068280f4a3 Supporting PostgreSQL 9.2.
Fix a bug about --recovery-target-time.
Fix SPEC files for using normal user. (Reported by Nagayasu-san)
Fix a compiling bug on no LZLib environment.
Add restriction about Incremental backup.


git-svn-id: http://pg-rman.googlecode.com/svn/trunk@71 182aca00-e38e-11de-a668-6fd11605f5ce
2013-01-24 06:49:34 +00:00
t.katsumata1122@gmail.com
dfecc77c5e update for pg_rman 1.2.4 (support standby backup)
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@57 182aca00-e38e-11de-a668-6fd11605f5ce
2012-05-18 08:54:36 +00:00
t.katsumata1122
78eed96f63 revised for pg_rman1.2.2
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@48 182aca00-e38e-11de-a668-6fd11605f5ce
2011-11-28 04:22:05 +00:00
katsumata.tomonari@oss.ntt.co.jp
566c47a6fc release pg_rman-1.2.0.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@38 182aca00-e38e-11de-a668-6fd11605f5ce
2011-02-07 01:57:11 +00:00
itagaki.takahiro
2b4c33e263 Fix a bug to handle deleted files during backup. We should skipp those missing files during validation and restore.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@30 182aca00-e38e-11de-a668-6fd11605f5ce
2010-01-21 08:40:29 +00:00
itagaki.takahiro
18b133c544 add/fix comments.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@29 182aca00-e38e-11de-a668-6fd11605f5ce
2010-01-12 09:11:43 +00:00
itagaki.takahiro
4df4b1644f Sync the latest pgut and update copyrights.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@28 182aca00-e38e-11de-a668-6fd11605f5ce
2010-01-06 02:25:21 +00:00
itagaki.takahiro
e3b9fd4e16 Use join_path_components() if possible.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@27 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-27 07:30:55 +00:00
itagaki.takahiro
59d0911fa7 Fix a critical bug that pg_rman cannot restore database from incremental backup. Backup itself worked correctly, but restore command broke database files.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@25 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-22 07:36:31 +00:00
itagaki.takahiro
8863b7944b Adjust to be able to build on 8.3 or older versions.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@22 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-18 02:26:19 +00:00
itagaki.takahiro
fe48c34b5e Support multiple versions of postgres servers with one pg_rman binary.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@16 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-13 08:54:34 +00:00
itagaki.takahiro
08063f31f9 Fix typo in comments.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@13 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-10 13:16:08 +00:00
itagaki.takahiro
7fbb857d03 First import.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@2 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-08 00:21:28 +00:00