Archiving EEG Data to Azure¶
Shared with the CNT
This procedure runs on infrastructure the lab and the CNT operate together. The CNT manual keeps its own copy; changes to the shared steps are agreed with the CNT.
What this page tells you
Archive HUP EEG data to Azure: copy config logs to /ieeg_metadata, run zip_dataset.sh in a screen on cnt1, verify the zip log, move tarball to ready_for_archiving, upload with upload_azcli.sh, verify in portal.azure.com (cntlitt), then delete local copies.
This procedure archives raw iEEG data (the original Natus recordings), or any other data, to Azure cold storage under Brian Litt's account once a HUP EEG dataset is ready to be archived. Once the data is archived, it can be deleted from cnt-fs and cnt1.
Prerequisites:
- You need access to the cntlitt storage account in Microsoft Azure. PMACS grants access.
- The
upload_azcli.shscript in/project/eeg_process/azure_archive/scriptsneeds a non-expired SAS token, which PMACS provides. The token recorded when this page was written expired on 03/15/2026, so confirm with PMACS that a current token is in place before starting.
When a HUP EEG dataset is ready to be archived:
- Copy the HUPXXX config logs into the
/ieeg_metadatafolder oncnt-fs.- Examples: the channel mapping text file, the NatusDir file, the data collection file and the jacksheet PDF.
- SSH into
cnt1and open a new Linux screen for HUPXXX.screen -S HUPXXX
- Go to
/project/eeg_process/azure_archive/scripts. - Run
bash zip_dataset.sh /mnt/cnt-fs/eeg_raw/ieeg_raw/HUPXXX.- This takes a long time to run. Detach from the Linux screen by pressing Ctrl A + D. Check whether it is done by reattaching (
screen -r HUPXXX). - Optional: If it is urgent to free up space in
cnt-fs, first move the HUP dataset out ofcnt-fsand intocnt1with this command:
rsync -ah --stats /mnt/cnt-fs/eeg_raw/ieeg_raw/HUPXXX /project/eeg_process/azure_archive/staging/
Then run this command instead:
bash zip_dataset.sh /project/eeg_process/azure_archive/staging/HUPXXX
- This takes a long time to run. Detach from the Linux screen by pressing Ctrl A + D. Check whether it is done by reattaching (
- Once the zip process has finished, check the log file
/project/eeg_process/azure_archive/logs_zip/zip_log_HUPXXX.txt. Confirm that the number of files and folders and the total size match between the original dataset and the compressed tarball.- Once confirmed, delete the HUPXXX dataset from
cnt-fs.
- Once confirmed, delete the HUPXXX dataset from
- Move the HUPXXX tarball (the zipped file
HUPXXX.tar.gz) into the/project/eeg_process/azure_archive/ready_for_archivingfolder. - Return to the HUPXXX Linux screen (reattach with
screen -r HUPXXXif you detached from it) and make sure you are in the/project/eeg_process/azure_archive/scriptsfolder. Then run the following command to start uploading the tarball to Azure:
nohup bash upload_azcli.sh HUPXXX.tar.gz &> /project/eeg_process/azure_archive/logs_azure/HUPXXX_azure_archive.log- This takes a long time to run. Detach from the Linux screen by pressing Ctrl A + D. Check whether it is done by reattaching (
screen -r HUPXXX).
- This takes a long time to run. Detach from the Linux screen by pressing Ctrl A + D. Check whether it is done by reattaching (
- Check the log file
/project/eeg_process/azure_archive/logs_azure/HUPXXX_azure_archive.logfor progress on the upload. Confirm from the log that the upload has finished and that the size of the remote tarball matches the size of the local tarball. - Log in to http://portal.azure.com to verify that the tarball has been uploaded to Brian Litt's account.
- Log in with your PennMedicine (UPHS) email account.


- Search for the "cntlitt" storage account.

- Go to Data Storage, then go to Containers.

- Open the "cntlitt" container.

- Look for the HUPXXX.tar.gz tarball.
- Log in with your PennMedicine (UPHS) email account.
- Once verified, delete the HUPXXX.tar.gz tarball from the
/project/eeg_process/azure_archive/ready_for_archivingfolder.