1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-28 09:33:54 +02:00
Commit Graph

60 Commits

Author SHA1 Message Date
Anastasia
5adeae5fdd clarify usage of backup_content.control key 'is_datafile', add key 'is_cfs' 2017-06-14 15:27:16 +03:00
Anastasia
57d1fa7c5e comments cleanup 2017-06-07 16:28:22 +03:00
Anastasia
310882b539 Implement backup data compression. Add options --compress-algorithm, --compress-level 2017-06-05 12:09:07 +03:00
Anastasia
4e94454544 1. Implement backup of multiple instances. Add option --instance, commands add-instance and del-instance.
2. Implement pg_probackup specific commands for archiving: archive-push for archive_command and archive-get for restore_command
2017-05-29 18:52:43 +03:00
Anastasia
be25c3e4db fix check_tablespace_mapping 2017-04-28 23:38:18 +03:00
Arthur Zakirov
72c5d0d115 Add crazy function get_control_value().
It parses json-like lines of backup_content.control file.
2017-04-22 23:27:56 +03:00
Arthur Zakirov
0077a78871 Fix dir_read_file_list().
It missed that names and values have quotes and did not check ptr for NULL.
2017-04-21 19:46:19 +03:00
Arthur Zakirov
8dea09ca1a Improve comments. Add pgBackupGetBackupMode() 2017-04-21 14:54:33 +03:00
Anastasia
a2bcbc77bd check file format in dir_list_file 2017-04-21 11:41:20 +03:00
Arthur Zakirov
28626dcdb1 Fix little bugs.
- scan segno in dir_read_file_list()
- check backup_path in main() if 'backup_path == NULL'
2017-04-20 15:01:29 +03:00
Anastasia
5e0e881ce0 New option: delete --expired. Minor bugfixes. 2017-04-19 17:58:58 +03:00
Anastasia
31efd8f598 Format change: file_database.txt is renamed to backup_content.control. Now it has json format. 2017-04-18 23:15:17 +03:00
Anastasia
f833ca624b Code cleanup: backup, restore. Still WIP. Something can be broken. 2017-04-18 11:41:02 +03:00
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