mainstoreBackup - Support: sr #110577, maxHardLinks not available through...

 
 

sr #110577: maxHardLinks not available through config file

Submitter:  None
Submitted:  Thu 09 Dec 2021 06:12:52 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:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 11 Dec 2021 04:44:50 PM UTC, comment #1: 

Since the option should be of no interest to most people, I am currently planning to include the bug fix in the next version.

The next version will probably be version 4.0 instead of 3.6. The location of the metadata will change and some options will be added or changed. But you should not (have to) notice any of this.  The current plan is to be able to select the checksums more flexibly: so instead of md5 also e.g. SHA to select and an existing backup on another checksum to convert. The whole if possible :-) without data loss.

btw,
cl_option = command line option
cf_key = configuration file key

Heinz-Josef Claes <hjclaes>
Group administrator
Thu 09 Dec 2021 06:12:52 PM UTC, original submission:  

Hi,

I recently tried to use the maxHardLinks feature introduced in 3.5.1, but got stuck in tracks right from the start. The documentations made me believe I could use this feature with the config file. The example config file one could generate by calling --generate confirmed my hopes.

$ storeBackup.pl --generate sample.conf
$ grep -B 2 maxHardLinks sample.conf
# maximum number of hard links to create on a file
# zero (default) means limit depends on file system used only
;maxHardLinks =

So I configured a very low number for testing purposes:

# maximum number of hard links to create on a file
# zero (default) means limit depends on file system used only
;maxHardLinks =
maxHardLinks = 10

But what I get is:

$ storeBackup.pl -f sample.conf
configuration file sample.conf, line 476: undefined key <maxHardLinks>
try 'storeBackup.pl --help' to get a description of the options.

The important parts of the config, if you need it:

$ grep -v -e '^$' -e '^#' -e '^;' sample.conf
sourceDir=/tmp/foo
backupDir=/tmp/bar
maxHardLinks = 10

After taking a look at the source code (it's all text files in the end), and comparing deleteNotFinishedDirs with maxHardLinks I guess it's a missing '-cf_key':

Option->new('-name' => 'deleteNotFinishedDirs',
    '-cl_option' => '--deleteNotFinishedDirs',
    '-cf_key' => 'deleteNotFinishedDirs',
    '-cf_noOptSet' => ['yes', 'no']),
Option->new('-name' => 'maxHardLinks',
    '-cl_option' => '--maxHardLinks',
    '-default' => 0,
    '-pattern' => '\A\d+\Z'),

And sure enough, after a small change it works:

$ diff storeBackup_orig.pl storeBackup.pl
2019a2020

>     '-cf_key' => 'maxHardLinks',


It's not a huge problem, a lot of people probably don't even need that option (I'm not sure yet I'll need it), but it was a pretty easy fix, and I thought maybe others could use that.

Greetings and thanks for saving my laptop 3 weeks back ;)

Lookbehind

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hjclaes (Posted a comment)
  •  

    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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code