Re: [BackupPC-users] Is there any way for BackupPC to restore hard links properly?

2008-11-10 Thread Rich Rauenzahn


Craig Barratt wrote:
 This results in one subtle bug that can't be easily fixed: if you
 switch the Xfer method from tar to rsync, old backups that have
 hardlinks stored with tar won't be correctly restored with rsync.
 The workaround is generate a tar file and extract it, or switch
 the Xfer method back to tar before you do the restore.  The
 opposite case should work correctly.

 Craig

   
FYI,

If one does ever find themselves in the situation with a bunch of files 
they need to re-hardlink, I found some great utilities to do that with:

Name   : hardlink
Summary: Create a tree of hardlinks
URL: http://cvs.fedora.redhat.com/viewcvs/devel/hardlink/
License: GPL+
Description: hardlink is used to create a tree of hard links. It's used 
by kernel installation to dramatically reduce
   : the amount of diskspace used by each kernel package installed.

Name   : fdupes
Version: 1.40
Summary: Finds duplicate files in a given set of directories
URL: http://netdial.caribe.net/~adrian2/fdupes.html
License: MIT
Description: FDUPES is a program for identifying duplicate files 
residing within specified directories.




-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Is there any way for BackupPC to restore hard links properly?

2008-11-10 Thread Jeffrey J. Kosowsky
Craig Barratt wrote at about 23:06:25 -0800 on Sunday, November 9, 2008:
  Jeffrey writes:
  
   Looking at the code and the structure of the storage and attrib files,
   it doesn't seem like there is any way for BackupPC to record and
   restore hard links.
  
  Not true.  Hardlinks are stored without using hardlinks.
  
  Hardlinks are stored just like symlinks.  The attribute type is
  BPC_FTYPE_HARDLINK and the contents of the file is the path of
  the file being linked to.

This also adds an extra wrinkle to the 'delete' script I wrote that is
supposed to allow you to delete individual files (and directories)
from incremental backups.

In order to delete a hardlink, it seems that you need the following
information:

 1. If the file is the target of other hardlinks, then you need to
find all the other hard links and make another one of them the
target and restructure the linking accordingly.
 2. If the file is not the target, then if there are at least two
remaining hard links, you can just delete the file. If there
is just one remaining link (i.e., just the target), then you
need to change the target's attrib back to regular file.

Now is there any easy way to find all the hard-links pointing to a
target or would I have to first search all the attrib files for files
of type hard link and then read the corresponding files to see which
targets they are linked to?

Is there a better way or is trying to delete files that are
hard-linked a hopeless task? 
(Since they are rare, I could always just add a check to make sure
that you are not trying to delete a file/directory that is one or a
directory tree that contains hard links).

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] Archive from the command line

2008-11-10 Thread Tony Ferguson
Hi,

I have a cron job that starts an archive for me to an external HD - I would 
like this file split into 650Mb sizes so that I can dump it to a DVD if 
required.
I have set the split and the ZIP in the archive .pl file but it still does not 
split the file 

How do I get the archive to split the file from the command line?


Kind Regards
Tony Ferguson-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Is there any way for BackupPC to restore hard links properly?

2008-11-10 Thread Jeffrey J. Kosowsky
Craig Barratt wrote at about 23:06:25 -0800 on Sunday, November 9, 2008:
  Jeffrey writes:
  
   Looking at the code and the structure of the storage and attrib files,
   it doesn't seem like there is any way for BackupPC to record and
   restore hard links.
  
  Not true.  Hardlinks are stored without using hardlinks.
Thanks good to hear!
  
  Hardlinks are stored just like symlinks.  The attribute type is
  BPC_FTYPE_HARDLINK and the contents of the file is the path of
  the file being linked to.
  
  For example, if there are 4 links to a file, one instance (it
  doesn't matter which - depends on the Xfer Method) will be stored
  as a regular file.  The remaining three instances will be stored
  as type BPC_FTYPE_HARDLINK with pointers to the first file.

Dohhh... for some reason, I kept looking at the first file which of
course had a standard attrib file with type=0.

  
  Note that this is independent of the hardlinks used to de-duplicate.
  
  There is one subtlety with rsync: it also needs to remember if a
  regular file is the target of (other) hardlinks so that the correct
  file list can be generated during a restore.  This is done by using
  an extra bit in the file's mode stored in the attrib file.

Based on this, I can understand why you need to add a bit for hard link
target to the mode but according to RsyncFileIO.pm, it seems like
otherfile types are also encoded in the mode bit via the S_IFxxx
masks. For non-hard links, how does this differ from the 'type attrib?
or is it redundant.

Also, given the target how does rsync 'know' what other files are
hard-linked to it when only doing a partial restore (or is that not
necessary info)?

Further, can I assume this schemme will continue to work even if you modify the
exclude/include between incremental backups so that hard-links
variously appear/disappear?

Also, can I assume that directories are treated the same way -- and
that if so then this is one case where the directory tree won't be
completely replicated for incrementals (i.e. only the target tree will
be replicated).

  This results in one subtle bug that can't be easily fixed: if you
  switch the Xfer method from tar to rsync, old backups that have
  hardlinks stored with tar won't be correctly restored with rsync.
  The workaround is generate a tar file and extract it, or switch
  the Xfer method back to tar before you do the restore.  The
  opposite case should work correctly.
  
  Craig

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] tree connect failed: NT_STATUS_ACCESS_DENIED

2008-11-10 Thread Leandro Tracchia
i have 2 backuppc servers running.

server #1 is using backuppc version 3.0.0 and smbclient 3.0.28a
server #2 is using backuppc version 3.1.0 and smbclient 3.2.3

server #2 is a new build and i have yet to get backuppc working
properly on server #2. both servers are backing up the same client. i
copied the config.pl file from server #1 to server #2 but backuppc on
server #2 always fails (server #1 has been running for about 1 year
with no problems). i also copied over the smb.conf file. these two
servers are supposed to be doing exactly the same thing. the only
difference between them is the versions of backuppc and smbclient. by
the way, i can log in to the client through smbclient on the shell
just fine from server #2.

here is my XferLog from server #2. one thing i don't understand from
the log is the anonymous login. why is there an anonymous login if
there is a password specifed in config.pl??? anyway, can anyone tell
me what is happening here?? should i downgrade the versions??


Running: /usr/bin/smbclient daneel\\A-F -U raidmanager -E -N -d 3
-c tarmode\ full -Tc -
full backup started for share A-F
Xfer PIDs are now 7457,7456
lp_load_ex: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file /etc/samba/smb.conf
Processing section [global]
added interface eth0 ip=fe80::215:e9ff:febd:23a5%eth0
bcast=fe80:::::%eth0 netmask=:::::
added interface eth0 ip=192.168.3.60 bcast=192.168.3.255 netmask=255.255.255.0
Client started (version 3.2.3).
tdb(unnamed): tdb_open_ex: could not open file
/var/run/samba/gencache.tdb: Permission denied
resolve_lmhosts: Attempting lmhosts lookup for name daneel0x20
resolve_hosts: Attempting host lookup for name daneel0x20
Connecting to 192.168.3.2 at port 445
Doing spnego session setup (blob length=16)
server didn't supply a full spnego negprot
Got challenge flags:
Got NTLMSSP neg_flags=0x62898215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
SPNEGO login failed: Logon failure
Anonymous login successful
Domain=[LSA] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_ACCESS_DENIED
resolve_lmhosts: Attempting lmhosts lookup for name daneel0x20
resolve_hosts: Attempting host lookup for name daneel0x20
Connecting to 192.168.3.2 at port 445
Doing spnego session setup (blob length=16)
server didn't supply a full spnego negprot
Got challenge flags:
Got NTLMSSP neg_flags=0x62898215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
SPNEGO login failed: Logon failure
Anonymous login successful
Domain=[LSA] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_ACCESS_DENIED
tarExtract: Done: 0 errors, 0 filesExist, 0 sizeExist, 0
sizeExistComp, 0 filesTotal, 0 sizeTotal
Got fatal error during xfer (No files dumped for share A-F)
Backup aborted (No files dumped for share A-F)
Not saving this as a partial backup since it has fewer files than the
prior one (got 0 and 0 files versus 0)


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] $Conf{TopDir} on raid level 1

2008-11-10 Thread Leandro Tracchia
ok, thanks for everyone's help. i also found this wiki page that
explained what to do very well.

http://backuppc.wiki.sourceforge.net/change+archive+directory

look under the section Mounting on TopDir

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/