Files suddenly disappeared

I have posted this on askubuntu, but maybe it’s worth posting this here also.

I have a weird problem with my computer. It is a desktop running Ubuntu 18.04. Sunday evening I left the computer on, with youtube-dl running, downloading some videos to my home folder, which is located on the same SSD of the system.

In the morning, the files contained in several folders in my data hard disk (which is different from the system disk) had disappeared. Only the files, not the folders.

My hard disk is synced with a self-hosted Nextcloud instance, and the missing files are still on Nextcloud (and also on my backup on Crashplan, so no problems with respect to this). My laptop also syncs with Nextcloud, but I have not turned it on since a few days. So, I don’t think it is a synchronization problem. It seems that the folders have been erased between 6.30 and 6.50 in the morning.

I have checked the syslog and it seems that more or less at 6.30, a couple of applications have started complaining that the disk was full. In fact, my system SSD was nearly full (due to the videos downloaded during the night).

Anybody has an idea of what could have happened?

Thanks in advance,


Doesn’t that answer your question?

Maybe, but why? The system disk was full, and many files were deleted from the other disk (which was not full). Is there a reason for this?

Depends on your partitioning. It’s also probable that youtube-dl uses a temporary folder on the system disk, before saving the files to the destination. Check the app for options to change the temporary folder.

1 Like

In my view the issue is specific and limited to the ‘data hard disk’.

youtube-dl uses the same directory for temporary file(s) and destination file(s) and hence the complaining that the disk was full is to do with the system SSD.

(1) The ‘folders’ are intact but not the ‘file(s)’ and (2) The ‘file(s)’ are available on the synced cloud ; may be that the synchronization deleted the files from the source? Please check the settings.

I would back up and move /home to the data drive. Also SSD’s are not meant to be used to capacity … as they have maximum writes. You should leave ~20% unused so it can reallocate to prevent failure.

Take advantage of data drive with it’s larger free capacity and open a terminal (in some dir) and run youtube-dl from there.
This is the string I use to download upto 1080p and stepping down to whatever resolution it can provide:

youtube-dl -f 137+140/22/best/bestvideo+bestaudio

or as a convenient alias:

alias ytd=‘youtube-dl -f 137+140/22/best/bestvideo+bestaudio’

First of all, thanks to everybody for your replies.
Yes, I think that I should move my /home directory and leave more free space in the SSD.

Still, I can’t understand why, exactly when the system disk was full, many files on the other disk have disappeared…

Thanks again,