Daniel's Weblog
Posts About
Tags Colophon
Posted on

Uploading an entire directory to the Internet Archive: I had a collection of files around ~50 GB in size that I wanted to upload to a single item in the Internet Archive directly from my NAS. There is a cli that could work but didn’t have a trivial way to upload all the files in a directory. I tried the S3-compatible endpoint with Cyberduck but that also didn’t work as expected.

I ended up leaving running the Python library in a detached tmux session

# In Bash:
python3 -m venv venv;
source venv/bin/activate;
pip install internetarchive;

# In Python:
from internetarchive import upload
upload('DESTINATION_ITEM_ON_INTERNET_ARCHIVE', 'LOCAL_FOLDER/', access_key='YOUR_ACCESS_KEY', secret_key='YOUR_SECRET_KEY')

Note: Remember, uploading things to the Internet Archive makes the email address associated with your account publicily visible