mainstoreBackup - Support: sr #109366, run storeBackupUpdate on...

 
 

sr #109366: run storeBackupUpdate on <backup dir> instead of <backup dir/series>

Submitter:  None
Submitted:  Fri 11 Aug 2017 01:40:32 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 13 Aug 2017 01:23:33 PM UTC, comment #3: 

Your right, storeBackup in general doesn't like symbolic links as configuration parameters. The reason is, that it checks things like backupDir being part of the targetDir which can be hidden perfectly with symbolic links. There are a lot of pitfalls like this.

There seems to be a check for symlinks for some reason in this part of the code.
The easiest way to correct this is to add after

my $skipSync = $CheckPar->getOptWithoutPar('skipSync');

the following line

$backupDir = &::absolutePath($backupDir);

This will replace the symlink with the real path.

Hope this helps.
Heinz-Josef

Heinz-Josef Claes <hjclaes>
Group administrator
Sat 12 Aug 2017 08:23:40 AM UTC, comment #2: 

Thanks for your reply. I figured out what was wrong.
I use Openmediavault and it mounts my hdds to something like

/srv/dev-disk-by-label-NAS1/
/srv/dev-disk-by-label-Backup/

I set symlinks to

/srv/dev-disk-by-label-NAS1/ --> /media/NAS1
/srv/dev-disk-by-label-Backup/ --> /media/Backup

storeBackup.pl has no problem with

<source dir>= /media/NAS1
<backup dir> = /media/Backup
<series>= S1

running storeBackupUpdate.pl -b /media/Backup doesn't find anything, but


storeBackupUpdate.pl -b /srv-dev-by-label-Backup does.

Somehow storeBackupUpdate.pl doesn't like symbolic links as <backup dir>

Christian König <chrko>
Fri 11 Aug 2017 06:32:43 PM UTC, comment #1: 

I'm using it since many years in that way (with 2 replications) and never had that problem. I tried to repeat your situation but with no success.
I called:
/tmp/storeBackup/bin/storeBackup.pl -s s1 -b b -S series1 --lateLinks
/tmp/storeBackup/bin/storeBackup.pl -s s2 -b b -S series2 --lateLinks

and then (timestamps etc. removed for better readability in this forum):
/tmp/storeBackup/bin/storeBackupUpdateBackup.pl -b b
checking references and backup copying in <b>
storeBackupUpdateBackup.pl, 3.5
creating lock file </tmp/storeBackup.lock>
scanning directory <b> for existing backups
scanning directory <b/series2> for existing backups
scanning directory <b/series1> for existing backups
found 2 backup series, 2 backups, 0 renamed backups
consistency check finished successfully
listing references:
  /tmp/a/b/series2/2017.08.11_20.19.45
    -> /tmp/a/b/series1/2017.08.11_20.19.23
(1/1) updating </tmp/a/b/series1/2017.08.11_20.19.23>
phase 1: mkdir, symlink and compressing files
created 0 directories
created 0 symbolic links
compressed 0 files
used 0.0  instead of 0.0  (0 <- 0 ; 0.0%)
phase 2: setting hard links
linked 0 files
phase 3: setting file permissions
set permissions for 2 files
phase 4: setting directory permissions
set permissions for 0 directories
scanning directory <b> for existing backups
scanning directory <b/series2> for existing backups
scanning directory <b/series1> for existing backups
found 2 backup series, 2 backups, 0 renamed backups
consistency check finished successfully
listing references:
  /tmp/a/b/series2/2017.08.11_20.19.45
    -> /tmp/a/b/series1/2017.08.11_20.19.23
(2/1) updating </tmp/a/b/series2/2017.08.11_20.19.45>
phase 1: mkdir, symlink and compressing files
created 0 directories
created 0 symbolic links
compressed 0 files
used 0.0  instead of 0.0  (0 <- 0 ; 0.0%)
phase 2: setting hard links
linked 1 files
phase 3: setting file permissions
set permissions for 1 files
phase 4: setting directory permissions
set permissions for 0 directories
scanning directory <b> for existing backups
scanning directory <b/series2> for existing backups
scanning directory <b/series1> for existing backups
found 2 backup series, 2 backups, 0 renamed backups
consistency check finished successfully
found no references to backups from lateLinks that need storeBackupUpdateBackup run
                      duration = 1s
 [sec] |      user|    system
-------+----------+----------
process|      0.15|      0.00
childs |      0.08|      0.00
-------+----------+----------
sum    |      0.23|      0.00 => 0.23
syncing ...
checking references and copying in <b>

Do you use replication? Do have very strange names for the series?

(The counter (2/1) is wrong when you call ...UpdateBackup for the very first time, but that's not a problem at all.)

Heinz-Josef Claes <hjclaes>
Group administrator
Fri 11 Aug 2017 01:40:32 PM UTC, original submission:  

I have one central <backup dir> with two <series>, both storeBackups run with latelink and both (cross) link to the other with all:other_series.

If I run storeBackupUpdate.pl -b <backup dir> it doesn't find any backup.
I always have to run storeBackupUpdate.pl -b <backup dir/series1> and storeBackupUpdate.pl -b <backup dir/series2>  to get the storeBackupUpdate working.

Is there a way to run storeBackupUpdate just once on the main <backup dir>?

Thanks
Christian

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #41477:  storeBackup on <backup dir> added by None (1KiB - application/octet-stream - Logs from storeBackupUpdate)
file #41478:  storeBackup on <backup dir_series1> added by None (1KiB - application/octet-stream - Logs from storeBackupUpdate)
file #41479:  storeBackup on <backup dir_series2> added by None (1KiB - application/octet-stream - Logs from storeBackupUpdate)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chrko (Posted a comment)
  • -email is unavailable- added by hjclaes (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-11 None Attached File- Added storeBackup on <backup dir>, #41477
        Attached File- Added storeBackup on <backup dir_series1>, #41478
        Attached File- Added storeBackup on <backup dir_series2>, #41479

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code