The support forum

Filtered folder copy

awebber :

Jul 07, 2020

I am looking at options to migrate user data between two file servers, but need to filter specific folders (basically user folders). Is it possible to reference a text file of which folders to copy? i.e lets say there are user folders \\server\userdata\user1,user2,user3 and user4 for example, but we only want to copy user2 and user3. Can you have a list of users in a txt file that is then referenced by Bvckup2?

Alex Pankratov :

Jul 07, 2020

You can do that by supplying your list of folders in a bvckup2-style config format as a job override, so that when a job is loaded these overrides will be appended to the config and change the "backup what" portion of the config to include your folders.

For example, if you are backing up from \\server\share\foo and want to include "bar" and "baz" subfolders only, you will create a new job, set "What to backup" to "start with an empty list".

If you were to know you list of folders beforehand, you would just go and include them in the middle pane of the window (by clicking on them). But since you need to provide this list separately, here's what you do instead -

1.  OK the changes in this window. The program will say that nothing will be backed up and ask to confirm. Say Yes.

2.  Create a file called override.ini (see below) and put the following in it:

        conf.filters.src.verbose.folder
        conf.filters.src.verbose.folder                    + .\bar
        conf.filters.src.verbose.folder                    + .\baz

Second and third line will include ("+") specified folder ("bar") just as if it were clicked on in the middle pane of that config window. "bar" here is a folder path relative to the source folder. So if you wanted to include, say, \\server\share\foo\abc\xyz folder, you'd go with

        conf.filters.src.verbose.folder                    + .\abc\xyz

First line is a special case - it clears the list of selected folders. Just in case, to make sure that you are starting with a clean slate.

While we are at it, if you want to _exclude_ some subfolder of a previously excluded folder, you can do this with -

        conf.filters.src.verbose.folder                    - .\abc\xyz\oh\no

Do note that the leading ".\" is required, because this is what anchors the selector to the top of the source folder and ensures that only \\server\share\foo\bar will be picked up and not, say, \\server\share\foo\123\456\bar.

Finally, see https://bvckup2.com/support/forum/topic/1140 for where an override file should go and how to make the program pick it up once it is in place.

awebber :

Jul 08, 2020

Thanks Alex :), I will take a look at doing that, Many Thanks for the quick response.

New topic

Create
Made by IO Bureau in Switzerland
Support

Updates
Blog / RSS
Follow Twitter
Reddit
Miscellanea Press kit
Testimonials
Company Imprint

Legal Terms
Privacy