Sync one file, not folder

Get help for specific problems
Posts: 49
Joined: 6 Dec 2017

gogreen1

I hate to ask what to some might seem like a dumb question, but can FFS back up only one file, not its whole directory? Actually, there are three separate files in three unrelated directories I'd like to back up this way. If FFW can do just one file, I'd create a batch job for all three tasks. If this is possible, how would I do it? Thanks.
Posts: 3
Joined: 5 Feb 2018

dave123

Take a look at this: https://freefilesync.org/manual.php?topic=exclude-items

It might be laborious to exclude everything but the 3 files you want synced. Perhaps you could exclude all of the sub-directories and only include the 3 files you want to target.
Posts: 49
Joined: 6 Dec 2017

gogreen1

Thanks, dave123. Excluding items would be a monumental task, so I guess it's a lot easier to create a batch file and just back up the items that way.
User avatar
Posts: 2453
Joined: 22 Aug 2012

Plerry

Instead of (or complementary to) explicitly excluding files,
you can also explicitly include specific files.
So, if you change your Include filter from the default "*" (all)
into just those three files you want to be included, you should be there.
Note that the include- and exclude-filter definitions are relative to the left and right base location.
Posts: 49
Joined: 6 Dec 2017

gogreen1

Eh. Thanks, Plerry and dave123, but this is too complicated for me. I'll stick with a .command file.
Posts: 5
Joined: 4 Feb 2018

tellfile

It's pretty easy to do, just click what looks like a red filter funnel at the top. You'll see an asterisk * in the top include box by itself, which means wild card to get everything during a compare. Just type your three files in that box instead of the * , and when you hit the compare button, everything except your three files will be grayed out. Next time you do it, it won't show any other files in the window, just the three you put in the include box. Be sure to hit the "Save" Icon after you edit the filter. If you need to fix it back like it was, just empty the include box and type the * back in.
User avatar
Posts: 2453
Joined: 22 Aug 2012

Plerry

Even simpler: use the GUI.
Simply run a comparison. After the comparison has run, select a file you want to include, click the right mouse button and select "Include via filter". Repeat this for any more files you want to include.
Or directly select multiple files (via control-click), then right-click and select "Include via filter <multiple selection>".
You can still check (and, if necessary change) what is in your include- and exclude-filter by clicking on the funnel-icon (or depressing F7) as described above by tellfile.
Posts: 5
Joined: 4 Feb 2018

tellfile

Also, if the INCLUDE box is set to get everything (just by having a * in it), you can wild card file extensions and other stuff in the EXCLUDE box. In other words if you don't want to fill up your back up folder with tons of stuff that FreeFileSync will include like certain file types, just type the file extension by itself (including the dot to the left of it) in the lower exclude box with a * to the left of it. To exclude entire sub folders type the sub folder name with a * on both sides of it as you see I did in my exclude list below, notice how I even excluded the FreeFileSync configuration files that it would have sent over.

*.sync.ffs_db*
*sync.ffs_db*
*db
*ffs*
*Frontpages* < a subfolder)
*.ini
*.wfk < all these will exclude all files with these extensions on them
*.wfo
*.pro
*.prk
\System Volume Information\
\$Recycle.Bin\
\RECYCLER\
\RECYCLED\
*\desktop.ini
*\thumbs.db
Posts: 49
Joined: 6 Dec 2017

gogreen1

The two files I'd like to back up are:

Users > [MyUserName] > Library > Safari > Bookmarks.plist

Users > [MyUserName] > Library > Group Containers > UBF8T346G9.Office > User Content > Templates > normal.dotm

I know I can back up these files in several other ways, but I prefer to use FFS for this purpose. So just backing up only these files, what would the filters be? I apologize for the apparent required hand-holding on this. Thanks.
User avatar
Posts: 2453
Joined: 22 Aug 2012

Plerry

... I even excluded the FreeFileSync configuration files that it would have sent over.tellfile, 07 Feb 2018, 13:04
Are you sure?
I thought FFS will exclude at least its own *.ffs_db-files by definition.
User avatar
Posts: 2453
Joined: 22 Aug 2012

Plerry

So, one obvious option is to choose the shared part of the path of both files
C:\Users\[MyUserName]\Library
as your left base location and add the file specific parts
Safari\Bookmarks.plist and
Group Containers\UBF8T346G9.Office\User Content\Templates\normal.dotm
to your include filter (by typing or via the GUI).
(My notation assumes a Windows system and I assumed the source files are on the C-drive)

But, there are many other ways (including FFS-ways) to skin this cat ...
Posts: 5
Joined: 4 Feb 2018

tellfile

... I even excluded the FreeFileSync configuration files that it would have sent over.tellfile, 07 Feb 2018, 13:04
Are you sure?
I thought FFS will exclude at least its own *.ffs_db-files by definition. Plerry, 07 Feb 2018, 15:03
Didn't happen on my machine. Those little greenies were found in my back up folder.
User avatar
Posts: 2453
Joined: 22 Aug 2012

Plerry

... Those little greenies were found in my back up folder.tellfile, 07 Feb 2018, 15:34
Sure you will find *.ffs_db files on both sides! But those should not have been copied over.
Instead, FFS uses the *.ffs_db files to record the left, respectively right -side state as per the last run FFS sync (on that location). And as those states might differ, so will the *.ffs_db files then.
The use of *.ffs-db files is mandatory/inherent for running two-way syncs, and optional for other sync variants.
By comparing the state as stored in the *.ffs_db file with the actual state at the time of running a new sync, FFS is able to identify new-, modified- and deleted-files (and moved or renamed files) on both sides, and plans its actions accordingly.
Posts: 49
Joined: 6 Dec 2017

gogreen1

So, one obvious option is to choose the shared part of the path of both files
C:\Users\[MyUserName]\Library
as your left base location and add the file specific parts
Safari\Bookmarks.plist and
Group Containers\UBF8T346G9.Office\User Content\Templates\normal.dotm
to your include filter (by typing or via the GUI).Plerry, 07 Feb 2018, 15:14
Thanks, Plerry. This worked, and my sync job is working perfectly. I changed things a bit because I'm on a Mac, though, but your method is accurate and fast.