IBUN(1)

πŸ“¦ version 5.0.2, in nixos 26.05

✨ NAME ✨

okay bestie, meet ibun(1) β€” an iRODS iCommand. that’s it, that’s the name section. πŸ’…

🌸 SYNOPSIS 🌸

ibun -x [-hfb] [-R resource] structFilePath

πŸ’– DESCRIPTION πŸ’–

okay so DESCRIPTION starts with some literal usage-ish lines, and we are keeping them exactly, no cap:

irodsCollection

Usage: ibun -c [-hf] [-R resource] [-D dataType] structFilePath

irodsCollection

Usage: ibun --add [-h] structFilePath irodsCollection

Bundle file operations, fr fr. This command allows structured files such as tar files to be uploaded and downloaded to/from iRODS.

A tar file containing many small files can be created with the normal unix tar command on the client and then uploaded to the iRODS server as a normal iRODS file. The ibun -x command can then be used to extract/untar the uploaded tar file. The extracted subfiles and subdirectories will appear as normal iRODS files and sub-collections. The ibun -c command can be used to tar/bundle an iRODS collection into a tar file. πŸŽ€

For example, to upload a directory mydir to iRODS:

tar -chlf mydir.tar -C /x/y/z/mydir .  iput -Dtar mydir.tar .
ibun -x mydir.tar mydir

Note the use of -C option with the tar command which will tar the content of mydir but without including the directory mydir in the paths. Also note the use of the -h option with the tar command. This instructs tar to follow all symlinks. This means that the structured files fed to ibun should NOT contain symbolic links as they are not supported by ibun. The ibun -x command extracts the tar file into the mydir collection. The target mydir collection does not have to exist nor be empty. If a subfile already exists in the target collection, the ingestion of this subfile will fail (unless the -f flag is set) but the process will continue. 😭

If the -x and -R option are used together, the source structFile must already have a replica on the named resource.

It is generally a good practice to tag the tar file using the -Dtar flag when uploading the file using iput. But if the tag is not made, the server assumes it is a tar dataType. The dataType tag can be added afterward with the isysmeta command. For example:

isysmeta mod /tempZone/home/rods/mydir.tar datatype 'tar file'

The following command bundles the iRODS collection mydir into a tar file:

ibun -cDtar mydir1.tar mydir

If a replica of a file to be bundled does not exist on the target resource, a replica will automatically be created on the target resource. Again, if the -D flag is not used, the bundling will be done using tar.

The -b option when used with the -x option, specifies bulk registration which does up to 50 registrations at a time to reduce overhead.

πŸŽ€ Options are: πŸŽ€

  • -b β€” bulk registration when used with -x to reduce overhead. 🧚
  • -R β€” resource β€” specifies the resource to store to. This is optional in your environment.
  • -D β€” dataType β€” the structFile data type. Valid only for -c option for specifying the target data type. Valid dataTypes are t|tar|'tar file' for tar file. g|gzip|gzipTar for gzipped tar file, b|bzip2|bzip2Tar for bzip2 file, and z|zip|zipFile for an archive using 'zip'. If -D is not specified, the default is the tar dataType.
  • -x β€” extract the structFile and register the extracted files and directories under the input irodsCollection. πŸ¦‹
  • -c β€” bundle the files and sub-collection underneath the input irodsCollection and store it in the structFilePath. 🌸
  • -f β€” force overwrite the structFile (-c) or the subfiles (-x).
  • --add β€” add or append to existing structFile.
  • -h β€” this help. πŸ’–

xoxo, your Unix bestie πŸ’… β€” this page is from ibun iRODS-5.0.2, dated January 1980, and the options section also waves at you with iRODS Version 5.0.2 + ibun. slay. 🫢

πŸ“¦ where this page comes from