backuppc-notes
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| backuppc-notes [2015/04/17 17:43] – snarg | backuppc-notes [2018/11/26 09:00] (current) – snarg | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | === Notes on transfering backuppc pc directories *with* hardlinks === | + | ==== Notes on transfering backuppc pc directories *with* hardlinks |
| - | == Untarring with hardlinks == | + | === Untarring with hardlinks |
| The command for extracting a tar made with BackupPC_tarPCCopy: | The command for extracting a tar made with BackupPC_tarPCCopy: | ||
| < | < | ||
| Line 7: | Line 7: | ||
| (the P is important) | (the P is important) | ||
| - | == Piping the restore | + | === Piping the transfe |
| on source server: | on source server: | ||
| < | < | ||
| Line 15: | Line 15: | ||
| < | < | ||
| nc -l -p 9800 | tar -xPpvf -</ | nc -l -p 9800 | tar -xPpvf -</ | ||
| + | |||
| + | If getting a heap of "Cant find xx/x/x in pool, will copy file" errors - It could be because at some point backuppc was configured to not use the compressed pool. Try this patch which checks both pools for the file when generating a hardlink for the pipe to tar. | ||
| + | < | ||
| + | --- / | ||
| + | +++ / | ||
| + | @@ -496,6 +496,32 @@ | ||
| + | } | ||
| + | $i++; | ||
| + | } | ||
| + | + | ||
| + | + if ( ! defined($linkName) ) { | ||
| + | + # now second take for the non compressed pool (next line sets compressed flag to 0) | ||
| + | + # - no idea why compressed files are making it into there - orlr 201810 | ||
| + | + | ||
| + | + my $path = $bpc-> | ||
| + | + my $i = -1; | ||
| + | + | ||
| + | + # | ||
| + | + while ( 1 ) { | ||
| + | + my $testPath = $path; | ||
| + | + | ||
| + | + last if ( !-f $testPath ); | ||
| + | + my $inode = (stat(_))[1]; | ||
| + | + if ( $inode == $hdr-> | ||
| + | + # | ||
| + | + # Found it! Just emit a tar hardlink | ||
| + | + # | ||
| + | + | ||
| + | + | ||
| + | + last; | ||
| + | + } | ||
| + | + $i++; | ||
| + | + } | ||
| + | + } | ||
| + | + | ||
| + | } | ||
| + | } | ||
| + | if ( defined($linkName) ) { | ||
| + | </ | ||
| + | |||
| + | ==== Easy backuppc restore via netcat ==== | ||
| + | In this example the backup hostname is propertywestlocal, | ||
| + | (as backuppc on server) | ||
| + | < | ||
| + | |||
| + | (as root on target pc [backuppc server if you like]) | ||
| + | < | ||
backuppc-notes.1429263811.txt.gz · Last modified: by snarg
