mainstoreBackup - Support: sr #109036, How to exclude hidden files

 
 

sr #109036: How to exclude hidden files

Submitter:  None
Submitted:  Wed 11 May 2016 02:26:29 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
   

Mon 23 May 2016 07:40:00 AM UTC, comment #3: 

Thanks man! You helped me a lot! :)

Anonymous
Sun 22 May 2016 06:06:10 PM UTC, comment #2: 

Hi,

sorry for the late response but due to a problem with this site I was not able to answer.

Regards.

Heinz-Josef Claes <hjclaes>
Group administrator
Sun 22 May 2016 06:05:03 PM UTC, comment #1: 

For me,

exceptRule= '$file =~ \'(/\.)|(^\.)\''

seems to work - but it doesn't do what you want.

Remember, $file contains the relative path plus the filename. So simply using ^\. will only match, if the files are on the top level directory.
Also, with exceptRule you can exclude files but not directories! So the pattern above only excludes singular files starting with a dot.


If you want to exclude directories, you have to use exceptDirs.
The wildcards (not pattern) you need to exclude, depends on the relative path in your backup directory.
Example: If your backupDir is '/', and you want to exclude all dot files in your home directories, use
exceptDirs = //.*
This will e.g. match /home/bob/.something


Btw,
I'm using:
exceptRule= '$file =~ m#/\.thumbnails/#' or
    '$file =~ m#/te?mp/#i' or
    '$file =~ m#cache/#i' or
    '&::MARK_DIR_REC($file, ".dontBackup")'
This stores the important hidden files but not the garbage in it. Also, I can tag a directory with ".dontBackup" .


Hope this helps.

Heinz-Josef Claes <hjclaes>
Group administrator
Wed 11 May 2016 02:26:29 PM UTC, original submission:  

I want to exclude hidden files and directories from my backup. I tried to set up an exceptRule (exceptRule='$file =~ /^\./') but it didn't work and I always get this error: 
invalid or no range in param <exceptRule=$file =~ /^\./>, exiting

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.14-8eb0.
    Corresponding source code