Re: [rdiff-backup-users] Have rdiff-backup not preserve permissions?

2013-03-25 Thread Dominic Raferd

Thanks Dave for reporting back that solution, so we all learned something!

Dominic

On 22/03/2013 22:29, Dave Potts wrote:

Hi,

Problem solved!  Dominic identified the problem correctly, but not the 
cure.  The thing that fixed my problems was editing the Cygwin 
/etc/fstab file as advised here:


http://stackoverflow.com/questions/5828037/cygwin-sets-file-permission-to-000

I've written up the full details here if you are interested:

http://dadhacker.blogspot.co.uk/2013/03/getting-rdiff-backup-to-work-with.html

Thanks for the help!

Dave.


On 21 March 2013 17:18, Dominic Raferd domi...@timedicer.co.uk 
mailto:domi...@timedicer.co.uk wrote:


Which version of windows? There is a known bug in Cygwin which
causes big problem under Windows 8 (but also exists under Windows
7) by which the 'group' of the cygwin user is set incorrectly.

To fix this for any future files:

- Look up the group ID of the Users group in /etc/group:
cat /etc/group|egrep '^Users:'|cut -f3 -d':'
- Edit your /etc/passwd file. Locate the record for your user. The
4th colon-delimited field is the primary group for the user,
incorrectly set to a non-existent group. Change that number to the
number you found above and save the file.
- Close the cygwin terminal and reopen. Create a new file. It
should have group Users and you should be able to change its
permissions as desired.

To correct existing files with wrong group settings use a
recursive chgrp like this (for all files in user's home):

chgrp -R Users ~


It might help?

Dominic


On 19/03/2013 22:31, Dave Potts wrote:

Hi,

I've exactly the same problems as Timothy Stella.  I'm running
cygwin on windows to debain linux.  The first backup works fine.
The second fails with permission issues on the directory I'm
backing up to.  Does anyone have a solution?

Thanks,

Dave.



===
From: Timothy Stella
Subject: [rdiff-backup-users] Have rdiff-backup not preserve
permissions?
Date: Fri, 1 Mar 2013 09:57:28 -0800
Hello,
I'm currently having a problem with rdiff-backup backing up some
data. It's running into really weird permissions issues.
I am using rdiff-backup 1.2.8 on CentOS pulling from rdiff-backup
1.2.8 on Cygwin (winxp) like so:
backup@ centos$rdiff-backup -v6
address@hidden::/cygdrive/c/files/ /mnt/backups/winserver/files/
I have it backing up a directory -- the first time the backup
runs, everything is fine. The second time, however, I get
permission issues with the local copy (the directory I am backing
up to).
I tried to remedy this by adding a chmod -R u+rwx at the end of
my script, but it doesn't seem to help.
I also tried to set the directory to 777 just to see if it'd
work, and it still fails. However, running the backup as root
does work.
It is also worth noting that other directories (separate
rdiff-backup runs) for that same server are working without issue.
I tried to look up if I can have rdiff-backup just ignore the
remote (in this case, winserver) permissions but it doesn't seem
possible. Is there any way for me to get around this other than
running that one directory as root?
Thanks!






___
rdiff-backup-users mailing list atrdiff-backup-us...@nongnu.org  
mailto:rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL:http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki



-- 
*TimeDicer* http://www.timedicer.co.uk: Free File Recovery from

Whenever

___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
mailto:rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL:
http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki




___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki



--
*TimeDicer* http://www.timedicer.co.uk: Free File Recovery from Whenever

___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


[rdiff-backup-users] rdiff-backup error / recovery failure

2013-03-25 Thread Gary Rickert
*We have been running rdiff-backup via a cron script (follows) for the last
few months against 3 systems with no problem. The backup directory is
rotated each week, and last night the initial (full) backup apparently
failed.*

*BACKUP SCRIPT:*
#!/bin/sh
logfile=/var/log/rdiff-backup.log
export update=$(date +'%H%M%S')
/bin/date +'%H%M%S'  /mySQLbackup/rdiff-backup-time.log
#echo $update  /var/log/rdiff-backup.log
exec  $logfile 21
export WEEK=$(date +'%V')
### The WEEK var is to recycle the backup each week.
### The time wrapper captures the Elapsed time, User time, CPU time, and
the percentage of CPU time used by the process.

/usr/bin/time -f VREI E=%E, U=%U, S=%S, P=%P /usr/bin/rdiff-backup
--remote-schema ssh -p3 %s /usr/bin/rdiff-backup --server
grickert@192.168.177.247::/var/www/apps/pfa2/shared/system
/mySQLbackup/VREI/$WEEK-system-rdiff-backup 2
/mySQLbackup/rdiff-backup-time.log;


*LOG:*
235901
TEST E=0:11.92, U=8.13, S=1.19, P=78%
VREI E=0:18.99, U=10.51, S=0.86, P=59%
THOM E=0:05.03, U=1.75, S=0.30, P=40%

*It appears that the above cycle (235901) went OK. When the directory
cycled it looks to have failed running the VREI cycle but no error
recorded, just stopped after the 000101 cycle.*

000101
TEST E=0:19.36, U=1.06, S=0.50, P=8%

*Then when the next cycle (000301) started against VREI, the following
error was generated, and repeated until addressed:*

000301
TEST E=0:05.76, U=0.37, S=0.06, P=7%
Found interrupted initial backup. Removing...
Exception '[Errno 39] Directory not empty:
'/mySQLbackup/VREI01/13-system-rdiff-backup/rdiff-backup-da
ta/increments/documents'' raised of class 'exceptions.OSError':
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 304,
in error_check_Main
try: Main(arglist)
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 324,
in Main
take_action(rps)
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 280,
in take_action
elif action == backup: Backup(rps[0], rps[1])
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 333,
in Backup
backup_set_rbdir(rpin, rpout)
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 452,
in backup_set_rbdir
fix_failed_initial_backup()
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 411,
in fix_failed_initial_back
up
rp.conn.rpath.delete_dir_no_files(rp)
  File /usr/lib64/python2.4/site-packages/rdiff_backup/rpath.py, line
397, in delete_dir_no_files
rp.delete()
  File /usr/lib64/python2.4/site-packages/rdiff_backup/rpath.py, line
1070, in delete
self.conn.shutil.rmtree(self.path)
  File /usr/lib64/python2.4/shutil.py, line 163, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File /usr/lib64/python2.4/shutil.py, line 172, in rmtree
onerror(os.rmdir, path, sys.exc_info())
  File /usr/lib64/python2.4/shutil.py, line 170, in rmtree
os.rmdir(path)

Traceback (most recent call last):
  File /usr/bin/rdiff-backup, line 30, in ?
rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 304,
in error_check_Main
try: Main(arglist)
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 324,
in Main
take_action(rps)
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 280,
in take_action
elif action == backup: Backup(rps[0], rps[1])
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 333,
in Backup
backup_set_rbdir(rpin, rpout)
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 452,
in backup_set_rbdir
fix_failed_initial_backup()
  File /usr/lib64/python2.4/site-packages/rdiff_backup/Main.py, line 411,
in fix_failed_initial_back
up
rp.conn.rpath.delete_dir_no_files(rp)
  File /usr/lib64/python2.4/site-packages/rdiff_backup/rpath.py, line
397, in delete_dir_no_files
rp.delete()
  File /usr/lib64/python2.4/site-packages/rdiff_backup/rpath.py, line
1070, in delete
self.conn.shutil.rmtree(self.path)
  File /usr/lib64/python2.4/shutil.py, line 163, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File /usr/lib64/python2.4/shutil.py, line 172, in rmtree
onerror(os.rmdir, path, sys.exc_info())
  File /usr/lib64/python2.4/shutil.py, line 170, in rmtree
os.rmdir(path)
OSError: [Errno 39] Directory not empty:
'/mySQLbackup/VREI01/13-system-rdiff-backup/rdiff-backup-data
/increments/documents'
Fatal Error: Lost connection to the remote system
Command exited with non-zero status 1
VREI E=0:03.21, U=0.15, S=0.16, P=9%
THOM E=0:07.81, U=0.43, S=0.19, P=7%
000501
TEST E=0:04.31, U=0.38, S=0.08, P=10%
Found interrupted initial backup. Removing...
Fatal Error: Bad rdiff-backup-data dir on destination side

The rdiff-backup data directory
/mySQLbackup/VREI01/13-system-rdiff-backup/rdiff-backup-data
exists, but we cannot find a valid current_mirror marker.  You can
avoid this message by removing the rdiff-backup-data directory;