Daniel's Weblog
Posts Tags Colophon
About

Tags / Internetarchive


Jul 19, 2025


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 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/',
    # After creating an account you can ge the required keys here:
    # https://archive.org/account/s3.php
    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 publicly visible