Before posting, and to avoid disappointment, please read the following:

  • This forum is not for 2BrightSparks to provide technical support. It's primarily for users to help other users. Do not expect 2BrightSparks to answer any question posted to this forum.
  • If you find a bug in any of our software, please submit a support ticket. It does not matter if you are using our freeware, a beta version or you haven't yet purchased the software. We want to know about any and all bugs so we can fix them as soon as possible. We usually need more information and details from you to reproduce bugs and that is better done via a support ticket and not this forum.

Delete Empty Folders Except Root / Monitoring SFTP Path(s) for Changes

For technical support visit https://support.2brightsparks.com/
Post Reply
bzowk
Newbie
Newbie
Posts: 1
Joined: Sun Nov 02, 2014 7:12 pm

Delete Empty Folders Except Root / Monitoring SFTP Path(s) for Changes

Post by bzowk »

Hey Guys -

I'm testing out SyncBackPro and considering purchase if it can do what I need. So far, it is working well except for a couple of things I wanted to post about to hopefully get assistance, please. For the issues described below, I'm using profiles which all connect from a Windows system to a Linux host over SFTP. I'll try to explain the best I can... :)

Question #1: Deleting Empty Folders Except for Root Folder
Many of my profiles check a remote (SFTP) folder (usually remains empty) for new files/folders. If present, it moves (downloads) them to a local folder (which is not empty) then deletes the original content. When I first set these profiles up and new folders / files were added, it would Move / Download them as desired (one-way) but only delete the files - not the folders. I enabled the setting to delete empty folders in the profile, but since the root stays empty, it deletes it too!

Interestingly enough, the profile still succeeds at the next attempt despite the folder it is checking doesn't exist anymore. I am assuming that if the folder was recreated and content added it would operate as desired - however - the process that adds the content on the remote host fails without that folder remaining.

Example
Folder Setup
- Folder to Move From (Remote SFTP)
- /var/roothome/complete
- Folder to Move to (Windows)
- D:\Sync\Complete
First Profile Setup
If a folder named "Folder1" with the file "file1.abc" was added to "/var/roothome/complete" and the profile ran, it would move both the file and folder to "D:\Sync\Complete" but only delete file1.abc from SFTP. /var/roothome/complete/Folder1 would still be present

After Enabling "Delete Empty Folders"
After the profile runs, it deletes "/complete" from the host therefore the path "/var/roothome" does not contain a folder named "complete" anymore.

Question #2: Monitoring SFTP Path(s) for Changes as Profile Trigger
Obviously, there are a few options available for triggering a profile to run. One of those is monitoring a Windows path for changes. I do not see an option for monitoring for changes for a remote path, however; even though I know it's completely different. That being said, is there a way to do so? I am currently having each profile run every 30 seconds which is a pain as the content is added in the remote folders only 2-3 times a day however they occur at random times, can be lots of data, and are needing to be moved ASAP. If there isn't an option to directly do so within a profile, are there any workarounds using scripting, perhaps (assuming there is some sort of CLI for SyncBack Pro?)

To note, the Linux system hosting my source folders is local to the Windows system and runs Project Atomic (Fedora 28) which is basically a dedicated Docker host.

Any suggestions would be appreciated - Thank You!
Swapna
2BrightSparks Staff
2BrightSparks Staff
Posts: 992
Joined: Mon Apr 13, 2015 6:22 am

Re: Delete Empty Folders Except Root / Monitoring SFTP Path(s) for Changes

Post by Swapna »

Hi,

Can you please submit a support ticket to [email protected]ks.com with your profile configuration for investigation.

Do not post (nor links to) profiles on this open forum.

Thank you.
Post Reply