How long are files kept in .SyncTrash?


Recommended Posts

I was thinking of replacing SyncBack with Bittorrent Sync to backup my 2TB drive in the PC to the 2TB drive in the HTPC, purely for it's on-the-fly syncing.

My only issue is how long deleted files are kept in .SyncTrash. I admire the feature though - in the event a hard drive failed and the sync program sees no files and decides to delete all my files on my other synced devices, I can recover them from .SyncTrash and that's something that SyncBack doesn't seem to offer.

But is there any way to configure how long files are kept in .SyncTrash? I have a lot of new files coming in and old ones being deleted regularly. If files are permanently kept in .SyncTrash then my 2TB backup drive will quickly run out of space. If it can be configured to keep deleted files for 3 days only this would be perfect.

Link to comment
Share on other sites

They are currently kept in .SyncTrash indefinitely! ...there is highly likely to be a option to only keep trash files for X days, etc, at some stage, as this has been previously requested... and pretty essential! (especially for users with limited space, or who can't see hidden files/folders, so have no idea of the amount of space taken up by these files!)

Also, if a folder has been previously syncing with the "Delete files to Sync trash" option enabled, and the user then decides to "untick" this option, ideally BitTorrent Sync should at that point give the user the option to automatically delete the redundant .SyncTrash

Link to comment
Share on other sites

Did not get a prompt to clear out SyncTrash when i unticked the box for the folder properties

Sorry, I was perhaps a little unclear - yes, you won't get a prompt - I was merely stating that this would be an "ideal" addition, and a useful prompt to be implemented at some stage by the developers! - the prompt doesn't currently exist

Link to comment
Share on other sites

Work around (Although not perfect) is to add this to a crontab for once a day:-

find "$share/.SyncTrash/" -mtime +$days -delete
find "$share/.SyncTrash/" -empty -delete

Although, I do agree it's not the best way of doing it. Personally, I rarely delete stuff so I've yet to set it up for BTSync, however, I do use the above script to delete files I download off RSS feeds on usenet indexers and it works fine.

Link to comment
Share on other sites

Also agree there should be some kind of retention on this folder, I really like the concept and also great if a similar approach could be used for versioning files too. I like to have versions of files, but mostly after 30 days or so they become irrelevant.

Link to comment
Share on other sites

  • 3 weeks later...

On windows I use a batch file to delete the .SyncTrash manually. Just keep the file in the root of the sync'ed folder for easy access.

File name: _EmptySyncTrash.cmd

Contents:

@echo off

del /s /f /q .SyncTrash\*.*

rd /s /q .SyncTrash

Any improvements most welcome. Thanks.

Link to comment
Share on other sites

On windows I use a batch file to delete the .SyncTrash manually. Just keep the file in the root of the sync'ed folder for easy access.

Nice tip, Kunal - this has now been referenced in the Unofficial FAQ

As a further improvement, a Scheduled Task could be additionally setup to execute the batch file at recurring intervals, as a way of automating the emptying of trash

Link to comment
Share on other sites

  • 6 months later...

Does anyone know if it is possible to set sync_trash_ttl to "never delete". I have a working setup, and I do not want to try to set the value to 0, hoping that this would to the trick. If I am wrong I might delete the synctrash folder content.

I went through the manual and did not find any documentation on this.

Link to comment
Share on other sites

Does anyone know if it is possible to set sync_trash_ttl to "never delete". I have a working setup, and I do not want to try to set the value to 0, hoping that this would to the trick. If I am wrong I might delete the synctrash folder content.

I went through the manual and did not find any documentation on this.

 

The highest value you can set this to is 2,147,483,647 days.... if you need to keep files in SyncArchive longer than that I'd be worried(!)

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.