BackupPC-users

[BackupPC-users] Wrong user/permission in dump

2008-05-27 17:59:58
Subject: [BackupPC-users] Wrong user/permission in dump
From: Marcel Meckel <backuppc AT thermoman DOT de>
To: backuppc-users AT lists.sourceforge DOT net
Date: Wed, 28 May 2008 00:00:46 +0200
Hi,

i'm running BackupPC to backup the local machine and might
have discovered a bug regarding wrong owner/permissions of
directories/files created by BackupPC_dump.

uid(myuser)   = 1000
gid(myuser)   = 1000

uid(backuppc) = 1003
gid(backuppc) = 1003


Owner/permissions in filesystem:


# ls -lnd / /home{,/myuser,/myuser/.maildir,/myuser/.maildir/.folder}
drwxr-xr-x 19    0    0 4096 May 27 19:58 /
drwxr-xr-x  5    0    0 4096 May 27 19:13 /home
drwx------ 31 1000 1000 4096 May 27 19:56 /home/myuser
drwx------ 59 1000 1000 4096 Apr 26 19:27 /home/myuser/.maildir
drwx------  6 1000 1000 4096 Jan 13  2005 /home/myuser/.maildir/.folder


Owner/permissions in backup after
# BackupPC_dump -f myhost (created Backup #45)


# BackupPC_tarCreate -h myhost -n 45 -s / -L / | head
 40755 1003/1003           0 ./
 40755 1003/1003           0 ./home/
 40755 1003/1003           0 ./home/myuser/
   700 1000/1000           0 ./home/myuser/.maildir/
   700 1000/1000           0 ./home/myuser/.maildir/.folder/

As you can see, the permissions and user/group are wrong for the
first 3 entities.


As a result when restoring /home/myuser/.maildir to /home this afternoon
backuppc changed owner and permission on /home to the wrong values
(why did it touch /home in the first place?).



# egrep -v '(^#|^$)' /etc/backuppc/pc/myhost.pl
$Conf{XferMethod} = 'tar';
$Conf{TarClientCmd} = '/usr/bin/sudo /usr/local/bin/tarCreate -v -f - -C 
$shareName --totals';
$Conf{TarClientRestoreCmd} = '/usr/bin/sudo /usr/local/bin/tarExtract -p 
--numeric-owner --same-owner -v -f - -C $shareName';
$Conf{TarIncrArgs} = '--newer=$incrDate $fileList';
$Conf{TarFullArgs} = '$fileList';
$Conf{BackupFilesOnly} = ['/home/myuser/.maildir'];
$Conf{BackupFilesExclude} = undef;
$Conf{ClientNameAlias} = 'localhost';



# cat /usr/local/bin/tarCreate (tarExtract according)
#!/bin/sh -f

export LC_ALL=C
exec /bin/tar -c "$@"



BackupPC 3.1.0
GNU tar 1.19
Sudo 1.6.8p12



One more thing:

1. Browsing the backups via http interface and listing the contents
   of /home/myuser
2. Selecting the checkbox left to ".maildir" and click button
   "restore selection" (don't know the english version, using german one)
3. On next page change "Restore into directory" from
   "/home/myuser" to "/home"
4. Confirm
5. Next page shows

   -----------------------------------------
   | Original file/dir:   | Restore to:    |
   | myhost://home/myuser | myhost://home/ |
   -----------------------------------------

   instead of

   --------------------------------------------------
   | Original file/dir:            | Restore to:    |
   | myhost://home/myuser/.maildir | myhost://home/ |
   --------------------------------------------------

Maybe related?

Any ideas on this issue?

Marcel.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>
  • [BackupPC-users] Wrong user/permission in dump, Marcel Meckel <=