rsync: failed to set times on "/opt/postgres/.": Operation not permitted

953 views
Skip to first unread message

杨华杰

unread,
Apr 17, 2013, 4:00:00 AM4/17/13
to pgba...@googlegroups.com
barman$barman recover main 20130417T153929 /opt/postgres

when I execute the above command, I faced this error message, here is the log information.


2013-04-17 15:55:01,255 barman.backup INFO: Processed file /var/lib/barman/main/incoming/00000001000000000000001A
2013-04-17 15:55:39,857 barman.backup INFO: Starting local restore for server main using backup 20130417T153929 
2013-04-17 15:55:39,858 barman.backup INFO: Destination directory: /opt/postgres/
2013-04-17 15:55:39,858 barman.backup INFO: Copying the base backup.
2013-04-17 15:55:39,914 root ERROR: ERROR: Unhandled exception. See log file for more details.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/barman/cli.py", line 453, in main
    p.dispatch(pre_call=global_config, output_file=_output_stream)
  File "/usr/lib/python2.7/dist-packages/argh/helpers.py", line 47, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/argh/dispatching.py", line 121, in dispatch
    for line in lines:
  File "/usr/lib/python2.7/dist-packages/argh/dispatching.py", line 197, in _execute_command
    for line in result:
  File "/usr/lib/python2.7/dist-packages/argh/dispatching.py", line 185, in _call
    for line in result:
  File "/usr/lib/python2.7/dist-packages/barman/cli.py", line 221, in recover
    remote_command=args.remote_ssh_command
  File "/usr/lib/python2.7/dist-packages/barman/backup.py", line 608, in recover
    self.recover_basebackup_copy(backup, dest, remote_command)
  File "/usr/lib/python2.7/dist-packages/barman/backup.py", line 911, in recover_basebackup_copy
    raise Exception("ERROR: data transfer failure")
Exception: ERROR: data transfer failure

Michael Williamson

unread,
Mar 20, 2014, 11:46:42 AM3/20/14
to pgba...@googlegroups.com
I am having this same exact trouble.  Did you find a solution?

Giulio Calacoci

unread,
Mar 20, 2014, 12:21:26 PM3/20/14
to pgba...@googlegroups.com
Hi Michael,

I have some question for you,

which barman version are you using?

coul you please provide us the output of:

* barman check <servername>
* barman status <servername>

which is the command generating this error (backup, recovery ...) ?

could you provide us a snippet of the logfile regarding this error?

Thank you.

Giulio

Andres Carrion

unread,
Apr 14, 2015, 5:42:28 AM4/14/15
to pgba...@googlegroups.com
Hello all,

I have the same problem with barman 1.4.0

bash-4.1$ barman recover --target-time 20150413T140001 main 20150412T140001 /var/tmp/barman/
Processing xlog segments for main
    00000001000025F7000000B9
    00000001000025F7000000BA
    00000001000025F7000000BB
    00000001000025F7000000BC
    00000001000025F7000000BD
    00000001000025F7000000BE
    00000001000025F7000000BF
    00000001000025F7000000C0
    00000001000025F7000000C1
    00000001000025F7000000C2
    00000001000025F7000000C3
    00000001000025F7000000C4
    00000001000025F7000000C5
    00000001000025F7000000C6
    00000001000025F7000000C7
    00000001000025F7000000C8
    00000001000025F7000000C9
Starting local restore for server main using backup 20150412T140001
Destination directory: /var/tmp/barman/
Doing PITR. Recovery target time: '2015-04-13 14:00:01'
Copying the base backup.
EXCEPTION: Failure copying base backup: data transfer failure on directory 'var/tmp/barman/'
rsync error:
.d..tp..... ./
.d          base/
.d          base/1/
.d          base/12865/
.d          base/12870/
.d          base/16384/
.d          base/6589465/
.d          base/pgsql_tmp/
.d          global/
.d          pg_clog/
.d          pg_log/
.d          pg_multixact/
.d          pg_multixact/members/
.d          pg_multixact/offsets/
.d          pg_notify/
.d          pg_serial/
.d          pg_snapshots/
.d          pg_stat_tmp/
.d          pg_subtrans/
.d          pg_tblspc/
.d          pg_twophase/
.d          pg_xlog/
rsync: failed to set times on "/var/tmp/barman/.": Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

bash-4.1$ barman status main
Server main:
    Description: main
    PostgreSQL version: 9.2.9
    pgespresso extension: Not available
    PostgreSQL Data directory: /var/lib/pgsql/9.2/data
    PostgreSQL 'archive_command' setting: rsync -aq %p bar...@192.168.76.8:/var/lib/barman/main/incoming/%f
    Last archived WAL: 00000001000025F8000000BC
    Current WAL segment: 00000001000025FB0000000D
    Retention policies: enforced (mode: auto, retention: RECOVERY WINDOW OF 2 DAYS, WAL retention: MAIN)
    No. of available backups: 1
    First available backup: 20150412T140001
    Last available backup: 20150412T140001
    Minimum redundancy requirements: satisfied (1/0)

bash-4.1$ barman check main
Server main:
    ssh: OK
    PostgreSQL: OK
    archive_mode: OK
    archive_command: OK
    directories: OK
    retention policy settings: OK
    backup maximum age: OK (interval provided: 7 days, latest backup age: 1 day, 21 hours, 12 minutes)
    compression settings: OK
    minimum redundancy requirements: OK (have 1 backups, expected at least 0)

Giulio Calacoci

unread,
Apr 14, 2015, 7:24:53 AM4/14/15
to pgba...@googlegroups.com
Hi Andres,

the recovery command failed because rsync returned an error:

"rsync: failed to set times on "/var/tmp/barman/.": Operation not permitted (1) "

This is probably an ownership/right issue,
could you please provide the result of :
* ls -ld /var/tmp
* ls -ld /var/tmp/barman
* mount

Regards
Giulio

--
--
You received this message because you are subscribed to the "Barman for PostgreSQL" group.
To post to this group, send email to pgba...@googlegroups.com
To unsubscribe from this group, send email to
pgbarman+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pgbarman?hl=en?hl=en-GB

---
You received this message because you are subscribed to the Google Groups "Barman, Backup and Recovery Manager for PostgreSQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pgbarman+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
 Giulio Calacoci - 2ndQuadrant Italia
 PostgreSQL Training, Services and Support
 giulio....@2ndQuadrant.it | www.2ndQuadrant.it 

Andres Carrion

unread,
Apr 14, 2015, 11:03:18 AM4/14/15
to pgba...@googlegroups.com
Hi Giulio,

You are right, creating the folder with barman user problem solve.

Thank you very much for your help
Andres
 giulio.calacoci@2ndQuadrant.it | www.2ndQuadrant.it 
Reply all
Reply to author
Forward
0 new messages