1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-01 09:51:43 +02:00
Commit Graph

47 Commits

Author SHA1 Message Date
Anastasia
1315723dc5 remove unused pgut-port files 2017-04-11 20:25:00 +03:00
Artur Zakirov
b31485640b Read recovery_time and recovery_xid from WAL segments whenever possible 2017-03-24 16:58:35 +03:00
Anastasia
83f26c503b Exclude additional directories and files in pgdata_exclude_dir[] and pgdata_exclude_files[] 2017-03-13 18:04:46 +03:00
Artur Zakirov
8bd2248ac4 Do not skip subdirectories if parent directory contains a file 2017-03-09 14:01:11 +03:00
Artur Zakirov
b67dd1e2ea Update copyright 2017-03-01 16:50:07 +03:00
Artur Zakirov
957de55a85 Check that OLDDIR has an entry in links first 2017-03-01 12:35:26 +03:00
Artur Zakirov
5bc8d459e0 Do not create tablespace_map.txt file 2017-02-27 13:32:11 +03:00
Arthur Zakirov
d7b9fe0b18 Added tablespace-mapping option.
mkdirs.sh is not created now during backup.
Tests were updated.
2017-02-25 15:12:07 +03:00
Artur Zakirov
6485b9f647 Check if restore destination exists 2017-02-20 13:39:51 +03:00
Artur Zakirov
a997235f89 Remove sanityChecks(). Fix add_files() 2017-02-16 17:23:43 +03:00
Artur Zakirov
0bdffbcfe5 Merge branch 'simplify_backup_data_file' into ptrack 2017-02-15 12:18:42 +03:00
Artur Zakirov
de2a0d1cde Fix for 9c471aa0e0.
pgdata_exclude[] doesn't exclude files. Add pgdata_exclude_files[].
2017-02-13 14:11:00 +03:00
Artur Zakirov
9c471aa0e0 Exclude postmaster.pid and postmaster.opts from backup 2017-02-13 11:49:55 +03:00
Anastasia
2ec6bc67f4 Implement incremental backup of compressed files, both page and ptrack do the same. Adds two columns to the list of files. 2017-02-13 11:44:53 +03:00
stalkerg
188bbdd593 Rename project to pg_probackup. 2016-11-16 20:34:21 +03:00
stalkerg
3e49dd17c5 Fix make mkdir.sh if tablespace path have root path. 2016-11-02 20:19:37 +03:00
stalkerg
c2b2accb26 Exclude recovery.conf during backup. 2016-11-02 15:44:38 +03:00
stalkerg
c67832583e Add backup_label to file_database.txt for all checks. 2016-09-29 19:44:59 +03:00
stalkerg
fb4ae4a235 Fix recalc checksums during restore for segno > 0. 2016-09-13 19:50:59 +03:00
stalkerg
02ac17bb6b Add load balance for backup threads. 2016-09-02 19:31:49 +03:00
stalkerg
3eb1013baa Exclude pg_log by default and add option for start beckup. 2016-09-02 18:31:06 +03:00
stalkerg
589d8ddf98 We must not call qsort in recursive function. 2016-09-02 18:10:19 +03:00
stalkerg
091fe0ada2 Fix backup many segments of relation (big relations) with ptrack.
Add fail test for show problem in lost pages in backup process.
2016-05-01 22:05:18 +03:00
stalkerg
fb720188d8 Fix work under BSD. 2016-03-24 18:30:25 +03:00
Zhuravlev Uriy aka stalkerg
9c475eccbf First version of ptrack support. 2016-02-27 21:07:55 +03:00
Michael Paquier
1ae2feb38f Fix inconsistency in call of readlink()
If the target path is too long, an error needs to be emitted as well.
The buffer is correctly null-terminated, this will just avoid running
into weird problems should the target have a too long name.
2016-01-20 13:13:32 +09:00
Michael Paquier
5c37daca69 Sanitize error checks
All the ERROR_* fields are removed in favor of a more simple layer
made of ERROR, FATAL, PANIC. The two last ones are not actually used
yet, thought there should be some code paths that would need more
polishing on this matter.

The error message emitted before leaving should be fine to let the
user know what is happening.
2016-01-19 12:41:30 +09:00
Michael Paquier
0106bf9c5a Remove NOT_USED section 2016-01-15 23:52:31 +09:00
Michael Paquier
04834e73c7 Page-level backup using block tracking in WAL records
This commit improves the performance of page-level, or differential
backup, by not having to scan anymore all the pages of a relation file,
something that can be very long on large data sets, but by scanning the
list of blocks changed by WAL records since the last full or differential
backup.

As a restriction and to avoid potential data corruption should hint-bit
updates occur on a page, backups can only be taken from a server that has
wal_log_hints or data checksums enabled.

Base patch by Yury Zhuravlev, heavily modified by me.
2016-01-15 23:47:38 +09:00
Michael Paquier
f94c5ab447 Sanitize logging facility
--debug and --verbose had actually the same meaning as they were aimed
at giving to the user information regarding how the process is running,
hence both options are merged into --verbose and use elog(LOG) to decide
if a given message should be printed out depending on the verbosity of
the call. This makes a couple of routines more readable as they do not
depend on any boolean checks.

The "_()" have been removed from the code, those are aimed at being used
for translation but having them mandatorily in each log message is just
useless noise. If needed, pgut.c should be updated in consequence to
have a more portable facility.

At the same time this commit takes care of putting into correct shape
some code paths more in-line with PostgreSQL policy. There are surely
more of this kind of ugly stuff but at this stage things are more simple
and more manageable.
2016-01-14 16:36:39 +09:00
Michael Paquier
3ac6d13329 Remove --compress-data/-Z
Performance of compression is quite questionable on many objects like
that and makes the routines aimed at managing file copy, backup and restore
more complicated than they should be.

This commit results in a largely simplified code in data.c, which will
be helpful when integrating differential backup using WAL file lookup.
2016-01-14 15:19:38 +09:00
Michael Paquier
25ebddb02b Update CRC32 algorithm to CRC32C
This is to be compatible with Postgres >= 9.5 that switched to a more
performant algorithm.

Per reminder from Zhuravlev Uriy.
2015-12-07 21:44:33 +09:00
Michael Paquier
c8ebcc9c41 Rename project to pg_arman
This is officially a fork!
2014-01-27 12:02:56 +09:00
Michael Paquier
5988e6bd10 Remove server backup feature
In order to keep only the core of pg_rman for incremental/differential
backup, this looks necessary and makes the code more simple. Including
server log files in a backup could be subject to discussion as well,
as for example a Postgres base backup does not include them, just
because in this case server instance is not aware of the log files.
2014-01-24 20:37:13 +09:00
Michael Paquier
3af0a65383 Fix create_dir not working properly for OSX
This makes pg_rman working normally, caused by some OS-related subtility...
2013-12-15 21:32:02 +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
98b6bac4b9 Convert newline characters from CRLF to LF.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@70 182aca00-e38e-11de-a668-6fd11605f5ce
2013-01-24 06:35:48 +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
9df43a0ad2 Yet another fixes for DST.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@35 182aca00-e38e-11de-a668-6fd11605f5ce
2010-06-01 06:48:21 +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
182444045c Fix typo and cleanup.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@26 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-22 22:47:10 +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
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