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

49 Commits

Author SHA1 Message Date
Arthur Zakirov
61475a8292 Remove unnecessary do_deletewal() function 2017-04-25 13:49:16 +03:00
Arthur Zakirov
1cd6a9762d Free base36enc's results 2017-04-21 12:06:07 +03:00
Arthur Zakirov
e861c7f7f2 Little fixes
- read parent-backup-id not parent_backup
- sort backup_files_list only for ptrack backup
2017-04-21 11:54:00 +03:00
Anastasia
12cc3a1491 Format change backup.conf is renamed to backup.control 2017-04-19 12:01:10 +03:00
Anastasia
f833ca624b Code cleanup: backup, restore. Still WIP. Something can be broken. 2017-04-18 11:41:02 +03:00
Anastasia
75534a00be Code cleanup. Unify restore and validate. Remove unused functions. 2017-04-13 19:37:29 +03:00
Anastasia
612070c48d Code cleanup. remove unused check option 2017-04-12 17:39:20 +03:00
Artur Zakirov
a40f1f523c Refactor do_delete() function 2017-04-06 15:34:34 +03:00
Artur Zakirov
a5e2c831b1 Remove all increments, even backups with errors 2017-04-06 12:48:50 +03:00
Artur Zakirov
cc1d1edbac Change retention purge command finish message 2017-03-27 15:24:42 +03:00
Artur Zakirov
30681560c0 Revert: Check in SHOW command that backups in RUNNING status 2017-03-06 12:46:15 +03:00
Artur Zakirov
6fedb2e546 Check in SHOW command that backups in RUNNING status 2017-03-06 11:55:12 +03:00
Artur Zakirov
733cf37195 Use pg_probackup.pid file instead of locking pg_probackup.conf 2017-03-01 18:18:40 +03:00
Artur Zakirov
b67dd1e2ea Update copyright 2017-03-01 16:50:07 +03:00
Artur Zakirov
a3e5458166 Fix do_validate() and do_restore() 2017-02-16 19:44:16 +03:00
Artur Zakirov
a997235f89 Remove sanityChecks(). Fix add_files() 2017-02-16 17:23:43 +03:00
Artur Zakirov
aa271784ed Fixes for retention and validate commands 2017-02-15 20:44:06 +03:00
Artur Zakirov
eb531bc490 WAL delete fixes 2017-02-15 18:28:34 +03:00
Artur Zakirov
bf2830bad5 Fix tests for retention policy. Compare WAL segments without timelineid 2017-02-14 14:31:15 +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
Arthur Zakirov
976694f1a3 Add retention show|purge commands. Add tests and documentation. 2017-02-12 23:42:10 +03:00
stalkerg
9d31d4a1be Allow remove ERRORs backup and CORRUPTs. 2016-11-22 15:20:39 +03:00
stalkerg
3ad6aaab89 Verbose min/max segment in delwal. 2016-11-21 18:16:35 +03:00
stalkerg
d9c11e4307 Show removed wal segments without verbose mode. 2016-11-17 19:28:07 +03:00
stalkerg
188bbdd593 Rename project to pg_probackup. 2016-11-16 20:34:21 +03:00
stalkerg
7ba03021c5 Refactor delete command and add delwal command. 2016-11-16 17:38:11 +03:00
stalkerg
a9040229a5 Get current timeline from wal dir.
Also add recovery_target = 'immediate' for some case.
2016-11-16 15:14:50 +03:00
stalkerg
c1f1627c0b Rewrite delete backup logic. 2016-11-09 17:29:48 +03:00
stalkerg
9f2ad9d822 Remove date range and start use base36 from start_time as backup ID. 2016-10-31 18:19:11 +03: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
f2c523b1ee Remove un-needed WAL segments from archive at backup deletion
During the execution of the "delete" command, the oldest start LSN is saved
and used to determine what is the oldest WAL segment that needs to be kept
for the existing backups. Like pg_archivecleanup, the implemented logic
ignores the timeline part of the WAL segment name, ensuring that a segment
from a parent timeline will not be removed prematurely. This logic could
be made more complicated regarding this matter, but in order to take backups
from a node on a given timeline this is far enough.
2016-01-18 16:11:47 +09:00
Michael Paquier
a5afc8758e Improve a couple of comments in backup.c 2016-01-18 15:24:28 +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
c8ebcc9c41 Rename project to pg_arman
This is officially a fork!
2014-01-27 12:02:56 +09:00
Michael Paquier
820485d225 Strip off archive backup mode
This mode is not actually necessary if we consider that the core of
pg_rman is the obtention of differential and full backups, the server
being afterwards in charge to recover necessary WAL segments from the
archive.

Regression tests and documentation are updated in accordance to the
changes.
2014-01-24 22:37:55 +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
342496e331 Fix incremental and archive backup removal on delete command
The previous algorithm was smart enough to remove full backups older
than the given number of generations, but not enough to remove
incremental and archive backups. This resulted in keeping in the backup
list a set of incremental and archive backups older than the latest
full backup allowed. As it is useless to keep them, the deletion
algorithm is made smarter to take that into account and remove all of
them cleanly only when necessary.
2014-01-17 22:02:27 +09:00
Michael Paquier
1c3512fadf Fix old backup removal for specified number of days
Backups could be removed even if generation number was set to infinite
without caring of the day threashold calculated. Backups are removed
if they either satisfy the generation or the day threshold.
2014-01-10 08:42:54 +09:00
Michael Paquier
9cd8e33508 Remove undocumented option "force" for delete command
This was in code, not in the docs...
2014-01-10 02:57:15 +09:00
Michael Paquier
fcaae1a34b Allow only one keep parameter to trigger backup deletion
Having files satisfying both conditions seems somewhat awkward, as users
would usually choose either the number of generations to keep or the
amount of days to keep the files. Hence deletion of a backup is bypassed
only when both parameters are set to infinite.

At the same time correct some typos and incorrections in the deletion
code.
2014-01-10 02:37:33 +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
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
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
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