How to remove existing files in a pre-populated folder?


Kinst

Recommended Posts

Hello! Can anybody explain me, If I want to sync non-empty pre-populated folder with source folder how can I achieve identity? As I understand right, the files placed in the destination folder before sync will leave there. How can I do a synchronization like in DropBox service — files in source and destination folders will be the same, nothing extra? Or, if asked differently how to automatically remove unnecessary old files from destination folder?

Sorry for my English,

Konstantin 

Link to comment
Share on other sites

It's a one time thing? You have two folders, which you want to keep in sync, but at the moment they are out of sync and now you ask for a solution, to bring them in sync, so Resilio Sync can keep them in sync in the future?

Use a third part tool, like FreeFileSync, select both source and destination. Let it compare both folders and select the desired action (copy, remove) for each out of sync folder pair. Then let it run.

Afterwards set up Resilio Sync on both source and destination to keep both folders in sync in the future.

 

Link to comment
Share on other sites

On 8/4/2013 at 8:23 PM, totokaka said:

Is there any need to open or forward any ports?

Frank, thank you for the answer! It’s not a one time thing. I deal with that all the time and folders are very big (1,5 Tb). I often change computers (it has its own specifics) and I don’t want to rewrite large volumes or wait when it will be sync. So I use pre-populated folders. 

I thought about something like FreeFileSync. It’s interesting could it work not only in the same network but over internet too?

Link to comment
Share on other sites

On 11/21/2019 at 2:48 AM, Kinst said:

How can I do a synchronization like in DropBox service — files in source and destination folders will be the same, nothing extra?

Just create read-write share between source and destination peers.

This folder will be synced. If you remove file on first peer, then it will be removed on the second.

You will get identical amount of files and folders.

https://help.resilio.com/hc/en-us/articles/205506699-Quick-guide-to-syncing

Link to comment
Share on other sites

15 minutes ago, Alex. said:

Just create read-write share between source and destination peers.

This folder will be synced. If you remove file on first peer, then it will be removed on the second.

You will get identical amount of files and folders.

https://help.resilio.com/hc/en-us/articles/205506699-Quick-guide-to-syncing

Hello Alex! Did you understand the problem right? It’s not a problem to sync files with the same hash. The problem is to remove files that were in the destination folder before sync. 

Link to comment
Share on other sites

50 minutes ago, Kinst said:

The problem is to remove files that were in the destination folder before sync. 

It's not possible to do with Resilio Sync.

Sync will not remove any files before syncing in destination folder. As a workaround you can point Sync to a fresh new destination folder without unnecessary files or delete files manually and then start syncing or you can use Resilio Connect which can start pre & post syncing scripts which will delete unnecessary files.

Link to comment
Share on other sites

@Kinst Do a google search. It depends on what you have at home. If you have a proper router, you can map a dynamic DNS to your dynamic IP and then activate the VPN Server on your router. If your router doesn't support this, you need some extra device.

And to clarify it: Yes, Resilio Sync doesn't need a VPN. It either tries to create a direct connection or, if the ports are blocked, uses a Relay Server.

Link to comment
Share on other sites

If someone is interested, I found a solution to the above problem.

On the source machine I created a new folder and transfered all files and folders to it. The green tick told me about the end of the synchronization on the second (destination) machine. So I get on the destination machine the new folder with useful files and other folders and files that I don’t need. My next step was to remove them. After that I disconnected the second machine from the synchronization by removing the shared folder from the Resilio Sync. Than I removed the hidden sync folder from the second machine and manually put the useful folders in the correct state on both machines. The last step was to switch on the synchronization again.

Link to comment
Share on other sites

  • 1 month later...
On 12/2/2019 at 2:20 PM, Kinst said:

If someone is interested, I found a solution to the above problem.

On the source machine I created a new folder and transfered all files and folders to it. The green tick told me about the end of the synchronization on the second (destination) machine. So I get on the destination machine the new folder with useful files and other folders and files that I don’t need. My next step was to remove them. After that I disconnected the second machine from the synchronization by removing the shared folder from the Resilio Sync. Than I removed the hidden sync folder from the second machine and manually put the useful folders in the correct state on both machines. The last step was to switch on the synchronization again.

I'm in a similar situation, except I don't have direct access to the source machine. Would you be able to tell me more about how you solved that?

 

On 11/22/2019 at 4:10 PM, Alex. said:

It's not possible to do with Resilio Sync.

Sync will not remove any files before syncing in destination folder. As a workaround you can point Sync to a fresh new destination folder without unnecessary files or delete files manually and then start syncing or you can use Resilio Connect which can start pre & post syncing scripts which will delete unnecessary files.

When you sync a pre-existing folder the warning specifically mentions files may be deleted. With a read only peer that logically would imply pre-existing files would be deleted.

Is that not the case?

I'm trying to reconnect to a Read Only folder/share. The files I have are out of date, even though some have the same filenames. That includes extra files that are no longer needed.

There's no way to force the destination folder, the read only peer, to "sync" in a way that matches the source folder? That seems a bit... odd. That's literally not syncing, by definition. That's just a one-way file transfer.

It's frustrating to essentially have to create a brand new folder, download EVERYTHING again, which with large files can be gigabytes if not terabytes of data.

The guides could also be much more clear in that regard. If it doesn't remove pre-existing files it should clearly state that on https://help.resilio.com/hc/en-us/articles/204754279-Is-one-way-synchronization-possible-

None of the official documentation make it clear that's how it behaves, I didn't think to check the forums until I noticed that's not how it seems to work. Which isn't a great way to distribute important details, because then folks like me buy your product before we realize it's not going to do what we need.

It also seems odd for such a feature to be only available in an Enterprise level product.

Even the setting listed here:

https://help.resilio.com/hc/en-us/articles/207371636-Power-user-preferences

"folder_defaults.delete_unknown_files"

Would imply that behavior, except it's the one field you offer no description or explanation of.

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.