Firefox Bookmarks...

English Support for Syncovery on Apple Computers.
Post Reply
User avatar
phredd
Posts: 4
Joined: Mon Feb 24, 2025 10:45 pm

Firefox Bookmarks...

Post by phredd »

I'm trying to create a set of masks I can distribute throughout my organization. For the most part, I don't want to backup ~/Library as it's never worth it to restore much from there, so I'm using '/Library' in the exclusion mask while defining /Users/[userfolder] as the right side of the backup equation.

However, I would like to back up web browser bookmarks.

Safari and Chrome keep them in a single file in a consistent location, so I can set up File Masks to grab them without too much trouble. This works quite well as the file inclusion mask overrides the exclusion mask and gets just those files.

But Firefox bookmarks are nested in a profile folder that includes random text and keeps iterations of them with date and time based filenames. I can't get this to work with file masks, as the file mask syntax doesn't seem to respect wild cards.

I have also tried to use the "Specify Folder Masks..." option and that seems not to work properly at all. When I added 'bookmarkbackups' as a folder mask, using the "Scan the whole directory tree for matching folders" and "Include all subfolders of matching folders in the synchronization" options,
the '/Library' exclusion superseded the folder inclusion mask, ~/Library was not searched.

Even worse, the rest of the user's directory was searched and anything not matching 'bookmarkbackups' was ignored, i.e everything else in the folder.

This seems like it is not the correct behavior.

Any advice?
tobias
Posts: 1933
Joined: Tue Mar 31, 2020 7:37 pm

Re: Firefox Bookmarks...

Post by tobias »

Hello,
this all works as designed. It's generally hard to copy anything from an excluded folder.

The only exception is when you specify complete paths without wildcards and add them to the Inclusion Masks. These are the only specifications that can override a folder exclusion.

There are approximately three ways to solve the problem:
a) don't exclude Library and add lots of other exclusions instead, such as: \Libary\[B-Z]*;\Libary\Application Support\com.*
b) create a separate profile for bookmarks
c) write a PascalScript function that picks the correct file, like this:

Code: Select all

function OnIncludeItem(const FileName, RelativePath: UnicodeString;
        const isRightSide, isFolder:Boolean;
        const FileSize:Int64; const FileAttr:LongWord;
        const Connector: Opaque):Boolean;
begin
  if isFolder then
     Result:=(Pos('/Library',RelativePath)=0) or
        ((RelativePath='/Library') and (FileName='Application Support')) or
        ((RelativePath='/Library/Application Support') and (FileName='Firefox')) or
        ((RelativePath='/Library/Application Support/Firefox') and (FileName='Profiles')) or
        (RelativePath='/Library/Application Support/Firefox/Profiles')
  else
    if Pos('/Library',RelativePath)=0 then
       Result:=true
    else
      Result:=(Filename='places.sqlite') or
              (Filename='places.sqlite-shm') or
              (Filename='places.sqlite-wal');
  end;
The main problem with PascalScripts is that they only work on the Intel version of Syncovery for now. But you can run that on Apple Silicon Macs too.
User avatar
phredd
Posts: 4
Joined: Mon Feb 24, 2025 10:45 pm

Re: Firefox Bookmarks...

Post by phredd »

Got it. Thanks for taking the time to lay it all out. I appreciate your clear explanations of how things are working under the hood.
Post Reply