graysonk546 / imaging-station

Codebase for a fastener imaging station.
0 stars 0 forks source link

Solution needed for max storage #17

Open kxing28 opened 1 year ago

kxing28 commented 1 year ago

Imaging runs take up a lot of space. When the hard drive fills up, current method is:

  1. Perform google drive upload
  2. Delete folder manually with rm -rf images/*
  3. Continue

But it's VERY error-prone. Here are some ideas I have (along with upgrading to a larger hard drive)

  1. Use rclone move instead of rclone copy. rclone move performs an upload and then deletes the local file after verifying the hash of the uploaded file matches the local file.
  2. We check if hard drive is at 90% capacity before starting an imaging run, and if so, we alert the user and tell them to perform an rclone move before continuing
  3. We do what dashcams do: Delete the oldest imaging run to make space (after ensuring it's been uploaded). Problem is, the size of each run is not necessarily fixed (images vary in size, and number of images may vary (top-only or full run)), so it's hard to know how much we need to delete to be "done".
kxing28 commented 1 year ago

JK image sizes are pretty uniform. top-down is 33MB, side-view are all 26MB.