The old "rm -Rf $FOLDER" trick

OK - I’ve mentioned many times on this forum - I host my own Cloud Sync solution : ResilioSync…

So - I decided to add that ThinkPad with Ubuntu 26.04 (that had been running Bazzite earlier) to all my regular Sync folders…

I always point them at ~/ResilioSync/ (e.g. ~/ResilioSync/scripto for my shell scripts, ~/ResilioSync/Music for a subset of my music in mp3 format - which I mostly listen to on my phone via bluetooth - so lossless FLAC is pointless).

But - for some reason the sh!tty ResilioSync installer created ~/Resilio Sync/ with a SPACE in the middle!

I incrementally added stuff like “scripto” to ~/ResilioSync/scripto and more…

I must not have been paying attention when I added Music - it must have gone to ~/Resilio Sync/Music/ … But I didn’t notice or realise!

Then I decided - I don’t want ~/Resilio Sync/ - at all… just muddies the water… So I “rm -Rf ~/Resilio\ Sync

Didn’t notice anything “strange”…

Then I went out for an afternoon after work ride and listen to music (on my Android Phone).

My music stopped playing… Tried to jump to another song… “Can’t play this file…”… I refresh my Music folder in the app - IT’S EMPTY!

What a SHYTE system! It shouldn’t do that…

It’s not fatally irreversible - I get home and on my Desktop PC running Ubuntu 24 - I have it set in Resilio Sync “keep deleted files and folders” (and it keeps them for 30 days)… So I just had to
cd ~/ResilioSync/Music/.sync/Archive

And there’s all my folders (by Artist / Band) - so :
mv * ~/ResilioSync/Music/.

And I’ve got all my schizz back - phew! But not so quick on the phone - it’s having to re-sync all 100GB again from scratch over wifi!

And - I was using that share in my JellyFin media server too - for Music… it’s TOTALLY trashed ALL the metadata I manually configured - hours and hours of work fine tuning! e.g. I had at least 8 AC/DC albums - now it’s only showing 3 - I know their 1978 album “Powerage” is there - but I can’t find it in JellyFin… pezzo di merda!

I think I’m going to unsync that share from JellyFin…

This shonky app should NOT be allowed to delete stuff of everything else, everywhere else!

6 Likes

It gets worse - I suspect - 'cause I’m inherently lazy - when the shitty ResilioSync “connect” wizard (it’s a 100% web UI on linux) asked me where I wanted to sync the “Music” share to on the new computer - did I select $HOME/ResilioSync/Music ?

No!

I just followed the filesystem tree (through a shitty web UI) to /home/x/Resilio\ Sync/. and probably selected that itself - distracted and doing 10 different things at once!

I need to pay more attention… Both my daughters reackon I’m probably AuHD or whatever it’s called…

i.e. “neurospicy” in both departments - on the autism spectrum, and on the ADHD spectrum… Daughter 1 was diagnosed as Autistic as an adult, Daughter 2 was diagnosed as ADHD as an adult…

Anyway regardless of my cavalier attitude - that SHYTE app should NOT be allowed to just go and remotely DELETE the same content on other nodes in the sync chain!

3 Likes

Well,that is what sync means … keep everything the same.
I do sympathize with your predicament… what is a Linux app doing putting blanks in filenames?

2 Likes

Is that the Australian variant? :slight_smile:

I know that syncing feeling! I got it after I accidentally deleted some IMAP folders. I restored them from a backup and watched sync delete them all again.

4 Likes

I had problems with sync before. Now I also have a backup which not is not sync.

2 Likes

If you mean rsync … use it in archive mode and it will never delete anything in the target filesystem.

2 Likes

The default behaviour in rsync is to NOT DELETE ANYTHING!

If you want to delete stuff from DESTINATION, that doesn’t exist in SOURCE - you have to explicitly “–delete”… and it’s dangerous, use with extreme caution…

Resilio Sync uses bit-torrent protocol - and was formerly called “btsync”… it’s very efficient, and does UPnP (e.g. via the intertubes)… But I didn’t realise if I deleted one copy of a share on one computer - it would go and delete it EVERYWHERE ELSE!

I should log a ticket, as I have a lifetime pro license (5 “home” users) - there should be an option to disable that “undocumented feature”…

Because I’m using one of those shares to host music on my JellyFin streaming server - it killed the MetaData and then decided - once I restored the files (see above - deleted stuff goes in SHARENAME/.sync/Archive) - to go and re-metadata a whole bunch of stuff… I’ve disabled the two MetaData plugins now - “MusicBrainz” and “AudioDB” - so if something like that ever happens again - it should hopefully, not trigger a full metadata refresh…

3 Likes

So archive mode is default. Did not know, always specify.

If you really want to get into trouble with rsync, try bi-directional syncs.

So it is like a distributed database … there is no master copy?
I thought you used trueNAS … isnt that the master?

1 Like

I’ve had utils that would undo my correct metadata on mp3 files before. Frustrating.

1 Like

I do use TrueNAS - and I had a plugin for ResilioSync that was working… and it used to be the master…

But it would die in the arse if TrueNAS restarted… and I wouldn’t realise for days weeks that it wasn’t working properly… It would delete the config file for all my ResilioSync shares… and would act like those shares were new…

It was so flaky I deleted the plugin and the FreeBSD jail it was running in… But I have multiple copies of my shares across different computers… I just gotta be more careful and less cavalier when adding a new PC to the chain…

Now? I just (when I remember) run the binary in my username shell with a config argument - and I only sync a small subset of data - mostly shell scripts…

Anyway - my TrueNAS is end of life - no more upgrades for it - TrueNAS “scale” now runs on Linux not FreeBSD… I might just keep using it the way it is… fingers crossed… touch wood…

Or I may look at getting the FreeBSD based NAS product that was forked from FreeNAS to NAS4Free (now called “XigmaNAS”)…

1 Like

I mostly prefer to do WITHOUT metadata… Frustrating? It’s almost “smash the device” enfuriating!

I already organise ALL my music

Root-Music-FOLDER 
├── Artist
│   ├── Album

e.g.

 .
├── 1000Mods
│   ├── 2011-SuperVanVacation
│   │   ├── 01 Road to Burn.mp3
│   │   ├── 02 7 Flies.mp3
│   │   ├── 03 El Rollito.mp3
│   │   ├── 04 Set You Free.mp3
│   │   ├── 05 Vidage.mp3
│   │   ├── 06 Navy in Alice.mp3
│   │   ├── 07 Track me.mp3
│   │   ├── 08 Johny's.mp3
│   │   ├── 09 Abell 1835.mp3
│   │   └── 10 Super Van Vacation.mp3
│   └── 2020-YouthOfDissent-mp3
│       ├── 01 Lucid.mp3
│       ├── 02 So many days.mp3
│       ├── 03 Warped.mp3
│       ├── 04 Dear Herculine.mp3
│       ├── 05 Less is More.mp3
│       ├── 06 21st Space Century.mp3
│       ├── 07 Pearl.mp3
│       ├── 08 Blister.mp3
│       ├── 09 Young.mp3
│       ├── 10 Dissent.mp3
│       ├── 11 Mirrors.mp3
│       └── cover.jpg

I prefer to just play albums - and my filesystem and folder tree is a perfectly adequate metaDB for my use… And the Music player I use on Android just does “Folders” - it’s called “Music Folder Player Full” - having a middle-man get in the way - and insist that track #8 08-songtitle.mp3 does NOT play after track #7 07-songtitle.mp3 BECAUSE THE METADATA doesn’t say it’s so! *AAArrrgggghhhhhhhhhh!* Both Sayonara and Music Player Folder Full also do gapless playback!

I set Sayonara to just look at “Directories” too… It can do both… BTW - Sayonara has a DAMN FINE metadata editor!

2 Likes

Why is NFS not good enough?

What is a resiliosync share.?
Can you explain what resiliosync does for you ?
Could it be replaced by a daemonised rsync?

Do you copy music files to the play device or do you play them from the server?

1 Like

NFS is perfectly fine - I’ll keep using it - won’t contemplate any filesharing that doesn’t support NFS - and I generally refuse to try and use SMB from Linux hosts…

edit : were you asking whether or not NFS could do what ResilioSync does? Not really - especially not on ANDROID! Note : Google strips the NFS code out of the Linux kernel - you can’t do NFS on Android (and I’ve never found an iPAd app that supported NFS). And I found a few ARM based single board computers that leverage the Android kernel - could not do NFS… I wonder how much room Google saved in the kernel by omitting NFS?

Also - allowing NFS in (i.e. from the internet to my home LAN) via my router? Yeah nah - that’s not gonna happen :smiley:

A ResilioSync share is just a folder I choose to add to share to potential other computers… Once the share’s setup (in a Web UI) - I can then get a “share” link (I default to the hexadecimal string format) - I then fire up the Web UI on the other computer - then hit the “+” button to add a folder - then paste the hexadecimal string - then I select the local folder I want to be part of that “chain”… It works quite well - you don’t get a GUI on Linux, just a WebUI, but you get a GUI on MacOS, MS Windows, Android and iPad/iPhone…

Note : ResilioSync does NOT host ALL my music (much of which is in FLAC format) - I store that on my NAS…

When I get a new album - or find an album I want to listen to on one of my Macs or my phone - if it’s in FLAC format on my NAS - I have a shell script to create another copy of that album in 320 Kbps mp3 format - then I copy (or move) that album folder to my ResilioSync Music share - and several heartbeats later (over WiFi / ethernet) - it’s there on my phone and ALL my computers in that ResilioSync “chain”…

I discovered when listening to music over bluetooth - I can’t tell the difference between FLAC and high bitrate mp3… and storing in mp3 format saves a heap of space VS FLAC…

Anyway : I CAN TELL the different on my Linux PC when using analog headphones to the 3.5 headphone jack on my soundcard - but my Linux PC Sayonara points straight at the NAS music folders…

No idea about “daemonised rsync”… I think ResilioSync would be faster anyway…

I let ResilioSync sync my mp3 files from Desktop PC running Linux to my Phone… i.e. I mostly listen to music on my phone when I’m out and about…

Anyway - I did setup a VPN (tailscale) to my JellyFin server - and - I can play music that’s been indexed there on JellyFin - but I’m still setting that up - and - per my original post - my ResilioSync “glitched” kyboshed a whole bunch of metadata on JellyFin (which points at it’s own copy of the ResilioSync music “share”).

2 Likes

Thanks, I had no idea how it all functioned.
You need to download mp3 files to a device to play them, and Resiliosync does that.
If you are on your desktop, you can play them from the NAS.
So termux would not be able to do NFS?

1 Like

No because of the way the Android Linux kernel works - it needs that tiny weency bit of code to support NFS… I’m sure it’s miniscule and insignificant - but Google remove it…

Been there - done that… No NFS on Android…

IT would probably be easier on iPad or iPhone - as they’re Darwin which is BSD based… and MacOS supports NFS out of the box…

2 Likes