galaxy icon indicating copy to clipboard operation
galaxy copied to clipboard

History import deletes history archive

Open bernt-matthias opened this issue 9 months ago • 1 comments

Describe the bug

I imported a history from the user_library_import_dir and was surprised that the archive is deleted.

Galaxy Version and/or server at which you observed the bug Galaxy Version: 24.2

Expected behavior Galaxy should warn that the file will be deleted or not delete the file.

bernt-matthias avatar Jun 13 '25 13:06 bernt-matthias

Galaxy should warn that the file will be deleted or not delete the file.

I think that Galaxy shouldn't delete the file, this is just a bug.

nsoranzo avatar Jun 13 '25 14:06 nsoranzo

@bernt-matthias, just to verify:

I can import files from the user_library_import_dir, but I can't seem to be able to export a history to it because it is not "writeable". Anyway, I manually placed a history archive in the user_library_import_dir, and the history archive does not get deleted from there.

So, I guess you are then using ftp_upload_dir instead to export your history (which is writeable), and, in that case, If you import it back it will be deleted because the default for ftp_upload_purge is True in the config, which sets delete_on_realize to True in the underlying PosixFileSource.

I'm not sure what the fix would be here... the behavior is exactly as documented in the config. I guess the Upload FTP is not a "long term" storage unless you set ftp_upload_purge to False.

davelopez avatar Jun 18 '25 15:06 davelopez

Indeed I have set both (pointing to the same directory). I'm actually "abusing" ftp_upload_dir here, since I have not setup any FTP, but my users copy via scp to our cluster.

bernt-matthias avatar Jun 19 '25 08:06 bernt-matthias

Thanks for checking.

bernt-matthias avatar Jun 19 '25 08:06 bernt-matthias