Hi, I like to upload a folder to my volume, I managed to access the directory, but I am not able to “put” a folder to sftp, how can I upload and overwrite existing folder?
» put /users/jimmychen/downloads/content/ /content
put /users/jimmychen/downloads/content/ → /content: file exists on VM
I am too would be happy to achieve that with a simple command.
I’ve tried a bunch of workarounds. The approach that worked for me was to use an archiver to pack a folder as a single file. The file then was transferred with sftp and extracted on the server side to a folder.
However, it would be much cooler if sftp shell provided by flyctl command could handle folders natively without jumping through the hoops.
That’s the SFTP shell. You need to exit out of it and open a regular SSH shell using fly ssh console.
I don’t think unzip will be installed by default (it depends on the image you are using), so I suggest switching to tar (or you can install unzip inside the VM). To create a tar archive, you can use tar or 7-zip.
+1 Yes, It would be better if flyctl SFTP shell put command supports overwritting existing files rather than having to ssh console each time to delete a file.