Howto exclude file(s) from data upload (littlefs)

Dear Forum.

Got an application with a webserver. The HTML/javascript is uploaded to LittleFS via 'data upload' within the Arduino IDE 1.8.19. Sofar so good.

Now whenever I edit the HTML page, a backup is made with extension html~. I do not want this file to be uploaded to the ESP8266.

Is there a way to exclude certain files from the data upload?

Thanks.

Welcome to the forum

Why did you start a topic in the Uncategorised category of the forum when its description explicitly tells you not to ?

Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics

I don’t think so.

You could Change the settings of your editor to not create the backup may be ?

Sorry... @UKHeliBob Eager to get an answer I did not read carefully the category description policy. And further I was a bit overwhelmed by all the choices to make... Will put more attention to it in the future. Thanks for the update.

Thanks @J-M-L I could do that, however, I like the backup in case of mistakes I make. I could also just delete the backup file prior to submitting, but I was kind of hoping there is a sort of blacklist file I could make to prevent the IDE to upload certain files. I do recollect seeing something like it but cannot find it anymore.

It does not ring a bell. data is basically the production directory so you should have there only what you want in production.

I never tried having symlinks, may be that would work.

It isn't actually Arduino IDE that uploads the filesystem. It is a 3rd party "Tool" (AKA "plugin") you installed in order to add the filesystem upload capability to Arduino IDE.

So any sort of an exclusion capability would be implemented in that Tool rather than in Arduino IDE.

For this reason, it would be helpful if you would add a reply here on the forum thread to give us the link to where you obtained the specific Tool you are using (there are several littlefs filesystem uploader Tools).

What program makes these "backups"?
That program should be configured in a way, that backups are stored in a different folder not interfering with the (Arduino) toolchain.

Not sure which one I installed. It is a Python script I guess, but I am not into Python.

I use Bluefish editor.

It will be a good idea for you to document such things in the future.

The truth is that it is likely the Tool you are using doesn't have an exclusion feature simply because these are generally hobby projects where there aren't a lot of development resources to put towards adding such supplemental features after the work to implement the essential functionality has been completed. However, we could only say that conclusively if we took a look at the documentation (and source code if we wanted to be sure, since developers often don't bother to document supplemental features they added to the code) of the Tool you are using. Without doing that, we can only make guesses.

We might be able to determine which Tool you are using from data about the Tool file. If you would like to try to gather that data, I'll provide instructions:

  1. Start Arduino IDE.
  2. Select File > Preferences... (or Arduino > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  3. Note the path shown in the "Sketchbook location:" field of the "Preferences" dialog.
  4. Click the "Cancel" button in the "Preferences" dialog.
  5. Select File > Quit (or Arduino > Quit Arduino for macOS users) from the Arduino IDE menus.
    All Arduino IDE windows will close.
  6. Using your file manager, open the folder at the path that was shown in the "Sketchbook location" IDE preference.
  7. Look for a folder named tools. If the Tool was installed following best practices, it should be installed under this folder. Unfortunately a lot of Tool developers provide outdated instructions for installing the Tool to an inferior location so you might not see a tools folder there. If so, add a reply here on the forum thread to let us know and we'll provide instructions for finding the alternative installation location.
  8. Open the tools folder.
  9. You should see a subfolder inside the tools folder. Tell us the name of that folder.
  10. Open the subfolder.
  11. Open the tool folder you will find in the subfolder.
  12. You should see a file with .jar file extension in this folder. Please provide the following information about this file:
    • The filename
    • The date of the file
    • The size of the file

Very elaborate. Thanks!
I got 3 directories:
ESP32FS
ESP8266FS
ESP8266LittleFS

Before LittleFS I used SPIFFS and sometimes an ESP32.
Under ESP8266LittleFS/tool/ :

esp8266littlefs.jar
from 19 nov 2019
7207 bytes.

I also find the org zip file:
ESP8266LittleFS-2.6.0.zip
7002 bytes.

It might be from GitHub - earlephilhower/arduino-esp8266littlefs-plugin: Plugin to upload LittleFS filesystems to ESP8266

I concur. I looked through the source code and didn't find any exclusion capability.

I also checked the source code of the mklittlefs command line tool that is used under the hood by the "Arduino ESP8266 LittleFS Filesystem Uploader" Arduino IDE Tool to generate the filesystem image, but unfortunately I didn't find any usable exclusion capability in that tool either (it does exclude a hardcoded list of files, but it would be quite hacky to leverage that feature for your use case).

Thanks for trying. I submitted a request for adding this functionality to the tool developer. It is not essential but would make life just that bit easier :smiley:

You are welcome.

In order to make all relevant information available to any who are interested in this subject, I'll share a link to the request here: