Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8547219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:13:11+00:00 2026-06-11T13:13:11+00:00

I’m learning on postgreSQL(9.0.1) especially pg_rman (1.1.2) these days… What I’ve done is …..

  • 0

I’m learning on postgreSQL(9.0.1) especially pg_rman(1.1.2) these days…

What I’ve done is …..

  1. create two tables t1, t2;
  2. pg_rman installation.
  3. pg_rman init -B $RBACKUP_PATH
  4. pg_rman validate -B $RBACKUP_PATH
  5. drop tables t1, t2;
  6. pg_ctl stop -m fast
  7. pg_rman restore -B $RBACKUP_PATH

everyting works fine but…
When I starts up postgresql server process…. some sort fo messages are there like:

cp: cannot stat `/postDATA/ARCHIVE_LOG/00000007000000000000000E': No such file or directory

Anyway, if everything is working well, t1, t2 tables which I created before taking full backup must be there, Am i right? If so, my scripts are bellow…

localhost.localdomain:[/postDATA/RBACKUP]psql -d user1db -U user1
psql (9.0.1)
Type "help" for help.

user1db=> create table t1(col1 char(1));
CREATE TABLE
user1db=> insert into t1 values('1');
INSERT 0 1
user1db=> insert into t1 values('1');
INSERT 0 1
user1db=> insert into t1 values('1');
INSERT 0 1
user1db=> insert into t1 values('1');
INSERT 0 1
user1db=> insert into t1 values('1');
INSERT 0 1
user1db=> insert into t1 values('1');
INSERT 0 1
user1db=> insert into t1 values('1');
INSERT 0 1
user1db=> insert into t1 values('1');
INSERT 0 1
user1db=> insert into t1 values('1');
INSERT 0 1

user1db=> create table t2(col1 char(1));
CREATE TABLE
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> insert into t2 values('1');
INSERT 0 1
user1db=> \q

localhost.localdomain:[/home/postgres]ll
total 17592
-rwxrwxr-x 1 postgres postgres    67103 Aug 10 16:24 pg_rman-1.1.2.tar.gz
drwxrwxr-x 6 postgres postgres     4096 Aug 13 17:04 postgresql-9.0.1
-rwxrwxrwx 1 postgres postgres 17898437 Aug  6 10:10 postgresql-9.0.1.tar.gz

localhost.localdomain:[/home/postgres]tar -xvzf pg_rman-1.1.2.tar.gz
pg_rman/
pg_rman/delete.c
pg_rman/pg_rman.c
pg_rman/pgut/
pg_rman/pgut/pgut.h
pg_rman/pgut/pgut-port.h
pg_rman/pgut/pgut-port.c
pg_rman/pgut/pgut.c
pg_rman/pgsql_src/
pg_rman/pgsql_src/COPYRIGHT.pgsql_src
pg_rman/pgsql_src/pg_crc.c
pg_rman/pgsql_src/pg_ctl.c
pg_rman/data/
pg_rman/data/sample_backup/
pg_rman/data/sample_backup/20090601/
pg_rman/data/sample_backup/20090601/170553/
pg_rman/data/sample_backup/20090601/170553/file_arclog.txt
pg_rman/data/sample_backup/20090601/170553/backup.ini
pg_rman/data/sample_backup/20090601/170553/srvlog/
pg_rman/data/sample_backup/20090601/170553/arclog/
pg_rman/data/sample_backup/20090601/170553/database/
pg_rman/data/sample_backup/20090601/170553/database/PG_VERSION
pg_rman/data/sample_backup/20090601/170553/file_database.txt
pg_rman/data/sample_backup/backup/
pg_rman/data/sample_backup/pg_rman.ini
pg_rman/data/sample_backup/20090531/
pg_rman/data/sample_backup/20090531/170553/
pg_rman/data/sample_backup/20090531/170553/file_arclog.txt
pg_rman/data/sample_backup/20090531/170553/backup.ini
pg_rman/data/sample_backup/20090531/170553/srvlog/
pg_rman/data/sample_backup/20090531/170553/arclog/
pg_rman/data/sample_backup/20090531/170553/database/
pg_rman/data/sample_backup/20090531/170553/database/PG_VERSION
pg_rman/data/sample_backup/20090531/170553/file_database.txt
pg_rman/data/sample_backup/timeline_history/
pg_rman/data/sample_backup/20090602/
pg_rman/data/sample_backup/20090602/170553/
pg_rman/data/sample_backup/20090602/170553/backup.ini
pg_rman/data/sample_backup/20090602/170553/srvlog/
pg_rman/data/sample_backup/20090602/170553/arclog/
pg_rman/data/sample_backup/20090602/170553/database/
pg_rman/data/sample_backup/20090603/
pg_rman/data/sample_backup/20090603/170553/
pg_rman/data/sample_backup/20090603/170553/file_arclog.txt
pg_rman/data/sample_backup/20090603/170553/backup.ini
pg_rman/data/sample_backup/20090603/170553/srvlog/
pg_rman/data/sample_backup/20090603/170553/arclog/
pg_rman/data/sample_backup/20090603/170553/database/
pg_rman/data/sample_backup/20090603/170553/file_srvlog.txt
pg_rman/data/sample_backup/20090603/170553/file_database.txt
pg_rman/show.c
pg_rman/data.c
pg_rman/init.c
pg_rman/backup.c
pg_rman/dir.c
pg_rman/xlog.c
pg_rman/parray.h
pg_rman/COPYRIGHT
pg_rman/pg_rman.h
pg_rman/sql/
pg_rman/sql/option.sql
pg_rman/sql/option.sh
pg_rman/sql/backup.sql
pg_rman/sql/init.sql
pg_rman/sql/backup_restore.sh
pg_rman/sql/show_validate.sql
pg_rman/sql/backup_restore.sql
pg_rman/Makefile
pg_rman/parray.c
pg_rman/restore.c
pg_rman/catalog.c
pg_rman/util.c
pg_rman/validate.c
pg_rman/expected/
pg_rman/expected/option.out
pg_rman/expected/backup_restore.out
pg_rman/expected/show_validate.out
pg_rman/expected/init.out

localhost.localdomain:[/home/postgres]cd pg_rman

localhost.localdomain:[/home/postgres/pg_rman]make USE_PGXS=1
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o backup.o backup.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o catalog.o catalog.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o data.o data.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o delete.o delete.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o dir.o dir.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o init.o init.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o parray.o parray.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pg_rman.o pg_rman.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o restore.o restore.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o show.o show.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o util.o util.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o validate.o validate.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o xlog.o xlog.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pgsql_src/pg_ctl.o pgsql_src/pg_ctl.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pgsql_src/pg_crc.o pgsql_src/pg_crc.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pgut/pgut.o pgut/pgut.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/pgsql/include -I. -I. -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o pgut/pgut-port.o pgut/pgut-port.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv backup.o catalog.o data.o delete.o dir.o init.o parray.o pg_rman.o restore.o show.o util.o validate.o xlog.o pgsql_src/pg_ctl.o pgsql_src/pg_crc.o pgut/pgut.o pgut/pgut-port.o -L/usr/local/pgsql/lib -lpgport -L/usr/local/pgsql/lib -lpq -L/usr/local/pgsql/lib -L/usr/lib  -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags  -lpgport -lxml2 -lpam -lz -lreadline -ltermcap -lcrypt -ldl -lm  -o pg_rman

localhost.localdomain:[/home/postgres/pg_rman]make USE_PGXS=1 install
/bin/mkdir -p '/usr/local/pgsql/bin'
/bin/sh /usr/local/pgsql/lib/pgxs/src/makefiles/../../config/install-sh -c  pg_rman '/usr/local/pgsql/bin

localhost.localdomain:[/home/postgres/pg_rman]egrep -i "wal_level|archive_mode|archive_command" $PGDATA/postgresql.conf
wal_level = archive         # minimal, archive, or hot_standby
archive_mode = on       # allows archiving to be done
archive_command = 'cp -i %p /postDATA/ARCHIVE_LOG/%f'       # command to use to archive a logfile segment

localhost.localdomain:[/home/postgres/pg_rman]pg_rman init -B /postDATA/RBACKUP
INFO: ARCLOG_PATH is set to '/postDATA/ARCHIVE_LOG'
INFO: SRVLOG_PATH is set to '/postDATA/DATA/pg_log'

localhost.localdomain:[/home/postgres/pg_rman]cd /postDATA/RBACKUP

localhost.localdomain:[/postDATA/RBACKUP]ll
total 24
drwx------ 4 postgres postgres 4096 Aug 14 09:43 backup
-rw-rw-r-- 1 postgres postgres   73 Aug 14 09:43 pg_rman.ini
drwx------ 2 postgres postgres 4096 Aug 14 09:43 timeline_history
localhost.localdomain:[/postDATA/RBACKUP]vi pg_rman.ini
ARCLOG_PATH='/postDATA/ARCHIVE_LOG'
SRVLOG_PATH='/postDATA/DATA/pg_log'
~                                                                                                                                                                                                                                
~                                                                                                                                                                                                                                
~                                                                                                                                                                                                                                
~         
"pg_rman.ini" 3L, 73C
localhost.localdomain:[/postDATA/RBACKUP]pg_rman -B /postDATA/RBACKUP show
============================================================================
Start                Time   Total    Data     WAL     Log  Backup   Status  
============================================================================

localhost.localdomain:[/postDATA/RBACKUP]pg_rman backup -B /postDATA/RBACKUP -b f
INFO: database backup start
NOTICE:  pg_stop_backup complete, all required WAL segments have been archived

localhost.localdomain:[/postDATA/RBACKUP]pg_rman -B /postDATA/RBACKUP show
============================================================================
Start                Time   Total    Data     WAL     Log  Backup   Status  
============================================================================
2012-08-14 09:46:37    4m    26MB    ----   318MB    ----   344MB   DONE

localhost.localdomain:[/postDATA/RBACKUP]pg_rman -B /postDATA/RBACKUP validate
INFO: validate: 2012-08-14 09:46:37

localhost.localdomain:[/postDATA/RBACKUP]pg_rman -B /postDATA/RBACKUP show
============================================================================
Start                Time   Total    Data     WAL     Log  Backup   Status  
============================================================================
2012-08-14 09:46:37    4m    26MB    ----   318MB    ----   344MB   OK

localhost.localdomain:[/postDATA/RBACKUP]psql -d user1db -U user1
psql (9.0.1)
Type "help" for help.

user1db=> \d
       List of relations
 Schema | Name | Type  | Owner 
--------+------+-------+-------
 public | t1   | table | user1
 public | t2   | table | user1
user1db=> drop table t1;
DROP TABLE
user1db=> drop table t2;
DROP TABLE
user1db=> \d
No relations found.
user1db=> \q

localhost.localdomain:[/postDATA/RBACKUP]pg_ctl stop -m fast
LOG:  received fast shutdown request
LOG:  aborting any active transactions
waiting for server to shut down....LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
 done
server stopped

localhost.localdomain:[/postDATA/RBACKUP]pg_rman restore -B /postDATA/RBACKUP
INFO: validate: 2012-08-14 09:46:37
INFO: restore complete. Recovery starts automatically when the PostgreSQL server is started.

localhost.localdomain:[/postDATA/RBACKUP]pg_ctl start
server starting
localhost.localdomain:[/postDATA/RBACKUP]LOG:  database system was interrupted; last known up at 2012-08-14 09:46:57 KST
LOG:  restored log file "00000007.history" from archive
LOG:  restored log file "00000007.history" from archive
LOG:  starting archive recovery
LOG:  restored log file "00000007000000000000000C" from archive
LOG:  redo starts at 0/C000070
LOG:  consistent recovery state reached at 0/D000000
LOG:  restored log file "00000007000000000000000D" from archive
cp: cannot stat `/postDATA/ARCHIVE_LOG/00000007000000000000000E': No such file or directory
LOG:  record with zero length at 0/E000070
LOG:  redo done at 0/E000020
LOG:  last completed transaction was at log time 2012-08-14 09:59:05.321848+09
cp: cannot stat `/postDATA/ARCHIVE_LOG/00000008.history': No such file or directory
LOG:  selected new timeline ID: 8
LOG:  restored log file "00000007.history" from archive
LOG:  archive recovery complete
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections

localhost.localdomain:[/postDATA/RBACKUP]psql -d user1db -U user1
psql (9.0.1)
Type "help" for help.

user1db=> \d
No relations found.

How can I get my tables(t1, t2) back through the backup???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:13:12+00:00Added an answer on June 11, 2026 at 1:13 pm

    The problem here is that you restore the backup completely. This means that you actually restore to the point to after the tables have been dropped.

    You can see that from the lines:

    INFO: validate: 2012-08-14 09:46:37
    

    and

    LOG:  last completed transaction was at log time 2012-08-14 09:59:05.321848+09
    

    This is probably due to the fact that you still have your archive logs left in the directory.
    What you need to do is either remove everything in /postDATA/ARCHIVE_LOG/ before doing the restore/startup of the database (here I assume that pg_rman archives all archive logs needed for the restore into the backup directory), or you need to modify the recovery.conf file and add a timestamp up to which point you want to restore (which should be a time before the drop), and add the parameter recovery_target_time.

    pg_rman is supposed to support adding that automatically if specified, but I am not certain if that works as intended.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I've tracked down a weird MySQL problem to the two different ways I was
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.