migrating local blob storage to aws s3 - confirm which directory to sync

I’m reviewing documentation on migrating blob storage from local disk to AWS S3 and using this documentation:

https://help.sonatype.com/en/blob-stores.html#moving-a-blob-store

Moving the blob storage with aws s3 sync (as example) looks pretty straight-forward (or using a custom python script to enumerate the files/directories – tool itself doesn’t matter).

can someone confirm in the data-dir (in my case /mnt/sonatype/nexus3) which directory is the one that needs to be synced?

total 222
drwxr-xr-x+  18 nexussvc nexussvc  25 Mar 23 10:24 .
drwxrwxr-x    3 nexussvc nexussvc   4 Feb 27 12:56 ..
drwxr-xr-x+   5 nexussvc nexussvc   8 Jul  5  2022 blobs
drwxr-xr-x+ 347 nexussvc nexussvc 348 Feb 26 11:48 cache
drwxr-xr-x+  48 nexussvc nexussvc  48 Feb 27 01:30 content
drwxr-xr-x+   8 nexussvc nexussvc  13 Feb 27 12:49 db
drwxr-xr-x+   2 nexussvc nexussvc   2 Feb 26 15:41 downloads
drwxr-xr-x+   3 nexussvc nexussvc   4 Jul  1  2022 elasticsearch
drwxr-xr-x+   4 nexussvc nexussvc   5 Feb 26 15:41 etc
drwxr-xr-x+   2 nexussvc nexussvc   2 Jul  1  2022 generated-bundles
drwxr-xr-x+   2 nexussvc nexussvc   3 Jul  1  2022 instances
-rw-r--r--+   1 nexussvc nexussvc   5 Feb 26 11:47 karaf.pid
drwxr-xr-x+   3 nexussvc nexussvc   3 Jul  1  2022 keystores
-rw-r--r--+   1 nexussvc nexussvc  41 Feb 26 11:47 lock
drwxr-xr-x+   5 nexussvc nexussvc 279 Mar 23 09:26 log
-rw-r--r--+   1 nexussvc nexussvc  72 Jul  5  2022 metadata.properties
-rw-r--r--+   1 nexussvc nexussvc   7 Mar 12 16:03 nexus.pid
drwxr-xr-x+   3 nexussvc nexussvc   3 Jul  1  2022 orient
-rw-r--r--+   1 nexussvc nexussvc   5 Feb 26 11:47 port
drwxr-xr-x+   2 nexussvc nexussvc  93 Mar 23 09:55 reconciliation
drwxr-xr-x+   2 nexussvc nexussvc   2 Jul  1  2022 restore-from-backup
drwxr-xr-x+  14 nexussvc nexussvc  24 Mar 22 17:10 tmp
drwxr-xr-x+   2 nexussvc nexussvc   2 Aug 22  2024 upgrades

the content directory appears to be the one to move, would really appreciate someone confirming or pointing me in the correct direction?

Your output here is malformed, but you should look at the user interface for Blob Stores and you would use the directory configured for the file blob store you intend to migrate.

Apologies about the malformed paste, I didn’t catch it while composing the message, fixed that.

As for the directory to sync from, in the UI for the blob store is listed as /mnt/sonatype/nexus3, unfortunately the application data directory for nexus3 ($appdir/bin/nexus.vmoptions: -Dkaraf.data) also uses that directory. I can’t speak for the initial installation choices but from what I gather this choice to use the same directory for both the blob store and the data directory was a mistake.

So, short of syncing the entirety of this folder (and catching files that aren’t needed for the store) can someone point to the minimum top level files/directories needed to sync up to S3?

Ah, in that case you would want the content, reconciliation and metadata.properties.

The s3 bucket should end up with those 2 directories, and the metadata.properties file at the storage root. (This can be / or Nexus allows you to configure a prefix, e.g. /foo/ if desired)

Perfect, that’s inline with what I inferred from some other documentation, but big thank you for confirming!

@Joey_Officer you might want to consider creating a separate test instance and running through the steps with a small amount of data before you attempt to migrate a large amount.