<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pwiki.pic.es/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tallada</id>
	<title>Public PIC Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://pwiki.pic.es/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tallada"/>
	<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Special:Contributions/Tallada"/>
	<updated>2026-06-16T07:43:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1369</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1369"/>
		<updated>2026-06-08T11:20:59Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Configure SSH ControlMaster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es), if desired, you can also enter a subdirectory (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es) or, if desired, you can enter a subdirectory under it (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration under &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1368</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1368"/>
		<updated>2026-06-08T11:20:33Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Macaroon configuration example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es), if desired, you can also enter a subdirectory (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es) or, if desired, you can enter a subdirectory under it (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration under &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1367</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1367"/>
		<updated>2026-06-08T11:19:38Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Configure the WebDAV remote using a Macaroon */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es), if desired, you can also enter a subdirectory (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es) or, if desired, you can enter a subdirectory under it (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1366</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1366"/>
		<updated>2026-06-08T11:18:07Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* OIDC configuration example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es), if desired, you can also enter a subdirectory (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1365</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1365"/>
		<updated>2026-06-08T11:17:31Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* OIDC configuration example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es), if desired, you can also enter a subdirectory (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration at ~/.config/rclone/rclone.conf should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1364</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1364"/>
		<updated>2026-06-08T11:17:10Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* OIDC configuration example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es), if desired, you can also enter a subdirectory (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1363</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1363"/>
		<updated>2026-06-08T11:16:37Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Configure the WebDAV remote using OIDC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV base path (https://webdav.pic.es), if desired, you can also enter a subdirectory (https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1362</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1362"/>
		<updated>2026-06-08T11:14:01Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1361</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1361"/>
		<updated>2026-06-08T11:13:15Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* How to provide data access to PIC massive storage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
* The storage path or endpoint provided by your PIC contact.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1360</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1360"/>
		<updated>2026-06-08T11:13:04Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | WebDAV / HTTPS&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
* The storage path or endpoint provided by your PIC contact.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1359</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1359"/>
		<updated>2026-06-08T11:11:41Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage =&lt;br /&gt;
&lt;br /&gt;
This page explains how to configure &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; to access PIC storage.&lt;br /&gt;
&lt;br /&gt;
The configuration depends on the storage path you need to access.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Storage access methods&lt;br /&gt;
! Storage path&lt;br /&gt;
! Protocol&lt;br /&gt;
! rclone backend&lt;br /&gt;
! Supported authentication&lt;br /&gt;
! Example remote name&lt;br /&gt;
|-&lt;br /&gt;
| Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| WebDAV / HTTPS&lt;br /&gt;
| &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| OIDC token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;&lt;br /&gt;
| WebDAV / HTTPS&lt;br /&gt;
| &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt;&lt;br /&gt;
| Macaroon bearer token&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| SSH / SFTP&lt;br /&gt;
| &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;&lt;br /&gt;
| SSH with &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; installed on your client machine.&lt;br /&gt;
* The storage path or endpoint provided by your PIC contact.&lt;br /&gt;
&lt;br /&gt;
For paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, you also need one of the following:&lt;br /&gt;
&lt;br /&gt;
* an OIDC token setup using &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;; or&lt;br /&gt;
* a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
For any other storage location, you also need:&lt;br /&gt;
&lt;br /&gt;
* SSH access to the PIC host.&lt;br /&gt;
* SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; configured on your client machine.&lt;br /&gt;
&lt;br /&gt;
== Install rclone ==&lt;br /&gt;
&lt;br /&gt;
You can download the rclone binary directly without installing system packages. For example, on a Linux 64-bit machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
$ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, on Ubuntu you can install the Debian package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
$ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that rclone works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration should I use? ==&lt;br /&gt;
&lt;br /&gt;
Use the table below to choose the right configuration.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Choosing the right configuration&lt;br /&gt;
! If you want to access...&lt;br /&gt;
! Use this section&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using OIDC authentication&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using OIDC|Configure rclone for PNFS data paths using OIDC]]&lt;br /&gt;
|-&lt;br /&gt;
| A path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; using a Macaroon token&lt;br /&gt;
| [[#Configure rclone for PNFS data paths using a Macaroon|Configure rclone for PNFS data paths using a Macaroon]]&lt;br /&gt;
|-&lt;br /&gt;
| Any other storage location&lt;br /&gt;
| [[#Configure rclone for any other storage location|Configure rclone for any other storage location]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths ==&lt;br /&gt;
&lt;br /&gt;
Paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; are accessed using WebDAV over HTTPS.&lt;br /&gt;
&lt;br /&gt;
For these paths, configure rclone with the &amp;lt;code&amp;gt;webdav&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Use one of the following authentication methods:&lt;br /&gt;
&lt;br /&gt;
* OIDC token, retrieved automatically with &amp;lt;code&amp;gt;oidc-token&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Macaroon token, pasted into rclone as a bearer token.&lt;br /&gt;
&lt;br /&gt;
Do not configure username/password authentication unless PIC explicitly instructs you to do so.&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using OIDC ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been instructed to authenticate with OIDC.&lt;br /&gt;
&lt;br /&gt;
=== OIDC requirements ===&lt;br /&gt;
&lt;br /&gt;
Before configuring rclone, make sure that:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
* You have configured an OIDC account, for example &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The following command returns a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command does not work, see [[#Configuring oidc-agent for OIDC tokens|Configuring oidc-agent for OIDC tokens]].&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using OIDC ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-oidc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When asked for a bearer token, leave it empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &amp;lt;code&amp;gt;bearer_token_command&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token_command.&lt;br /&gt;
Command to run to get a bearer token.&lt;br /&gt;
bearer_token_command&amp;gt; oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the remaining advanced options by pressing &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;, unless PIC instructed you to change them.&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token_command: oidc-token pic-pnfs&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-oidc&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-oidc]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-oidc:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for PNFS data paths using a Macaroon ==&lt;br /&gt;
&lt;br /&gt;
Use this option if you have been given a Macaroon token.&lt;br /&gt;
&lt;br /&gt;
The Macaroon is used as a WebDAV bearer token.&lt;br /&gt;
&lt;br /&gt;
=== Configure the WebDAV remote using a Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Start the rclone configuration wizard:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new remote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No remotes found, make a new one?&lt;br /&gt;
n) New remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
n/s/q&amp;gt; n&lt;br /&gt;
&lt;br /&gt;
Enter name for new remote.&lt;br /&gt;
name&amp;gt; pic-pnfs-macaroon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select WebDAV:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option Storage.&lt;br /&gt;
Type of storage to configure.&lt;br /&gt;
Choose a number from below, or type in your own value.&lt;br /&gt;
Storage&amp;gt; webdav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter the WebDAV endpoint provided by PIC.&lt;br /&gt;
&lt;br /&gt;
For a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;, the URL will normally point to that path or to a subdirectory under it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option url.&lt;br /&gt;
URL of http host to connect to.&lt;br /&gt;
url&amp;gt; https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select vendor &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option vendor.&lt;br /&gt;
Name of the WebDAV site/service/software you are using.&lt;br /&gt;
vendor&amp;gt; other&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave username empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option user.&lt;br /&gt;
User name.&lt;br /&gt;
user&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave password empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option pass.&lt;br /&gt;
Password.&lt;br /&gt;
y) Yes, type in my own password&lt;br /&gt;
g) Generate random password&lt;br /&gt;
n) No, leave this optional password blank&lt;br /&gt;
y/g/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the Macaroon token as the bearer token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Option bearer_token.&lt;br /&gt;
Bearer token instead of user/pass, for example a Macaroon.&lt;br /&gt;
bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You normally do not need to edit the advanced configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Edit advanced config?&lt;br /&gt;
y) Yes&lt;br /&gt;
n) No&lt;br /&gt;
y/n&amp;gt; n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end, review and accept the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration complete.&lt;br /&gt;
Options:&lt;br /&gt;
- type: webdav&lt;br /&gt;
- url: https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
- vendor: other&lt;br /&gt;
- bearer_token: *** ENCRYPTED ***&lt;br /&gt;
&lt;br /&gt;
Keep this &amp;quot;pic-pnfs-macaroon&amp;quot; remote?&lt;br /&gt;
y) Yes this is OK&lt;br /&gt;
e) Edit this remote&lt;br /&gt;
d) Delete this remote&lt;br /&gt;
y/e/d&amp;gt; y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quit the rclone configuration menu:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e) Edit existing remote&lt;br /&gt;
n) New remote&lt;br /&gt;
d) Delete remote&lt;br /&gt;
r) Rename remote&lt;br /&gt;
c) Copy remote&lt;br /&gt;
s) Set configuration password&lt;br /&gt;
q) Quit config&lt;br /&gt;
e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon configuration example ===&lt;br /&gt;
&lt;br /&gt;
The resulting rclone configuration should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-pnfs-macaroon]&lt;br /&gt;
type = webdav&lt;br /&gt;
url = https://webdav.pic.es/pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
vendor = other&lt;br /&gt;
bearer_token = YOUR_MACAROON_TOKEN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the configured remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a directory below the configured path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete path below the configured WebDAV root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./ntuples pic-pnfs-macaroon:analysis/ntuples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure rclone for any other storage location ==&lt;br /&gt;
&lt;br /&gt;
Use this section for storage paths that are not under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These locations are accessed using SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Because SSH authentication may require browser-based authentication, you should configure SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;. This allows rclone to reuse an already-authenticated SSH connection.&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ControlMaster ===&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add an entry for the PIC SSH host. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host pic-ssh&lt;br /&gt;
    HostName ui04.pic.es&lt;br /&gt;
    User YOUR_PIC_USERNAME&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ui04.pic.es&amp;lt;/code&amp;gt; with the SSH host provided by PIC, if different.&lt;br /&gt;
* &amp;lt;code&amp;gt;YOUR_PIC_USERNAME&amp;lt;/code&amp;gt; with your PIC username.&lt;br /&gt;
&lt;br /&gt;
Instead of restricting this configuration to &amp;lt;code&amp;gt;pic-ssh&amp;lt;/code&amp;gt;, you can enable it for all SSH connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, using a specific host entry is usually clearer and safer.&lt;br /&gt;
&lt;br /&gt;
=== Open the first SSH connection ===&lt;br /&gt;
&lt;br /&gt;
Before using rclone, open one SSH connection manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may see a message similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, complete the authentication, then return to the terminal and press &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After this first authentication, subsequent SSH connections to the same host should reuse the existing &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
Test this with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh pic-ssh&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can close this shell after testing.&lt;br /&gt;
&lt;br /&gt;
=== Configure the SFTP rclone remote ===&lt;br /&gt;
&lt;br /&gt;
Other storage locations use the rclone &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; backend.&lt;br /&gt;
&lt;br /&gt;
Because we want rclone to reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection, configure the remote to use the external &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
First, locate your rclone configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command prints something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Configuration file is stored at:&lt;br /&gt;
/home/YOUR_LOCAL_USER/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit that file and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells rclone to use your system SSH command, which can reuse the SSH &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
=== SFTP configuration example ===&lt;br /&gt;
&lt;br /&gt;
Example rclone configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[pic-storage]&lt;br /&gt;
type = sftp&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
shell_type = unix&lt;br /&gt;
known_hosts_file = ~/.ssh/known_hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SFTP usage examples ===&lt;br /&gt;
&lt;br /&gt;
List the remote root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List a specific storage path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List files recursively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upload data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example using a concrete absolute path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./results pic-storage:/storage/projects/MY_PROJECT/results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General rclone usage ==&lt;br /&gt;
&lt;br /&gt;
The same basic rclone commands can be used with all configured remotes.&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;REMOTE_NAME&amp;lt;/code&amp;gt; with one of the remotes you configured, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-oidc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-pnfs-macaroon&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pic-storage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone lsd pic-pnfs-oidc:&lt;br /&gt;
$ rclone lsd pic-pnfs-macaroon:&lt;br /&gt;
$ rclone lsd pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List files recursively ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone ls pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone ls pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download a remote directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy REMOTE_NAME:PATH LOCAL_PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy pic-pnfs-oidc:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-pnfs-macaroon:PROJECT_OR_DIRECTORY ./local-copy&lt;br /&gt;
$ rclone copy pic-storage:/PATH_TO_YOUR_STORAGE_SPACE ./local-copy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload a local directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy LOCAL_DIR REMOTE_NAME:PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-macaroon:PROJECT_OR_DIRECTORY&lt;br /&gt;
$ rclone copy ./local-data pic-storage:/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recommended upload flags ===&lt;br /&gt;
&lt;br /&gt;
For uploads, we recommend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--check-first -P --stats-one-line --transfers N_TRANSFERS --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many small files, &amp;lt;code&amp;gt;N_TRANSFERS&amp;lt;/code&amp;gt; can be up to &amp;lt;code&amp;gt;350&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./local-data pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading into directories with many files, for example more than 1000 files, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-traverse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--multi-thread-streams 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If uploading very large files, for example larger than 10 GB, also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to a path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-pnfs-oidc:PROJECT_OR_DIRECTORY \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Full example for a large upload to another storage location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rclone copy ./large-dataset pic-storage:/PATH_TO_YOUR_STORAGE_SPACE \&lt;br /&gt;
  --check-first -P --stats-one-line --transfers 350 --size-only \&lt;br /&gt;
  --no-traverse \&lt;br /&gt;
  --multi-thread-streams 1 \&lt;br /&gt;
  --timeout 15m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see the rclone documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://rclone.org/docs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
This section is only needed if you use OIDC authentication for paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent ===&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the account is already configured, load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure the OIDC account ===&lt;br /&gt;
&lt;br /&gt;
This step only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
You need an updated version of &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, version greater than &amp;lt;code&amp;gt;5.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ask your PIC contact for the client secret and replace &amp;lt;code&amp;gt;XXXXXXXXXXXXXXXXXX&amp;lt;/code&amp;gt; below.&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-pnfs&amp;lt;/code&amp;gt; account to retrieve tokens from PIC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen -m --client-id CLIENT_ID_PROVIDED_BY_PIC \&lt;br /&gt;
  --client-secret XXXXXXXXXXXXXXXXXX \&lt;br /&gt;
  --pub --flow=device \&lt;br /&gt;
  --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
  --scope=&amp;quot;openid profile offline_access&amp;quot; \&lt;br /&gt;
  --redirect-uri=edu.kit.data.oidc-agent:/ pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will show a URL and a code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No account exists with this short name. Creating new configuration ...&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs':&lt;br /&gt;
Confirm encryption password:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the URL in your browser, enter the code, authenticate, then return to the terminal.&lt;br /&gt;
&lt;br /&gt;
You will be asked to enter an encryption password twice. You will need this password when refreshing or reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; account.&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticate if the refresh token has expired ===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; process is restarted, or if your refresh token expires due to inactivity, you may need to reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter decryption password for account config 'pic-pnfs':&lt;br /&gt;
Generating account configuration ...&lt;br /&gt;
accepted&lt;br /&gt;
&lt;br /&gt;
Using a browser on any device, visit:&lt;br /&gt;
https://idp.pic.es/realms/PIC/device&lt;br /&gt;
&lt;br /&gt;
And enter the code: ASDF-GHJK&lt;br /&gt;
Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
&lt;br /&gt;
[ QR CODE ]&lt;br /&gt;
&lt;br /&gt;
Enter encryption password for account configuration 'pic-pnfs' [***]:&lt;br /&gt;
Everything setup correctly!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test OIDC token retrieval ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;, test that you can retrieve a token:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this command works, the rclone configuration using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bearer_token_command = oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should also work.&lt;br /&gt;
&lt;br /&gt;
== Obtaining a Macaroon for /pnfs/pic.es/data ==&lt;br /&gt;
&lt;br /&gt;
This section is intended for contacts or administrators who need to generate Macaroons for users.&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid for up to 7 days.&lt;br /&gt;
&lt;br /&gt;
The restricted path should be under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESTRICTED_PATH=pnfs/pic.es/data/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read-only Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for downloading data only.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow:&lt;br /&gt;
&lt;br /&gt;
* listing directories;&lt;br /&gt;
* downloading files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Macaroon ===&lt;br /&gt;
&lt;br /&gt;
Use this for uploading data.&lt;br /&gt;
&lt;br /&gt;
The Macaroon will allow full permissions on the requested path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
  -d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
  https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the value of the &amp;lt;code&amp;gt;macaroon&amp;lt;/code&amp;gt; field to the user. The user should paste it into rclone as the WebDAV &amp;lt;code&amp;gt;bearer_token&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== SSH authentication is requested repeatedly ===&lt;br /&gt;
&lt;br /&gt;
This applies to any storage location accessed through SSH/SFTP.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* You have opened the first SSH connection manually with &amp;lt;code&amp;gt;ssh pic-ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Browser authentication was completed successfully.&lt;br /&gt;
* Your &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;ControlMaster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ControlPath&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ControlPersist&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Your rclone remote uses the external SSH command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh = ssh pic-ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OIDC authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using OIDC.&lt;br /&gt;
&lt;br /&gt;
Check that &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ eval `oidc-agent`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the account is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-add pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that you can retrieve a token manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-token pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token cannot be retrieved, reauthenticate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ oidc-gen --reauthenticate pic-pnfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macaroon authentication fails ===&lt;br /&gt;
&lt;br /&gt;
This applies to paths under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt; accessed using a Macaroon.&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* The Macaroon was copied completely.&lt;br /&gt;
* The Macaroon has not expired.&lt;br /&gt;
* The Macaroon was generated for the correct path under &amp;lt;code&amp;gt;/pnfs/pic.es/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The Macaroon has the required permissions, for example read-only or upload permissions.&lt;br /&gt;
&lt;br /&gt;
If the Macaroon has expired, request or generate a new one.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1355</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1355"/>
		<updated>2026-05-07T15:27:39Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage (dCache) =&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
 * Install and configure Rclone&lt;br /&gt;
 * PIC credentials or macaroon&lt;br /&gt;
&lt;br /&gt;
== Install Rclone ==&lt;br /&gt;
&lt;br /&gt;
You can directly download the binary without installing anything. For instance, for a linux 64 bits machine:&lt;br /&gt;
&lt;br /&gt;
    $ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
    [...]&lt;br /&gt;
    $ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or if you prefer, you can install Rclone like the next example on a Ubuntu machine:&lt;br /&gt;
&lt;br /&gt;
    $ cd /tmp&lt;br /&gt;
    $ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
    $ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&lt;br /&gt;
== Configure Rclone ==&lt;br /&gt;
&lt;br /&gt;
You should have been given some credentials and the url of a WebDAV endpoint at PIC.&lt;br /&gt;
With them, you just need to create the config in rclone:&lt;br /&gt;
&lt;br /&gt;
    $ rclone config&lt;br /&gt;
    No remotes found, make a new one?&lt;br /&gt;
    n) New remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    n/s/q&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Enter name for new remote.&lt;br /&gt;
    name&amp;gt; pic&lt;br /&gt;
    &lt;br /&gt;
    Option Storage.&lt;br /&gt;
    Type of storage to configure.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
     1 / 1Fichier&lt;br /&gt;
       \ (fichier)&lt;br /&gt;
    [...]&lt;br /&gt;
    Storage&amp;gt; webdav&lt;br /&gt;
    &lt;br /&gt;
    Option url.&lt;br /&gt;
    URL of http host to connect to.&lt;br /&gt;
    E.g. https://example.com.&lt;br /&gt;
    Enter a value.&lt;br /&gt;
    url&amp;gt;  https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    &lt;br /&gt;
    Option vendor.&lt;br /&gt;
    Name of the WebDAV site/service/software you are using.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
    Press Enter to leave empty.&lt;br /&gt;
     1 / Nextcloud&lt;br /&gt;
       \ (nextcloud)&lt;br /&gt;
    [...]&lt;br /&gt;
     5 / Other site/service or software&lt;br /&gt;
       \ (other)&lt;br /&gt;
    vendor&amp;gt; other&lt;br /&gt;
    &lt;br /&gt;
===  Using your PIC credentials ===&lt;br /&gt;
&lt;br /&gt;
If you have a PIC user, enter it and the corresponding password in this step. Otherwise, leave these fields blank.&lt;br /&gt;
&lt;br /&gt;
    Option user.&lt;br /&gt;
    User name.&lt;br /&gt;
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    user&amp;gt; YOUR_PIC_USERNAME&lt;br /&gt;
&lt;br /&gt;
    Option pass.&lt;br /&gt;
    Password.&lt;br /&gt;
    Choose an alternative below. Press Enter for the default (n).&lt;br /&gt;
    y) Yes, type in my own password&lt;br /&gt;
    g) Generate random password&lt;br /&gt;
    n) No, leave this optional password blank (default)&lt;br /&gt;
    y/g/n&amp;gt; y&lt;br /&gt;
    Enter the password:&lt;br /&gt;
    password: YOUR_PIC_PASSWORD&lt;br /&gt;
    Confirm the password:&lt;br /&gt;
    Password: YOUR_PIC_PASSWORD&lt;br /&gt;
&lt;br /&gt;
=== Using a Macaroon token ===&lt;br /&gt;
&lt;br /&gt;
If you have been given a Macaroon token, provide it as a bearer token after leaving the user and password blank&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&lt;br /&gt;
=== Using an OIDC token ===&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; &lt;br /&gt;
    &lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Option bearer_token_command.&lt;br /&gt;
    Command to run to get a bearer token.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token_command&amp;gt; oidc-token OIDC_AGENT_ACCOUNT_SHORTNAME&lt;br /&gt;
&lt;br /&gt;
=== Review settings ===&lt;br /&gt;
&lt;br /&gt;
At the end, just review the information you entered and confirm.&lt;br /&gt;
&lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Configuration complete.&lt;br /&gt;
    Options:&lt;br /&gt;
    - type: webdav&lt;br /&gt;
    - url: https://door04.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    - vendor: other&lt;br /&gt;
    - user: YOUR_PIC_USERNAME&lt;br /&gt;
    - pass: *** ENCRYPTED ***&lt;br /&gt;
    Keep this &amp;quot;pic&amp;quot; remote?&lt;br /&gt;
    y) Yes this is OK (default)&lt;br /&gt;
    e) Edit this remote&lt;br /&gt;
    d) Delete this remote&lt;br /&gt;
    y/e/d&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Current remotes:&lt;br /&gt;
    &lt;br /&gt;
    Name                 Type&lt;br /&gt;
    ====                 ====&lt;br /&gt;
    pic                  webdav&lt;br /&gt;
    &lt;br /&gt;
    e) Edit existing remote&lt;br /&gt;
    n) New remote&lt;br /&gt;
    d) Delete remote&lt;br /&gt;
    r) Rename remote&lt;br /&gt;
    c) Copy remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&lt;br /&gt;
Once done, you can use command line to browse and download/upload data.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Download a remote directory from PIC&lt;br /&gt;
  rclone copy &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt; &amp;lt;local_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upload a local directory to PIC&lt;br /&gt;
  rclone ${UPLOAD_FLAGS} copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When uploading data, we recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only&lt;br /&gt;
&lt;br /&gt;
If uploading lots onto directories with lots of files (&amp;gt;1000), please use:&lt;br /&gt;
  --no-traverse&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use&lt;br /&gt;
   --multi-thread-streams 1&lt;br /&gt;
&lt;br /&gt;
If uploading very large files (&amp;gt;10G), also use the following to allow more time to compute the checksums&lt;br /&gt;
  --timeout=15m&lt;br /&gt;
&lt;br /&gt;
See rclone manual for more extensive documentation https://rclone.org/docs/&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for obtaining OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent === &lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session.&lt;br /&gt;
&lt;br /&gt;
    $ eval `oidc-agent`&lt;br /&gt;
&lt;br /&gt;
=== Configuration (only once) ===&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-dcache&amp;lt;/code&amp;gt; account to retrieve tokens from PIC. Open the URL that will show and input the code provided (or just open the QR code displayed).&lt;br /&gt;
After authenticating on the web browser, return to the terminal and input an encryption password twice. You'll need it when refreshing/reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    $ oidc-gen -m --client-id oidc-agent --pub --flow=device \&lt;br /&gt;
      --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
      --scope=&amp;quot;openid profile offline_access&amp;quot; --redirect-uri=edu.kit.data.oidc-agent:/ pic-dcache&lt;br /&gt;
    &lt;br /&gt;
    No account exists with this short name. Creating new configuration ...&lt;br /&gt;
    Generating account configuration ...&lt;br /&gt;
    accepted&lt;br /&gt;
    &lt;br /&gt;
    Using a browser on any device, visit:&lt;br /&gt;
    https://idp.pic.es/realms/PIC/device&lt;br /&gt;
    &lt;br /&gt;
    And enter the code: ASDF-GHJK&lt;br /&gt;
    Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
        &lt;br /&gt;
    [ QR CODE ]&lt;br /&gt;
    &lt;br /&gt;
    Enter encryption password for account configuration 'pic-dcache': &lt;br /&gt;
    Confirm encryption password: &lt;br /&gt;
    Everything setup correctly!&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticating (if refresh token has expired) ===&lt;br /&gt;
&lt;br /&gt;
If the oidc-agent process gets restarted, or iIf your refresh token expires due to inactivity, you will need to reauthenticate to retrieve further tokens&lt;br /&gt;
&lt;br /&gt;
    $ oidc-gen --reauthenticate pic-dcache&lt;br /&gt;
    Enter decryption password for account config 'testtest': &lt;br /&gt;
    Generating account configuration ...&lt;br /&gt;
    accepted&lt;br /&gt;
    &lt;br /&gt;
    Using a browser on any device, visit:&lt;br /&gt;
    https://idp.pic.es/realms/PIC/device&lt;br /&gt;
    &lt;br /&gt;
    And enter the code: ASDF-GHJK&lt;br /&gt;
    Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
    &lt;br /&gt;
    [ QR CODE ]&lt;br /&gt;
    &lt;br /&gt;
    Enter encryption password for account configuration 'pic-dcache' [***]: &lt;br /&gt;
    Everything setup correctly!&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring, you can get a token by running the following command:&lt;br /&gt;
&lt;br /&gt;
    $ oidc-token pic-dcache&lt;br /&gt;
      eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&lt;br /&gt;
== Obtaining a macaroon (for contacts) ==&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid up to 7 days.&lt;br /&gt;
&lt;br /&gt;
For downloading data (read-only permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For uploading data (full permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1354</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1354"/>
		<updated>2026-05-07T12:32:05Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage (dCache) =&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
 * Install and configure Rclone&lt;br /&gt;
 * PIC credentials or macaroon&lt;br /&gt;
&lt;br /&gt;
== Install Rclone ==&lt;br /&gt;
&lt;br /&gt;
You can directly download the binary without installing anything. For instance, for a linux 64 bits machine:&lt;br /&gt;
&lt;br /&gt;
    $ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
    [...]&lt;br /&gt;
    $ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or if you prefer, you can install Rclone like the next example on a Ubuntu machine:&lt;br /&gt;
&lt;br /&gt;
    $ cd /tmp&lt;br /&gt;
    $ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
    $ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&lt;br /&gt;
== Configure Rclone ==&lt;br /&gt;
&lt;br /&gt;
You should have been given some credentials and the url of a WebDAV endpoint at PIC.&lt;br /&gt;
With them, you just need to create the config in rclone:&lt;br /&gt;
&lt;br /&gt;
    $ rclone config&lt;br /&gt;
    No remotes found, make a new one?&lt;br /&gt;
    n) New remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    n/s/q&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Enter name for new remote.&lt;br /&gt;
    name&amp;gt; pic&lt;br /&gt;
    &lt;br /&gt;
    Option Storage.&lt;br /&gt;
    Type of storage to configure.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
     1 / 1Fichier&lt;br /&gt;
       \ (fichier)&lt;br /&gt;
    [...]&lt;br /&gt;
    Storage&amp;gt; webdav&lt;br /&gt;
    &lt;br /&gt;
    Option url.&lt;br /&gt;
    URL of http host to connect to.&lt;br /&gt;
    E.g. https://example.com.&lt;br /&gt;
    Enter a value.&lt;br /&gt;
    url&amp;gt;  https://door04.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    &lt;br /&gt;
    Option vendor.&lt;br /&gt;
    Name of the WebDAV site/service/software you are using.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
    Press Enter to leave empty.&lt;br /&gt;
     1 / Nextcloud&lt;br /&gt;
       \ (nextcloud)&lt;br /&gt;
    [...]&lt;br /&gt;
     5 / Other site/service or software&lt;br /&gt;
       \ (other)&lt;br /&gt;
    vendor&amp;gt; other&lt;br /&gt;
    &lt;br /&gt;
===  Using your PIC credentials ===&lt;br /&gt;
&lt;br /&gt;
If you have a PIC user, enter it and the corresponding password in this step. Otherwise, leave these fields blank.&lt;br /&gt;
&lt;br /&gt;
    Option user.&lt;br /&gt;
    User name.&lt;br /&gt;
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    user&amp;gt; YOUR_PIC_USERNAME&lt;br /&gt;
&lt;br /&gt;
    Option pass.&lt;br /&gt;
    Password.&lt;br /&gt;
    Choose an alternative below. Press Enter for the default (n).&lt;br /&gt;
    y) Yes, type in my own password&lt;br /&gt;
    g) Generate random password&lt;br /&gt;
    n) No, leave this optional password blank (default)&lt;br /&gt;
    y/g/n&amp;gt; y&lt;br /&gt;
    Enter the password:&lt;br /&gt;
    password: YOUR_PIC_PASSWORD&lt;br /&gt;
    Confirm the password:&lt;br /&gt;
    Password: YOUR_PIC_PASSWORD&lt;br /&gt;
&lt;br /&gt;
=== Using a Macaroon token ===&lt;br /&gt;
&lt;br /&gt;
If you have been given a Macaroon token, provide it as a bearer token after leaving the user and password blank&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&lt;br /&gt;
=== Using an OIDC token ===&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; &lt;br /&gt;
    &lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Option bearer_token_command.&lt;br /&gt;
    Command to run to get a bearer token.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token_command&amp;gt; oidc-token OIDC_AGENT_ACCOUNT_SHORTNAME&lt;br /&gt;
&lt;br /&gt;
=== Review settings ===&lt;br /&gt;
&lt;br /&gt;
At the end, just review the information you entered and confirm.&lt;br /&gt;
&lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Configuration complete.&lt;br /&gt;
    Options:&lt;br /&gt;
    - type: webdav&lt;br /&gt;
    - url: https://door04.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    - vendor: other&lt;br /&gt;
    - user: YOUR_PIC_USERNAME&lt;br /&gt;
    - pass: *** ENCRYPTED ***&lt;br /&gt;
    Keep this &amp;quot;pic&amp;quot; remote?&lt;br /&gt;
    y) Yes this is OK (default)&lt;br /&gt;
    e) Edit this remote&lt;br /&gt;
    d) Delete this remote&lt;br /&gt;
    y/e/d&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Current remotes:&lt;br /&gt;
    &lt;br /&gt;
    Name                 Type&lt;br /&gt;
    ====                 ====&lt;br /&gt;
    pic                  webdav&lt;br /&gt;
    &lt;br /&gt;
    e) Edit existing remote&lt;br /&gt;
    n) New remote&lt;br /&gt;
    d) Delete remote&lt;br /&gt;
    r) Rename remote&lt;br /&gt;
    c) Copy remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&lt;br /&gt;
Once done, you can use command line to browse and download/upload data.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Download a remote directory from PIC&lt;br /&gt;
  rclone copy &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt; &amp;lt;local_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upload a local directory to PIC&lt;br /&gt;
  rclone ${UPLOAD_FLAGS} copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When uploading data, we recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only&lt;br /&gt;
&lt;br /&gt;
If uploading lots onto directories with lots of files (&amp;gt;1000), please use:&lt;br /&gt;
  --no-traverse&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use&lt;br /&gt;
   --multi-thread-streams 1&lt;br /&gt;
&lt;br /&gt;
If uploading very large files (&amp;gt;10G), also use the following to allow more time to compute the checksums&lt;br /&gt;
  --timeout=15m&lt;br /&gt;
&lt;br /&gt;
See rclone manual for more extensive documentation https://rclone.org/docs/&lt;br /&gt;
&lt;br /&gt;
== Configuring oidc-agent for obtaining OIDC tokens ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; is available.&lt;br /&gt;
&lt;br /&gt;
=== Load oidc-agent === &lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt; in the terminal session.&lt;br /&gt;
&lt;br /&gt;
    $ eval `oidc-agent`&lt;br /&gt;
&lt;br /&gt;
=== Configuration (only once) ===&lt;br /&gt;
&lt;br /&gt;
Configure a &amp;lt;code&amp;gt;pic-dcache&amp;lt;/code&amp;gt; account to retrieve tokens from PIC. Open the URL that will show and input the code provided (or just open the QR code displayed).&lt;br /&gt;
After authenticating on the web browser, return to the terminal and input an encryption password twice. You'll need it when refreshing/reloading the &amp;lt;code&amp;gt;oidc-agent&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    $ oidc-gen -m --client-id oidc-agent --pub --flow=device \&lt;br /&gt;
      --discovery-endpoint=https://idp.pic.es/realms/PIC/.well-known/openid-configuration \&lt;br /&gt;
      --scope=&amp;quot;openid profile offline_access&amp;quot; --redirect-uri=edu.kit.data.oidc-agent:/ pic-dcache&lt;br /&gt;
    &lt;br /&gt;
    No account exists with this short name. Creating new configuration ...&lt;br /&gt;
    Generating account configuration ...&lt;br /&gt;
    accepted&lt;br /&gt;
    &lt;br /&gt;
    Using a browser on any device, visit:&lt;br /&gt;
    https://idp.pic.es/realms/PIC/device&lt;br /&gt;
    &lt;br /&gt;
    And enter the code: ASDF-GHJK&lt;br /&gt;
    Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
        &lt;br /&gt;
    [ QR CODE ]&lt;br /&gt;
    &lt;br /&gt;
    Enter encryption password for account configuration 'pic-dcache': &lt;br /&gt;
    Confirm encryption password: &lt;br /&gt;
    Everything setup correctly!&lt;br /&gt;
&lt;br /&gt;
=== Reauthenticating (if refresh token has expired) ===&lt;br /&gt;
&lt;br /&gt;
If the oidc-agent process gets restarted, or iIf your refresh token expires due to inactivity, you will need to reauthenticate to retrieve further tokens&lt;br /&gt;
&lt;br /&gt;
    $ oidc-gen --reauthenticate pic-dcache&lt;br /&gt;
    Enter decryption password for account config 'testtest': &lt;br /&gt;
    Generating account configuration ...&lt;br /&gt;
    accepted&lt;br /&gt;
    &lt;br /&gt;
    Using a browser on any device, visit:&lt;br /&gt;
    https://idp.pic.es/realms/PIC/device&lt;br /&gt;
    &lt;br /&gt;
    And enter the code: ASDF-GHJK&lt;br /&gt;
    Alternatively you can use the following QR code to visit the above listed URL.&lt;br /&gt;
    &lt;br /&gt;
    [ QR CODE ]&lt;br /&gt;
    &lt;br /&gt;
    Enter encryption password for account configuration 'pic-dcache' [***]: &lt;br /&gt;
    Everything setup correctly!&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
&lt;br /&gt;
After loading and configuring, you can get a token by running the following command:&lt;br /&gt;
&lt;br /&gt;
    $ oidc-token pic-dcache&lt;br /&gt;
      eyJhbGciOiJSUzI1[...]4YjAwg&lt;br /&gt;
&lt;br /&gt;
== Obtaining a macaroon (for contacts) ==&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid up to 7 days.&lt;br /&gt;
&lt;br /&gt;
For downloading data (read-only permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For uploading data (full permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Faq&amp;diff=1352</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Faq&amp;diff=1352"/>
		<updated>2026-04-15T15:05:17Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How do I reset my password? ==&lt;br /&gt;
You can reset your password using the following link:&lt;br /&gt;
https://www.pic.es/user/auth/forgotpw&lt;br /&gt;
&lt;br /&gt;
== Can an undergraduate student in my group have an account? ==&lt;br /&gt;
Yes. Undergraduate students can have PIC accounts without any problem.&lt;br /&gt;
&lt;br /&gt;
== How do I get a Kerberos token? ==&lt;br /&gt;
A valid token is needed to interface with some PIC services, like the Hadoop platform (HDFS, Hive, Spark, ...) or CTA.&lt;br /&gt;
Tokens are issued for the machine in which they are requested, if you hop to another machine, you may need to get another token.&lt;br /&gt;
&lt;br /&gt;
In order to get a token, run the following commands on a terminal.&lt;br /&gt;
If you are on JupyterLab, use ''Launcher'' → ''Terminal''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also define an alias for your own convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias kinit=&amp;quot;kinit -n -c ~/.fast.ccache @PIC.ES; kinit -T ~/.fast.ccache&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, you can check the presence and expiration date of your token using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I lost access to my OTP, how can I reset it? ==&lt;br /&gt;
Follow these steps to recover your account and configure a new OTP token.&lt;br /&gt;
&lt;br /&gt;
# On the login page, click '''Forgot password / OTP''' or go [https://www.pic.es/reset here].&lt;br /&gt;
# Enter your username. You should receive a recovery email in your inbox.&lt;br /&gt;
# Open the email and follow the recovery link.&lt;br /&gt;
# Scan the new QR code with your authenticator app.&lt;br /&gt;
# Enter the generated OTP code and a device name.&lt;br /&gt;
#* The device name is mandatory.&lt;br /&gt;
# Change your password when prompted.&lt;br /&gt;
#* This is required for security reasons.&lt;br /&gt;
# Log in again as usual.&lt;br /&gt;
#* On the OTP selection page, you will see two devices.&lt;br /&gt;
#* Select the device with the name you just entered.&lt;br /&gt;
#* The old one will usually appear as '''unnamed''' (if no name was set previously).&lt;br /&gt;
&lt;br /&gt;
Afterwards, we recommend removing the old OTP factor from the [https://idp.pic.es/realms/PIC/account/account-security/signing-in user profile section].&lt;br /&gt;
&lt;br /&gt;
== What is the simplest way to avoid repeated SSH authentication? ==&lt;br /&gt;
The easiest way is to configure your SSH connection using '''ControlMaster''', which allows multiple sessions to reuse a single authenticated connection.&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; and add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;Host *&amp;lt;/code&amp;gt;, you can restrict this to a specific host, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initiate the first SSH connection and authenticate via the provided URL. You will see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Complete the authentication in your browser, then press ENTER.&lt;br /&gt;
Once authenticated, the SSH connection remains open in the background, and you can safely close your terminal session.&lt;br /&gt;
The connection will persist indefinitely (until machine reboot or a network interruption).&lt;br /&gt;
&lt;br /&gt;
Subsequent SSH connections to the same host will reuse the existing session and will not require authentication again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Faq&amp;diff=1351</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Faq&amp;diff=1351"/>
		<updated>2026-04-15T14:09:44Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How do I reset my password? ==&lt;br /&gt;
You can reset your password using the following link:&lt;br /&gt;
https://www.pic.es/user/auth/forgotpw&lt;br /&gt;
&lt;br /&gt;
== Can an undergraduate student in my group have an account? ==&lt;br /&gt;
Yes. Undergraduate students can have PIC accounts without any problem.&lt;br /&gt;
&lt;br /&gt;
== How do I get a Kerberos token? ==&lt;br /&gt;
A valid token is needed to interface with some PIC services, like the Hadoop platform (HDFS, Hive, Spark, ...) or CTA.&lt;br /&gt;
Tokens are issued for the machine in which they are requested, if you hop to another machine, you may need to get another token.&lt;br /&gt;
&lt;br /&gt;
In order to get a token, run the following commands on a terminal.&lt;br /&gt;
If you are on JupyterLab, use ''Launcher'' → ''Terminal''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also define an alias for your own convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias kinit=&amp;quot;kinit -n -c ~/.fast.ccache @PIC.ES; kinit -T ~/.fast.ccache&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, you can check the presence and expiration date of your token using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I lost access to my OTP, how can I reset it? ==&lt;br /&gt;
Follow these steps to recover your account and configure a new OTP token.&lt;br /&gt;
&lt;br /&gt;
# On the login page, click '''Forgot password / OTP''' or go [https://www.pic.es/reset here].&lt;br /&gt;
# Enter your username. You should receive a recovery email in your inbox.&lt;br /&gt;
# Open the email and follow the recovery link.&lt;br /&gt;
# Scan the new QR code with your authenticator app.&lt;br /&gt;
# Enter the generated OTP code and a device name.&lt;br /&gt;
#* The device name is mandatory.&lt;br /&gt;
# Change your password when prompted.&lt;br /&gt;
#* This is required for security reasons.&lt;br /&gt;
# Log in again as usual.&lt;br /&gt;
#* On the OTP selection page, you will see two devices.&lt;br /&gt;
#* Select the device with the name you just entered.&lt;br /&gt;
#* The old one will usually appear as '''unnamed''' (if no name was set previously).&lt;br /&gt;
&lt;br /&gt;
Afterwards, we recommend removing the old OTP factor from the [https://idp.pic.es/realms/PIC/account/account-security/signing-in user profile section].&lt;br /&gt;
&lt;br /&gt;
=== What is the simplest way to avoid repeated SSH authentication? ===&lt;br /&gt;
The easiest way is to configure your SSH connection using '''ControlMaster''', which allows multiple sessions to reuse a single authenticated connection.&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; and add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;Host *&amp;lt;/code&amp;gt;, you can restrict this to a specific host, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initiate the first SSH connection and authenticate via the provided URL. You will see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Complete the authentication in your browser, then press ENTER.&lt;br /&gt;
Once authenticated, the SSH connection remains open in the background, and you can safely close your terminal session.&lt;br /&gt;
The connection will persist indefinitely (until machine reboot or a network interruption).&lt;br /&gt;
&lt;br /&gt;
Subsequent SSH connections to the same host will reuse the existing session and will not require authentication again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Faq&amp;diff=1350</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Faq&amp;diff=1350"/>
		<updated>2026-04-15T13:57:45Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* What is the simplest way to avoid repeated SSH authentication? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How do I reset my password? ==&lt;br /&gt;
You can reset your password using the following link:&lt;br /&gt;
https://www.pic.es/user/auth/forgotpw&lt;br /&gt;
&lt;br /&gt;
== Can an undergraduate student in my group have an account? ==&lt;br /&gt;
Yes. Undergraduate students can have PIC accounts without any problem.&lt;br /&gt;
&lt;br /&gt;
== How do I get a Kerberos token? ==&lt;br /&gt;
A valid token is needed to interface with some PIC services, like the Hadoop platform (HDFS, Hive, Spark, ...) or CTA.&lt;br /&gt;
Tokens are issued for the machine in which they are requested, if you hop to another machine, you may need to get another token.&lt;br /&gt;
&lt;br /&gt;
In order to get a token, run the following commands on a terminal.&lt;br /&gt;
If you are on JupyterLab, use ''Launcher'' → ''Terminal''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also define an alias for your own convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias kinit=&amp;quot;kinit -n -c ~/.fast.ccache @PIC.ES; kinit -T ~/.fast.ccache&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, you can check the presence and expiration date of your token using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I lost access to my OTP, how can I reset it? ==&lt;br /&gt;
Follow these steps to recover your account and configure a new OTP token.&lt;br /&gt;
&lt;br /&gt;
# On the Keycloak login page, click '''Forgot password / OTP'''.&lt;br /&gt;
# Enter your username. You should receive a recovery email in your inbox.&lt;br /&gt;
# Open the email and follow the recovery link.&lt;br /&gt;
# Scan the new QR code with your authenticator app.&lt;br /&gt;
# Enter the generated OTP code and a device name.&lt;br /&gt;
#* The device name is mandatory.&lt;br /&gt;
# Change your password when prompted.&lt;br /&gt;
#* This is required for security reasons.&lt;br /&gt;
# Log in again as usual.&lt;br /&gt;
#* On the OTP selection page, you will see two devices.&lt;br /&gt;
#* Select the device with the name you just entered.&lt;br /&gt;
#* The old one will usually appear as '''unnamed''' (if no name was set previously).&lt;br /&gt;
&lt;br /&gt;
Afterwards, we recommend removing the old OTP factor from the [https://idp.pic.es/realms/PIC/account/account-security/signing-in user profile section].&lt;br /&gt;
&lt;br /&gt;
=== What is the simplest way to avoid repeated SSH authentication? ===&lt;br /&gt;
The easiest way is to configure your SSH connection using '''ControlMaster''', which allows multiple sessions to reuse a single authenticated connection.&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; and add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;Host *&amp;lt;/code&amp;gt;, you can restrict this to a specific host, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initiate the first SSH connection and authenticate via the provided URL. You will see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Complete the authentication in your browser, then press ENTER.&lt;br /&gt;
Once authenticated, the SSH connection remains open in the background, and you can safely close your terminal session.&lt;br /&gt;
The connection will persist indefinitely (until machine reboot or a network interruption).&lt;br /&gt;
&lt;br /&gt;
Subsequent SSH connections to the same host will reuse the existing session and will not require authentication again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Faq&amp;diff=1349</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Faq&amp;diff=1349"/>
		<updated>2026-04-15T13:57:33Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* What is the simplest way to avoid repeated SSH authentication? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How do I reset my password? ==&lt;br /&gt;
You can reset your password using the following link:&lt;br /&gt;
https://www.pic.es/user/auth/forgotpw&lt;br /&gt;
&lt;br /&gt;
== Can an undergraduate student in my group have an account? ==&lt;br /&gt;
Yes. Undergraduate students can have PIC accounts without any problem.&lt;br /&gt;
&lt;br /&gt;
== How do I get a Kerberos token? ==&lt;br /&gt;
A valid token is needed to interface with some PIC services, like the Hadoop platform (HDFS, Hive, Spark, ...) or CTA.&lt;br /&gt;
Tokens are issued for the machine in which they are requested, if you hop to another machine, you may need to get another token.&lt;br /&gt;
&lt;br /&gt;
In order to get a token, run the following commands on a terminal.&lt;br /&gt;
If you are on JupyterLab, use ''Launcher'' → ''Terminal''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also define an alias for your own convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias kinit=&amp;quot;kinit -n -c ~/.fast.ccache @PIC.ES; kinit -T ~/.fast.ccache&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, you can check the presence and expiration date of your token using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I lost access to my OTP, how can I reset it? ==&lt;br /&gt;
Follow these steps to recover your account and configure a new OTP token.&lt;br /&gt;
&lt;br /&gt;
# On the Keycloak login page, click '''Forgot password / OTP'''.&lt;br /&gt;
# Enter your username. You should receive a recovery email in your inbox.&lt;br /&gt;
# Open the email and follow the recovery link.&lt;br /&gt;
# Scan the new QR code with your authenticator app.&lt;br /&gt;
# Enter the generated OTP code and a device name.&lt;br /&gt;
#* The device name is mandatory.&lt;br /&gt;
# Change your password when prompted.&lt;br /&gt;
#* This is required for security reasons.&lt;br /&gt;
# Log in again as usual.&lt;br /&gt;
#* On the OTP selection page, you will see two devices.&lt;br /&gt;
#* Select the device with the name you just entered.&lt;br /&gt;
#* The old one will usually appear as '''unnamed''' (if no name was set previously).&lt;br /&gt;
&lt;br /&gt;
Afterwards, we recommend removing the old OTP factor from the [https://idp.pic.es/realms/PIC/account/account-security/signing-in user profile section].&lt;br /&gt;
&lt;br /&gt;
=== What is the simplest way to avoid repeated SSH authentication? ===&lt;br /&gt;
The easiest way is to configure your SSH connection using '''ControlMaster''', which allows multiple sessions to reuse a single authenticated connection.&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; and add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;Host *&amp;lt;/code&amp;gt;, you can restrict this to a specific host, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Initiate the first SSH connection and authenticate via the provided URL. You will see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Complete the authentication in your browser, then press ENTER.&lt;br /&gt;
Once authenticated, the SSH connection remains open in the background, and you can safely close your terminal session.&lt;br /&gt;
The connection will persist indefinitely (until machine reboot or a network interruption).&lt;br /&gt;
&lt;br /&gt;
Subsequent SSH connections to the same host will reuse the existing session and will not require authentication again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Faq&amp;diff=1348</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Faq&amp;diff=1348"/>
		<updated>2026-04-15T13:57:07Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* What is the simplest way to avoid repeated SSH authentication? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How do I reset my password? ==&lt;br /&gt;
You can reset your password using the following link:&lt;br /&gt;
https://www.pic.es/user/auth/forgotpw&lt;br /&gt;
&lt;br /&gt;
== Can an undergraduate student in my group have an account? ==&lt;br /&gt;
Yes. Undergraduate students can have PIC accounts without any problem.&lt;br /&gt;
&lt;br /&gt;
== How do I get a Kerberos token? ==&lt;br /&gt;
A valid token is needed to interface with some PIC services, like the Hadoop platform (HDFS, Hive, Spark, ...) or CTA.&lt;br /&gt;
Tokens are issued for the machine in which they are requested, if you hop to another machine, you may need to get another token.&lt;br /&gt;
&lt;br /&gt;
In order to get a token, run the following commands on a terminal.&lt;br /&gt;
If you are on JupyterLab, use ''Launcher'' → ''Terminal''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also define an alias for your own convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias kinit=&amp;quot;kinit -n -c ~/.fast.ccache @PIC.ES; kinit -T ~/.fast.ccache&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, you can check the presence and expiration date of your token using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I lost access to my OTP, how can I reset it? ==&lt;br /&gt;
Follow these steps to recover your account and configure a new OTP token.&lt;br /&gt;
&lt;br /&gt;
# On the Keycloak login page, click '''Forgot password / OTP'''.&lt;br /&gt;
# Enter your username. You should receive a recovery email in your inbox.&lt;br /&gt;
# Open the email and follow the recovery link.&lt;br /&gt;
# Scan the new QR code with your authenticator app.&lt;br /&gt;
# Enter the generated OTP code and a device name.&lt;br /&gt;
#* The device name is mandatory.&lt;br /&gt;
# Change your password when prompted.&lt;br /&gt;
#* This is required for security reasons.&lt;br /&gt;
# Log in again as usual.&lt;br /&gt;
#* On the OTP selection page, you will see two devices.&lt;br /&gt;
#* Select the device with the name you just entered.&lt;br /&gt;
#* The old one will usually appear as '''unnamed''' (if no name was set previously).&lt;br /&gt;
&lt;br /&gt;
Afterwards, we recommend removing the old OTP factor from the [https://idp.pic.es/realms/PIC/account/account-security/signing-in user profile section].&lt;br /&gt;
&lt;br /&gt;
=== What is the simplest way to avoid repeated SSH authentication? ===&lt;br /&gt;
The easiest way is to configure your SSH connection using '''ControlMaster''', which allows multiple sessions to reuse a single authenticated connection.&lt;br /&gt;
&lt;br /&gt;
On your client machine, edit the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; and add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;Host *&amp;lt;/code&amp;gt;, you can restrict this to a specific host, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Initiate the first SSH connection and authenticate via the provided URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Complete the authentication in your browser, then press ENTER.&lt;br /&gt;
Once authenticated, the SSH connection remains open in the background, and you can safely close your terminal session.&lt;br /&gt;
The connection will persist indefinitely (until machine reboot or a network interruption).&lt;br /&gt;
&lt;br /&gt;
Subsequent SSH connections to the same host will reuse the existing session and will not require authentication again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
Last login: Tue Apr 14 13:25:33 2026 from 10.212.134.205&lt;br /&gt;
[tallada@ui04 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Faq&amp;diff=1347</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Faq&amp;diff=1347"/>
		<updated>2026-04-15T13:55:37Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How do I reset my password? ==&lt;br /&gt;
You can reset your password using the following link:&lt;br /&gt;
https://www.pic.es/user/auth/forgotpw&lt;br /&gt;
&lt;br /&gt;
== Can an undergraduate student in my group have an account? ==&lt;br /&gt;
Yes. Undergraduate students can have PIC accounts without any problem.&lt;br /&gt;
&lt;br /&gt;
== How do I get a Kerberos token? ==&lt;br /&gt;
A valid token is needed to interface with some PIC services, like the Hadoop platform (HDFS, Hive, Spark, ...) or CTA.&lt;br /&gt;
Tokens are issued for the machine in which they are requested, if you hop to another machine, you may need to get another token.&lt;br /&gt;
&lt;br /&gt;
In order to get a token, run the following commands on a terminal.&lt;br /&gt;
If you are on JupyterLab, use ''Launcher'' → ''Terminal''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also define an alias for your own convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias kinit=&amp;quot;kinit -n -c ~/.fast.ccache @PIC.ES; kinit -T ~/.fast.ccache&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, you can check the presence and expiration date of your token using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I lost access to my OTP, how can I reset it? ==&lt;br /&gt;
Follow these steps to recover your account and configure a new OTP token.&lt;br /&gt;
&lt;br /&gt;
# On the Keycloak login page, click '''Forgot password / OTP'''.&lt;br /&gt;
# Enter your username. You should receive a recovery email in your inbox.&lt;br /&gt;
# Open the email and follow the recovery link.&lt;br /&gt;
# Scan the new QR code with your authenticator app.&lt;br /&gt;
# Enter the generated OTP code and a device name.&lt;br /&gt;
#* The device name is mandatory.&lt;br /&gt;
# Change your password when prompted.&lt;br /&gt;
#* This is required for security reasons.&lt;br /&gt;
# Log in again as usual.&lt;br /&gt;
#* On the OTP selection page, you will see two devices.&lt;br /&gt;
#* Select the device with the name you just entered.&lt;br /&gt;
#* The old one will usually appear as '''unnamed''' (if no name was set previously).&lt;br /&gt;
&lt;br /&gt;
Afterwards, we recommend removing the old OTP factor from the [https://idp.pic.es/realms/PIC/account/account-security/signing-in user profile section].&lt;br /&gt;
&lt;br /&gt;
=== What is the simplest way to avoid repeated SSH authentication? ===&lt;br /&gt;
The easiest way is to configure your SSH connection using '''ControlMaster''', which allows multiple sessions to reuse a single authenticated connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On your client machine, edit the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; and add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    ControlMaster auto&lt;br /&gt;
    ControlPath ~/.ssh/cm-%r@%h:%p&lt;br /&gt;
    ControlPersist yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;Host *&amp;lt;/code&amp;gt;, you can restrict this to a specific host, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Initiate the first SSH connection and authenticate via the provided URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(tallada@ui04.pic.es) Authenticate at https://idp.pic.es/realms/PIC/device?user_code=FPTB-HKEV and press ENTER.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Complete the authentication in your browser, then press ENTER.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Once authenticated, the SSH connection remains open in the background, and you can safely close your terminal session.&lt;br /&gt;
&lt;br /&gt;
The connection will persist indefinitely (until machine reboot or a network interruption).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Subsequent SSH connections to the same host will reuse the existing session and will not require authentication again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh ui04.pic.es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=1346</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=1346"/>
		<updated>2026-04-15T13:42:19Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting started ==&lt;br /&gt;
* [[PIC description|Introduction to PIC]]&lt;br /&gt;
* [[PIC account|Get a PIC account]]&lt;br /&gt;
* [[PIC_User_Manual | User manual]]&lt;br /&gt;
* [[faq| Frequently asked questions]]&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
=== User interfaces ===&lt;br /&gt;
* [[Login machines]]&lt;br /&gt;
* [[JupyterHub]]&lt;br /&gt;
&lt;br /&gt;
=== Distributed computing ===&lt;br /&gt;
* [[HTCondor]]&lt;br /&gt;
* [[Dask]]&lt;br /&gt;
* Spark:&lt;br /&gt;
** [[Spark on Jupyter|on Jupyter]]&lt;br /&gt;
** [[Spark_on_farm|on HTCondor]]&lt;br /&gt;
&lt;br /&gt;
=== Storage ===&lt;br /&gt;
* [[Storage]]&lt;br /&gt;
* [[Hadoop Distributed File System (HDFS)]]&lt;br /&gt;
* [[HDFS Access via VOSpace]]&lt;br /&gt;
* [[Transferring data to/from PIC]]&lt;br /&gt;
&lt;br /&gt;
=== Other services ===&lt;br /&gt;
* [[Gitlab]]&lt;br /&gt;
* [[CosmoHub]]&lt;br /&gt;
&lt;br /&gt;
== Experiments ==&lt;br /&gt;
* [[Euclid]]&lt;br /&gt;
* [[AGN ICE]]&lt;br /&gt;
* [[ICFO]]&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Faq&amp;diff=1345</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Faq&amp;diff=1345"/>
		<updated>2026-04-15T13:32:08Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How do I reset my password? ==&lt;br /&gt;
You can reset your password using the following link:&lt;br /&gt;
https://www.pic.es/user/auth/forgotpw&lt;br /&gt;
&lt;br /&gt;
== Can an undergraduate student in my group have an account? ==&lt;br /&gt;
Yes. Undergraduate students can have PIC accounts without any problem.&lt;br /&gt;
&lt;br /&gt;
== How do I get a Kerberos token? ==&lt;br /&gt;
A valid token is needed to interface with some PIC services, like the Hadoop platform (HDFS, Hive, Spark, ...) or CTA.&lt;br /&gt;
Tokens are issued for the machine in which they are requested, if you hop to another machine, you may need to get another token.&lt;br /&gt;
&lt;br /&gt;
In order to get a token, run the following commands on a terminal.&lt;br /&gt;
If you are on JupyterLab, use ''Launcher'' → ''Terminal''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also define an alias for your own convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias kinit=&amp;quot;kinit -n -c ~/.fast.ccache @PIC.ES; kinit -T ~/.fast.ccache&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, you can check the presence and expiration date of your token using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I lost access to my OTP, how can I reset it? ==&lt;br /&gt;
Follow these steps to recover your account and configure a new OTP token.&lt;br /&gt;
&lt;br /&gt;
# On the Keycloak login page, click '''Forgot password / OTP'''.&lt;br /&gt;
# Enter your username. You should receive a recovery email in your inbox.&lt;br /&gt;
# Open the email and follow the recovery link.&lt;br /&gt;
# Scan the new QR code with your authenticator app.&lt;br /&gt;
# Enter the generated OTP code and a device name.&lt;br /&gt;
#* The device name is mandatory.&lt;br /&gt;
# Change your password when prompted.&lt;br /&gt;
#* This is required for security reasons.&lt;br /&gt;
# Log in again as usual.&lt;br /&gt;
#* On the OTP selection page, you will see two devices.&lt;br /&gt;
#* Select the device with the name you just entered.&lt;br /&gt;
#* The old one will usually appear as '''unnamed''' (if no name was set previously).&lt;br /&gt;
&lt;br /&gt;
Afterwards, we recommend removing the old OTP factor from the [https://idp.pic.es/realms/PIC/account/account-security/signing-in user profile section].&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Faq&amp;diff=1344</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Faq&amp;diff=1344"/>
		<updated>2026-04-15T13:24:23Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How do I reset my password? ==&lt;br /&gt;
You can reset your password using the following link:&lt;br /&gt;
https://www.pic.es/user/auth/forgotpw&lt;br /&gt;
&lt;br /&gt;
== Can an undergraduate student in my group have an account? ==&lt;br /&gt;
Yes. Undergraduate students can have PIC accounts without any problem.&lt;br /&gt;
&lt;br /&gt;
== How do I get a Kerberos token? ==&lt;br /&gt;
A valid token is needed to interface with some PIC services, like the Hadoop platform (HDFS, Hive, Spark, ...) or CTA.&lt;br /&gt;
Tokens are issued for the machine in which they are requested, if you hop to another machine, you may need to get another token.&lt;br /&gt;
&lt;br /&gt;
In order to get a token, run the following commands on a terminal.&lt;br /&gt;
If you are on JupyterLab, use ''Launcher'' → ''Terminal''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also define an alias for your own convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias kinit=&amp;quot;kinit -n -c ~/.fast.ccache @PIC.ES; kinit -T ~/.fast.ccache&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, you can check the presence and expiration date of your token using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=1343</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=1343"/>
		<updated>2026-04-15T13:18:36Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting started ==&lt;br /&gt;
* [[PIC description|Introduction to PIC]]&lt;br /&gt;
* [[PIC account|Get a PIC account]]&lt;br /&gt;
* [[Lost OTP|Reset your OTP]]&lt;br /&gt;
* [[PIC_User_Manual | User manual]]&lt;br /&gt;
* [[faq| Frequently asked questions]]&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
=== User interfaces ===&lt;br /&gt;
* [[Login machines]]&lt;br /&gt;
* [[JupyterHub]]&lt;br /&gt;
&lt;br /&gt;
=== Distributed computing ===&lt;br /&gt;
* [[HTCondor]]&lt;br /&gt;
* [[Dask]]&lt;br /&gt;
* Spark:&lt;br /&gt;
** [[Spark on Jupyter|on Jupyter]]&lt;br /&gt;
** [[Spark_on_farm|on HTCondor]]&lt;br /&gt;
&lt;br /&gt;
=== Storage ===&lt;br /&gt;
* [[Storage]]&lt;br /&gt;
* [[Hadoop Distributed File System (HDFS)]]&lt;br /&gt;
* [[HDFS Access via VOSpace]]&lt;br /&gt;
* [[Transferring data to/from PIC]]&lt;br /&gt;
&lt;br /&gt;
=== Other services ===&lt;br /&gt;
* [[Gitlab]]&lt;br /&gt;
* [[CosmoHub]]&lt;br /&gt;
&lt;br /&gt;
== Experiments ==&lt;br /&gt;
* [[Euclid]]&lt;br /&gt;
* [[AGN ICE]]&lt;br /&gt;
* [[ICFO]]&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Spark_on_Jupyter&amp;diff=1340</id>
		<title>Spark on Jupyter</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Spark_on_Jupyter&amp;diff=1340"/>
		<updated>2026-04-08T08:51:24Z</updated>

		<summary type="html">&lt;p&gt;Tallada: Created page with &amp;quot;= Accessing PIC Big Data Services from JupyterLab =  PIC's Jupyter service is integrated with the Big Data platform. This allows you to access services such as '''HDFS''', '''...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Accessing PIC Big Data Services from JupyterLab =&lt;br /&gt;
&lt;br /&gt;
PIC's Jupyter service is integrated with the Big Data platform. This allows you to access services such as '''HDFS''', '''Hive''', and '''Spark''' directly from your JupyterLab environment.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Kerberos Authentication ===&lt;br /&gt;
&lt;br /&gt;
You must have a '''valid Kerberos ticket''' before accessing any Big Data service.&lt;br /&gt;
&lt;br /&gt;
==== Step-by-step ====&lt;br /&gt;
&lt;br /&gt;
# Open a terminal session on the same node where your Jupyter session is running.&lt;br /&gt;
#* In JupyterLab, use the ''Launcher'' → ''Terminal''.&lt;br /&gt;
# Run the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kinit -n -c ~/.fast.ccache @PIC.ES&lt;br /&gt;
kinit -T ~/.fast.ccache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Verify your ticket ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
klist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see a valid ticket with a non-expired timestamp.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&lt;br /&gt;
* If the ticket expires, you must repeat the process.&lt;br /&gt;
* Without a valid Kerberos ticket, access to HDFS, Hive, or Spark will fail.&lt;br /&gt;
&lt;br /&gt;
==== Quick test (HDFS access) ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hdfs dfs -ls /&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this works, your authentication is correctly configured.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== 2. Python Environment ===&lt;br /&gt;
&lt;br /&gt;
You need specific Python packages depending on the service:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Service !! Required packages&lt;br /&gt;
|-&lt;br /&gt;
| Spark || findspark, pyspark&lt;br /&gt;
|-&lt;br /&gt;
| Hive || pyhive[hive_pure_sasl, kerberos]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Installation example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pip install findspark pyspark&lt;br /&gt;
pip install &amp;quot;pyhive[hive_pure_sasl, kerberos]&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
== Using Spark from Jupyter ==&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
# Environment configuration&lt;br /&gt;
os.environ[&amp;quot;HADOOP_HOME&amp;quot;] = &amp;quot;/usr/local/hadoop&amp;quot;&lt;br /&gt;
os.environ[&amp;quot;HADOOP_CONF_DIR&amp;quot;] = &amp;quot;/usr/local/hadoop/etc/hadoop&amp;quot;&lt;br /&gt;
os.environ[&amp;quot;HIVE_HOME&amp;quot;] = &amp;quot;/usr/local/hive&amp;quot;&lt;br /&gt;
os.environ[&amp;quot;HIVE_CONF_DIR&amp;quot;] = &amp;quot;/usr/local/hive/conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
import findspark&lt;br /&gt;
findspark.init()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a Spark session ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from pyspark.sql import SparkSession&lt;br /&gt;
&lt;br /&gt;
spark = (&lt;br /&gt;
    SparkSession.builder&lt;br /&gt;
    .appName(&amp;quot;example&amp;quot;)&lt;br /&gt;
    .enableHiveSupport()&lt;br /&gt;
    .getOrCreate()&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
sc = spark.sparkContext&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Read a Hive table ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
df = spark.sql(&amp;quot;SELECT * FROM some_database.some_table LIMIT 10&amp;quot;)&lt;br /&gt;
df.show()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
== Using Hive (PyHive) from Jupyter ==&lt;br /&gt;
&lt;br /&gt;
=== Connect to Hive ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from pyhive import hive&lt;br /&gt;
&lt;br /&gt;
conn = hive.connect(&lt;br /&gt;
    host=&amp;quot;hsrv01.pic.es&amp;quot;,&lt;br /&gt;
    port=10000,&lt;br /&gt;
    kerberos_service_name=&amp;quot;hive&amp;quot;,&lt;br /&gt;
    auth=&amp;quot;KERBEROS&amp;quot;,&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
cursor = conn.cursor()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Execute a query ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
query = &amp;quot;SELECT * FROM some_database.some_table LIMIT 10&amp;quot;&lt;br /&gt;
cursor.execute(query)&lt;br /&gt;
&lt;br /&gt;
rows = cursor.fetchall()&lt;br /&gt;
colnames = [c[0] for c in cursor.description]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Convert to Astropy Table (optional) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from astropy.table import Table&lt;br /&gt;
&lt;br /&gt;
table = Table(rows=rows, names=colnames)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Kerberos errors ===&lt;br /&gt;
* Run &amp;lt;code&amp;gt;klist&amp;lt;/code&amp;gt; and check expiration&lt;br /&gt;
* Re-run &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; if needed&lt;br /&gt;
&lt;br /&gt;
=== Hive connection fails ===&lt;br /&gt;
* Ensure Kerberos ticket is valid&lt;br /&gt;
* Verify correct host (&amp;lt;code&amp;gt;hsrv01.pic.es&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Check that required Python packages are installed&lt;br /&gt;
&lt;br /&gt;
=== Spark does not start ===&lt;br /&gt;
* Verify environment variables (&amp;lt;code&amp;gt;HADOOP_HOME&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIVE_HOME&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Ensure &amp;lt;code&amp;gt;findspark.init()&amp;lt;/code&amp;gt; is executed before creating the session&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
# Obtain a Kerberos ticket (&amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;)&lt;br /&gt;
# Install required Python packages&lt;br /&gt;
# Configure environment variables&lt;br /&gt;
# Use Spark or Hive from your notebook&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
For further assistance, contact PIC support (user.support@pic.es).&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=1339</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=1339"/>
		<updated>2026-04-08T08:17:49Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Distributed computing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting started ==&lt;br /&gt;
* [[PIC description|Introduction to PIC]]&lt;br /&gt;
* [[PIC account|Get a PIC account]]&lt;br /&gt;
* [[PIC_User_Manual | User manual]]&lt;br /&gt;
* [[faq| Frequently asked questions]]&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
=== User interfaces ===&lt;br /&gt;
* [[Login machines]]&lt;br /&gt;
* [[JupyterHub]]&lt;br /&gt;
&lt;br /&gt;
=== Distributed computing ===&lt;br /&gt;
* [[HTCondor]]&lt;br /&gt;
* [[Dask]]&lt;br /&gt;
* Spark:&lt;br /&gt;
** [[Spark on Jupyter|on Jupyter]]&lt;br /&gt;
** [[Spark_on_farm|on HTCondor]]&lt;br /&gt;
&lt;br /&gt;
=== Storage ===&lt;br /&gt;
* [[Storage]]&lt;br /&gt;
* [[Hadoop Distributed File System (HDFS)]]&lt;br /&gt;
* [[HDFS Access via VOSpace]]&lt;br /&gt;
* [[Transferring data to/from PIC]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other services ===&lt;br /&gt;
* [[Gitlab]]&lt;br /&gt;
* [[CosmoHub]]&lt;br /&gt;
&lt;br /&gt;
== Experiments ==&lt;br /&gt;
&lt;br /&gt;
* [[Euclid]]&lt;br /&gt;
* [[AGN ICE]]&lt;br /&gt;
* [[ICFO]]&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1227</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1227"/>
		<updated>2025-05-27T09:26:12Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage (dCache) =&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
 * Install and configure Rclone&lt;br /&gt;
 * PIC credentials or macaroon&lt;br /&gt;
&lt;br /&gt;
== Install Rclone ==&lt;br /&gt;
&lt;br /&gt;
You can directly download the binary without installing anything. For instance, for a linux 64 bits machine:&lt;br /&gt;
&lt;br /&gt;
    $ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
    [...]&lt;br /&gt;
    $ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or if you prefer, you can install Rclone like the next example on a Ubuntu machine:&lt;br /&gt;
&lt;br /&gt;
    $ cd /tmp&lt;br /&gt;
    $ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
    $ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&lt;br /&gt;
== Configure Rclone ==&lt;br /&gt;
&lt;br /&gt;
You should have been given some credentials and the url of a WebDAV endpoint at PIC.&lt;br /&gt;
With them, you just need to create the config in rclone:&lt;br /&gt;
&lt;br /&gt;
    $ rclone config&lt;br /&gt;
    No remotes found, make a new one?&lt;br /&gt;
    n) New remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    n/s/q&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Enter name for new remote.&lt;br /&gt;
    name&amp;gt; pic&lt;br /&gt;
    &lt;br /&gt;
    Option Storage.&lt;br /&gt;
    Type of storage to configure.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
     1 / 1Fichier&lt;br /&gt;
       \ (fichier)&lt;br /&gt;
    [...]&lt;br /&gt;
    Storage&amp;gt; webdav&lt;br /&gt;
    &lt;br /&gt;
    Option url.&lt;br /&gt;
    URL of http host to connect to.&lt;br /&gt;
    E.g. https://example.com.&lt;br /&gt;
    Enter a value.&lt;br /&gt;
    url&amp;gt;  https://door04.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    &lt;br /&gt;
    Option vendor.&lt;br /&gt;
    Name of the WebDAV site/service/software you are using.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
    Press Enter to leave empty.&lt;br /&gt;
     1 / Nextcloud&lt;br /&gt;
       \ (nextcloud)&lt;br /&gt;
    [...]&lt;br /&gt;
     5 / Other site/service or software&lt;br /&gt;
       \ (other)&lt;br /&gt;
    vendor&amp;gt; other&lt;br /&gt;
    &lt;br /&gt;
===  Using your PIC credentials ===&lt;br /&gt;
&lt;br /&gt;
If you have a PIC user, enter it and the corresponding password in this step. Otherwise, leave these fields blank.&lt;br /&gt;
&lt;br /&gt;
    Option user.&lt;br /&gt;
    User name.&lt;br /&gt;
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    user&amp;gt; YOUR_PIC_USERNAME&lt;br /&gt;
&lt;br /&gt;
    Option pass.&lt;br /&gt;
    Password.&lt;br /&gt;
    Choose an alternative below. Press Enter for the default (n).&lt;br /&gt;
    y) Yes, type in my own password&lt;br /&gt;
    g) Generate random password&lt;br /&gt;
    n) No, leave this optional password blank (default)&lt;br /&gt;
    y/g/n&amp;gt; y&lt;br /&gt;
    Enter the password:&lt;br /&gt;
    password: YOUR_PIC_PASSWORD&lt;br /&gt;
    Confirm the password:&lt;br /&gt;
    Password: YOUR_PIC_PASSWORD&lt;br /&gt;
&lt;br /&gt;
=== Using a Macaroon token ===&lt;br /&gt;
&lt;br /&gt;
If you have been given a Macaroon token, provide it as a bearer token after leaving the user and password blank&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&lt;br /&gt;
=== Review settings ===&lt;br /&gt;
&lt;br /&gt;
At the end, just review the information you entered and confirm.&lt;br /&gt;
&lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Configuration complete.&lt;br /&gt;
    Options:&lt;br /&gt;
    - type: webdav&lt;br /&gt;
    - url: https://door04.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    - vendor: other&lt;br /&gt;
    - user: YOUR_PIC_USERNAME&lt;br /&gt;
    - pass: *** ENCRYPTED ***&lt;br /&gt;
    Keep this &amp;quot;pic&amp;quot; remote?&lt;br /&gt;
    y) Yes this is OK (default)&lt;br /&gt;
    e) Edit this remote&lt;br /&gt;
    d) Delete this remote&lt;br /&gt;
    y/e/d&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Current remotes:&lt;br /&gt;
    &lt;br /&gt;
    Name                 Type&lt;br /&gt;
    ====                 ====&lt;br /&gt;
    pic                  webdav&lt;br /&gt;
    &lt;br /&gt;
    e) Edit existing remote&lt;br /&gt;
    n) New remote&lt;br /&gt;
    d) Delete remote&lt;br /&gt;
    r) Rename remote&lt;br /&gt;
    c) Copy remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&lt;br /&gt;
Once done, you can use command line to browse and download/upload data.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Download a remote directory from PIC&lt;br /&gt;
  rclone copy &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt; &amp;lt;local_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upload a local directory to PIC&lt;br /&gt;
  rclone ${UPLOAD_FLAGS} copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When uploading data, we recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only&lt;br /&gt;
&lt;br /&gt;
If uploading lots onto directories with lots of files (&amp;gt;1000), please use:&lt;br /&gt;
  --no-traverse&lt;br /&gt;
&lt;br /&gt;
If uploading files larger than 200 MB, also use&lt;br /&gt;
   --multi-thread-streams 1&lt;br /&gt;
&lt;br /&gt;
If uploading very large files (&amp;gt;10G), also use the following to allow more time to compute the checksums&lt;br /&gt;
  --timeout=15m&lt;br /&gt;
&lt;br /&gt;
See rclone manual for more extensive documentation https://rclone.org/docs/&lt;br /&gt;
&lt;br /&gt;
== Obtaining a macaroon (for contacts) ==&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid up to 7 days.&lt;br /&gt;
&lt;br /&gt;
For downloading data (read-only permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For uploading data (full permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1154</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1154"/>
		<updated>2024-06-05T13:17:40Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage (dCache) =&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
 * Install and configure Rclone&lt;br /&gt;
 * PIC credentials or macaroon&lt;br /&gt;
&lt;br /&gt;
== Install Rclone ==&lt;br /&gt;
&lt;br /&gt;
You can directly download the binary without installing anything. For instance, for a linux 64 bits machine:&lt;br /&gt;
&lt;br /&gt;
    $ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
    [...]&lt;br /&gt;
    $ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or if you prefer, you can install Rclone like the next example on a Ubuntu machine:&lt;br /&gt;
&lt;br /&gt;
    $ cd /tmp&lt;br /&gt;
    $ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
    $ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&lt;br /&gt;
== Configure Rclone ==&lt;br /&gt;
&lt;br /&gt;
You should have been given some credentials and the url of a WebDAV endpoint at PIC.&lt;br /&gt;
With them, you just need to create the config in rclone:&lt;br /&gt;
&lt;br /&gt;
    $ rclone config&lt;br /&gt;
    No remotes found, make a new one?&lt;br /&gt;
    n) New remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    n/s/q&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Enter name for new remote.&lt;br /&gt;
    name&amp;gt; pic&lt;br /&gt;
    &lt;br /&gt;
    Option Storage.&lt;br /&gt;
    Type of storage to configure.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
     1 / 1Fichier&lt;br /&gt;
       \ (fichier)&lt;br /&gt;
    [...]&lt;br /&gt;
    Storage&amp;gt; webdav&lt;br /&gt;
    &lt;br /&gt;
    Option url.&lt;br /&gt;
    URL of http host to connect to.&lt;br /&gt;
    E.g. https://example.com.&lt;br /&gt;
    Enter a value.&lt;br /&gt;
    url&amp;gt;  https://door04.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    &lt;br /&gt;
    Option vendor.&lt;br /&gt;
    Name of the WebDAV site/service/software you are using.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
    Press Enter to leave empty.&lt;br /&gt;
     1 / Nextcloud&lt;br /&gt;
       \ (nextcloud)&lt;br /&gt;
    [...]&lt;br /&gt;
     5 / Other site/service or software&lt;br /&gt;
       \ (other)&lt;br /&gt;
    vendor&amp;gt; other&lt;br /&gt;
    &lt;br /&gt;
===  Using your PIC credentials ===&lt;br /&gt;
&lt;br /&gt;
If you have a PIC user, enter it and the corresponding password in this step. Otherwise, leave these fields blank.&lt;br /&gt;
&lt;br /&gt;
    Option user.&lt;br /&gt;
    User name.&lt;br /&gt;
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    user&amp;gt; YOUR_PIC_USERNAME&lt;br /&gt;
&lt;br /&gt;
    Option pass.&lt;br /&gt;
    Password.&lt;br /&gt;
    Choose an alternative below. Press Enter for the default (n).&lt;br /&gt;
    y) Yes, type in my own password&lt;br /&gt;
    g) Generate random password&lt;br /&gt;
    n) No, leave this optional password blank (default)&lt;br /&gt;
    y/g/n&amp;gt; y&lt;br /&gt;
    Enter the password:&lt;br /&gt;
    password: YOUR_PIC_PASSWORD&lt;br /&gt;
    Confirm the password:&lt;br /&gt;
    Password: YOUR_PIC_PASSWORD&lt;br /&gt;
&lt;br /&gt;
=== Using a Macaroon token ===&lt;br /&gt;
&lt;br /&gt;
If you have been given a Macaroon token, provide it as a bearer token after leaving the user and password blank&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&lt;br /&gt;
=== Review settings ===&lt;br /&gt;
&lt;br /&gt;
At the end, just review the information you entered and confirm.&lt;br /&gt;
&lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Configuration complete.&lt;br /&gt;
    Options:&lt;br /&gt;
    - type: webdav&lt;br /&gt;
    - url: https://door04.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    - vendor: other&lt;br /&gt;
    - user: YOUR_PIC_USERNAME&lt;br /&gt;
    - pass: *** ENCRYPTED ***&lt;br /&gt;
    Keep this &amp;quot;pic&amp;quot; remote?&lt;br /&gt;
    y) Yes this is OK (default)&lt;br /&gt;
    e) Edit this remote&lt;br /&gt;
    d) Delete this remote&lt;br /&gt;
    y/e/d&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Current remotes:&lt;br /&gt;
    &lt;br /&gt;
    Name                 Type&lt;br /&gt;
    ====                 ====&lt;br /&gt;
    pic                  webdav&lt;br /&gt;
    &lt;br /&gt;
    e) Edit existing remote&lt;br /&gt;
    n) New remote&lt;br /&gt;
    d) Delete remote&lt;br /&gt;
    r) Rename remote&lt;br /&gt;
    c) Copy remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&lt;br /&gt;
Once done, you can use command line to browse and download/upload data.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Download a remote directory from PIC&lt;br /&gt;
  rclone copy &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt; &amp;lt;local_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upload a local directory to PIC&lt;br /&gt;
  rclone ${UPLOAD_FLAGS} copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When uploading data, we recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only&lt;br /&gt;
&lt;br /&gt;
See rclone manual for more extensive documentation https://rclone.org/docs/&lt;br /&gt;
&lt;br /&gt;
== Obtaining a macaroon (for contacts) ==&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid up to 7 days.&lt;br /&gt;
&lt;br /&gt;
For downloading data (read-only permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For uploading data (full permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://door04.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://door04.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://door04.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://door04.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1153</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1153"/>
		<updated>2024-06-04T09:21:30Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Obtaining a macaroon (for contacts) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage (dCache) =&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
 * Install and configure Rclone&lt;br /&gt;
 * PIC credentials or macaroon&lt;br /&gt;
&lt;br /&gt;
== Install Rclone ==&lt;br /&gt;
&lt;br /&gt;
You can directly download the binary without installing anything. For instance, for a linux 64 bits machine:&lt;br /&gt;
&lt;br /&gt;
    $ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
    [...]&lt;br /&gt;
    $ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or if you prefer, you can install Rclone like the next example on a Ubuntu machine:&lt;br /&gt;
&lt;br /&gt;
    $ cd /tmp&lt;br /&gt;
    $ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
    $ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&lt;br /&gt;
== Configure Rclone ==&lt;br /&gt;
&lt;br /&gt;
You should have been given some credentials and the url of a WebDAV endpoint at PIC.&lt;br /&gt;
With them, you just need to create the config in rclone:&lt;br /&gt;
&lt;br /&gt;
    $ rclone config&lt;br /&gt;
    No remotes found, make a new one?&lt;br /&gt;
    n) New remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    n/s/q&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Enter name for new remote.&lt;br /&gt;
    name&amp;gt; pic&lt;br /&gt;
    &lt;br /&gt;
    Option Storage.&lt;br /&gt;
    Type of storage to configure.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
     1 / 1Fichier&lt;br /&gt;
       \ (fichier)&lt;br /&gt;
    [...]&lt;br /&gt;
    Storage&amp;gt; webdav&lt;br /&gt;
    &lt;br /&gt;
    Option url.&lt;br /&gt;
    URL of http host to connect to.&lt;br /&gt;
    E.g. https://example.com.&lt;br /&gt;
    Enter a value.&lt;br /&gt;
    url&amp;gt;  https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    &lt;br /&gt;
    Option vendor.&lt;br /&gt;
    Name of the WebDAV site/service/software you are using.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
    Press Enter to leave empty.&lt;br /&gt;
     1 / Nextcloud&lt;br /&gt;
       \ (nextcloud)&lt;br /&gt;
    [...]&lt;br /&gt;
     5 / Other site/service or software&lt;br /&gt;
       \ (other)&lt;br /&gt;
    vendor&amp;gt; other&lt;br /&gt;
    &lt;br /&gt;
===  Using your PIC credentials ===&lt;br /&gt;
&lt;br /&gt;
If you have a PIC user, enter it and the corresponding password in this step. Otherwise, leave these fields blank.&lt;br /&gt;
&lt;br /&gt;
    Option user.&lt;br /&gt;
    User name.&lt;br /&gt;
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    user&amp;gt; YOUR_PIC_USERNAME&lt;br /&gt;
&lt;br /&gt;
    Option pass.&lt;br /&gt;
    Password.&lt;br /&gt;
    Choose an alternative below. Press Enter for the default (n).&lt;br /&gt;
    y) Yes, type in my own password&lt;br /&gt;
    g) Generate random password&lt;br /&gt;
    n) No, leave this optional password blank (default)&lt;br /&gt;
    y/g/n&amp;gt; y&lt;br /&gt;
    Enter the password:&lt;br /&gt;
    password: YOUR_PIC_PASSWORD&lt;br /&gt;
    Confirm the password:&lt;br /&gt;
    Password: YOUR_PIC_PASSWORD&lt;br /&gt;
&lt;br /&gt;
=== Using a Macaroon token ===&lt;br /&gt;
&lt;br /&gt;
If you have been given a Macaroon token, provide it as a bearer token after leaving the user and password blank&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&lt;br /&gt;
=== Review settings ===&lt;br /&gt;
&lt;br /&gt;
At the end, just review the information you entered and confirm.&lt;br /&gt;
&lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Configuration complete.&lt;br /&gt;
    Options:&lt;br /&gt;
    - type: webdav&lt;br /&gt;
    - url: https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    - vendor: other&lt;br /&gt;
    - user: YOUR_PIC_USERNAME&lt;br /&gt;
    - pass: *** ENCRYPTED ***&lt;br /&gt;
    Keep this &amp;quot;pic&amp;quot; remote?&lt;br /&gt;
    y) Yes this is OK (default)&lt;br /&gt;
    e) Edit this remote&lt;br /&gt;
    d) Delete this remote&lt;br /&gt;
    y/e/d&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Current remotes:&lt;br /&gt;
    &lt;br /&gt;
    Name                 Type&lt;br /&gt;
    ====                 ====&lt;br /&gt;
    pic                  webdav&lt;br /&gt;
    &lt;br /&gt;
    e) Edit existing remote&lt;br /&gt;
    n) New remote&lt;br /&gt;
    d) Delete remote&lt;br /&gt;
    r) Rename remote&lt;br /&gt;
    c) Copy remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&lt;br /&gt;
Once done, you can use command line to browse and download/upload data.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Download a remote directory from PIC&lt;br /&gt;
  rclone copy &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt; &amp;lt;local_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upload a local directory to PIC&lt;br /&gt;
  rclone ${UPLOAD_FLAGS} copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When uploading data, we recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only&lt;br /&gt;
&lt;br /&gt;
See rclone manual for more extensive documentation https://rclone.org/docs/&lt;br /&gt;
&lt;br /&gt;
== Obtaining a macaroon (for contacts) ==&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid up to 7 days.&lt;br /&gt;
&lt;br /&gt;
For downloading data (read-only permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For uploading data (full permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USER} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=1101</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=1101"/>
		<updated>2023-12-20T14:54:12Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting started ==&lt;br /&gt;
* [[PIC description|PIC in an image]]&lt;br /&gt;
* [[PIC account|Get a PIC account]]&lt;br /&gt;
* [[PIC_User_Manual | User manual]]&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
* [[HTCondor]]&lt;br /&gt;
* [[Storage]]&lt;br /&gt;
* [[JupyterHub]]&lt;br /&gt;
* [[Gitlab]]&lt;br /&gt;
* [[CosmoHub]]&lt;br /&gt;
* Spark:&lt;br /&gt;
** [[Spark on Hadoop|on Hadoop]]&lt;br /&gt;
** [[Spark_on_farm|on HTCondor]]&lt;br /&gt;
* [[Transferring data to/from PIC]]&lt;br /&gt;
&lt;br /&gt;
== Experiments ==&lt;br /&gt;
&lt;br /&gt;
* [[Euclid]]&lt;br /&gt;
&lt;br /&gt;
== More technical information ==&lt;br /&gt;
&lt;br /&gt;
* [[Storage Department]]&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=DCache_webdav_i_dCacheView&amp;diff=1100</id>
		<title>DCache webdav i dCacheView</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=DCache_webdav_i_dCacheView&amp;diff=1100"/>
		<updated>2023-12-20T14:53:29Z</updated>

		<summary type="html">&lt;p&gt;Tallada: Tallada moved page DCache webdav i dCacheView to Transferring data to/from PIC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Transferring data to/from PIC]]&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1099</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1099"/>
		<updated>2023-12-20T14:53:29Z</updated>

		<summary type="html">&lt;p&gt;Tallada: Tallada moved page DCache webdav i dCacheView to Transferring data to/from PIC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage (dCache) =&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
 * Install and configure Rclone&lt;br /&gt;
 * PIC credentials or macaroon&lt;br /&gt;
&lt;br /&gt;
== Install Rclone ==&lt;br /&gt;
&lt;br /&gt;
You can directly download the binary without installing anything. For instance, for a linux 64 bits machine:&lt;br /&gt;
&lt;br /&gt;
    $ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
    [...]&lt;br /&gt;
    $ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or if you prefer, you can install Rclone like the next example on a Ubuntu machine:&lt;br /&gt;
&lt;br /&gt;
    $ cd /tmp&lt;br /&gt;
    $ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
    $ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&lt;br /&gt;
== Configure Rclone ==&lt;br /&gt;
&lt;br /&gt;
You should have been given some credentials and the url of a WebDAV endpoint at PIC.&lt;br /&gt;
With them, you just need to create the config in rclone:&lt;br /&gt;
&lt;br /&gt;
    $ rclone config&lt;br /&gt;
    No remotes found, make a new one?&lt;br /&gt;
    n) New remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    n/s/q&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Enter name for new remote.&lt;br /&gt;
    name&amp;gt; pic&lt;br /&gt;
    &lt;br /&gt;
    Option Storage.&lt;br /&gt;
    Type of storage to configure.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
     1 / 1Fichier&lt;br /&gt;
       \ (fichier)&lt;br /&gt;
    [...]&lt;br /&gt;
    Storage&amp;gt; webdav&lt;br /&gt;
    &lt;br /&gt;
    Option url.&lt;br /&gt;
    URL of http host to connect to.&lt;br /&gt;
    E.g. https://example.com.&lt;br /&gt;
    Enter a value.&lt;br /&gt;
    url&amp;gt;  https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    &lt;br /&gt;
    Option vendor.&lt;br /&gt;
    Name of the WebDAV site/service/software you are using.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
    Press Enter to leave empty.&lt;br /&gt;
     1 / Nextcloud&lt;br /&gt;
       \ (nextcloud)&lt;br /&gt;
    [...]&lt;br /&gt;
     5 / Other site/service or software&lt;br /&gt;
       \ (other)&lt;br /&gt;
    vendor&amp;gt; other&lt;br /&gt;
    &lt;br /&gt;
===  Using your PIC credentials ===&lt;br /&gt;
&lt;br /&gt;
If you have a PIC user, enter it and the corresponding password in this step. Otherwise, leave these fields blank.&lt;br /&gt;
&lt;br /&gt;
    Option user.&lt;br /&gt;
    User name.&lt;br /&gt;
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    user&amp;gt; YOUR_PIC_USERNAME&lt;br /&gt;
&lt;br /&gt;
    Option pass.&lt;br /&gt;
    Password.&lt;br /&gt;
    Choose an alternative below. Press Enter for the default (n).&lt;br /&gt;
    y) Yes, type in my own password&lt;br /&gt;
    g) Generate random password&lt;br /&gt;
    n) No, leave this optional password blank (default)&lt;br /&gt;
    y/g/n&amp;gt; y&lt;br /&gt;
    Enter the password:&lt;br /&gt;
    password: YOUR_PIC_PASSWORD&lt;br /&gt;
    Confirm the password:&lt;br /&gt;
    Password: YOUR_PIC_PASSWORD&lt;br /&gt;
&lt;br /&gt;
=== Using a Macaroon token ===&lt;br /&gt;
&lt;br /&gt;
If you have been given a Macaroon token, provide it as a bearer token after leaving the user and password blank&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&lt;br /&gt;
=== Review settings ===&lt;br /&gt;
&lt;br /&gt;
At the end, just review the information you entered and confirm.&lt;br /&gt;
&lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Configuration complete.&lt;br /&gt;
    Options:&lt;br /&gt;
    - type: webdav&lt;br /&gt;
    - url: https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    - vendor: other&lt;br /&gt;
    - user: YOUR_PIC_USERNAME&lt;br /&gt;
    - pass: *** ENCRYPTED ***&lt;br /&gt;
    Keep this &amp;quot;pic&amp;quot; remote?&lt;br /&gt;
    y) Yes this is OK (default)&lt;br /&gt;
    e) Edit this remote&lt;br /&gt;
    d) Delete this remote&lt;br /&gt;
    y/e/d&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Current remotes:&lt;br /&gt;
    &lt;br /&gt;
    Name                 Type&lt;br /&gt;
    ====                 ====&lt;br /&gt;
    pic                  webdav&lt;br /&gt;
    &lt;br /&gt;
    e) Edit existing remote&lt;br /&gt;
    n) New remote&lt;br /&gt;
    d) Delete remote&lt;br /&gt;
    r) Rename remote&lt;br /&gt;
    c) Copy remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&lt;br /&gt;
Once done, you can use command line to browse and download/upload data.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Download a remote directory from PIC&lt;br /&gt;
  rclone copy &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt; &amp;lt;local_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upload a local directory to PIC&lt;br /&gt;
  rclone ${UPLOAD_FLAGS} copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When uploading data, we recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only&lt;br /&gt;
&lt;br /&gt;
See rclone manual for more extensive documentation https://rclone.org/docs/&lt;br /&gt;
&lt;br /&gt;
== Obtaining a macaroon (for contacts) ==&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid up to 7 days.&lt;br /&gt;
&lt;br /&gt;
For downloading data (read-only permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USERNAME} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For uploading data (full permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USERNAME} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1098</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1098"/>
		<updated>2023-12-15T12:59:42Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* How to provide data access to PIC massive storage (dCache) = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage (dCache) =&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
 * Install and configure Rclone&lt;br /&gt;
 * PIC credentials or macaroon&lt;br /&gt;
&lt;br /&gt;
== Install Rclone ==&lt;br /&gt;
&lt;br /&gt;
You can directly download the binary without installing anything. For instance, for a linux 64 bits machine:&lt;br /&gt;
&lt;br /&gt;
    $ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
    [...]&lt;br /&gt;
    $ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or if you prefer, you can install Rclone like the next example on a Ubuntu machine:&lt;br /&gt;
&lt;br /&gt;
    $ cd /tmp&lt;br /&gt;
    $ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
    $ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&lt;br /&gt;
== Configure Rclone ==&lt;br /&gt;
&lt;br /&gt;
You should have been given some credentials and the url of a WebDAV endpoint at PIC.&lt;br /&gt;
With them, you just need to create the config in rclone:&lt;br /&gt;
&lt;br /&gt;
    $ rclone config&lt;br /&gt;
    No remotes found, make a new one?&lt;br /&gt;
    n) New remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    n/s/q&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Enter name for new remote.&lt;br /&gt;
    name&amp;gt; pic&lt;br /&gt;
    &lt;br /&gt;
    Option Storage.&lt;br /&gt;
    Type of storage to configure.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
     1 / 1Fichier&lt;br /&gt;
       \ (fichier)&lt;br /&gt;
    [...]&lt;br /&gt;
    Storage&amp;gt; webdav&lt;br /&gt;
    &lt;br /&gt;
    Option url.&lt;br /&gt;
    URL of http host to connect to.&lt;br /&gt;
    E.g. https://example.com.&lt;br /&gt;
    Enter a value.&lt;br /&gt;
    url&amp;gt;  https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    &lt;br /&gt;
    Option vendor.&lt;br /&gt;
    Name of the WebDAV site/service/software you are using.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
    Press Enter to leave empty.&lt;br /&gt;
     1 / Nextcloud&lt;br /&gt;
       \ (nextcloud)&lt;br /&gt;
    [...]&lt;br /&gt;
     5 / Other site/service or software&lt;br /&gt;
       \ (other)&lt;br /&gt;
    vendor&amp;gt; other&lt;br /&gt;
    &lt;br /&gt;
===  Using your PIC credentials ===&lt;br /&gt;
&lt;br /&gt;
If you have a PIC user, enter it and the corresponding password in this step. Otherwise, leave these fields blank.&lt;br /&gt;
&lt;br /&gt;
    Option user.&lt;br /&gt;
    User name.&lt;br /&gt;
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    user&amp;gt; YOUR_PIC_USERNAME&lt;br /&gt;
&lt;br /&gt;
    Option pass.&lt;br /&gt;
    Password.&lt;br /&gt;
    Choose an alternative below. Press Enter for the default (n).&lt;br /&gt;
    y) Yes, type in my own password&lt;br /&gt;
    g) Generate random password&lt;br /&gt;
    n) No, leave this optional password blank (default)&lt;br /&gt;
    y/g/n&amp;gt; y&lt;br /&gt;
    Enter the password:&lt;br /&gt;
    password: YOUR_PIC_PASSWORD&lt;br /&gt;
    Confirm the password:&lt;br /&gt;
    Password: YOUR_PIC_PASSWORD&lt;br /&gt;
&lt;br /&gt;
=== Using a Macaroon token ===&lt;br /&gt;
&lt;br /&gt;
If you have been given a Macaroon token, provide it as a bearer token after leaving the user and password blank&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&lt;br /&gt;
=== Review settings ===&lt;br /&gt;
&lt;br /&gt;
At the end, just review the information you entered and confirm.&lt;br /&gt;
&lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Configuration complete.&lt;br /&gt;
    Options:&lt;br /&gt;
    - type: webdav&lt;br /&gt;
    - url: https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    - vendor: other&lt;br /&gt;
    - user: YOUR_PIC_USERNAME&lt;br /&gt;
    - pass: *** ENCRYPTED ***&lt;br /&gt;
    Keep this &amp;quot;pic&amp;quot; remote?&lt;br /&gt;
    y) Yes this is OK (default)&lt;br /&gt;
    e) Edit this remote&lt;br /&gt;
    d) Delete this remote&lt;br /&gt;
    y/e/d&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Current remotes:&lt;br /&gt;
    &lt;br /&gt;
    Name                 Type&lt;br /&gt;
    ====                 ====&lt;br /&gt;
    pic                  webdav&lt;br /&gt;
    &lt;br /&gt;
    e) Edit existing remote&lt;br /&gt;
    n) New remote&lt;br /&gt;
    d) Delete remote&lt;br /&gt;
    r) Rename remote&lt;br /&gt;
    c) Copy remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&lt;br /&gt;
Once done, you can use command line to browse and download/upload data.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Download a remote directory from PIC&lt;br /&gt;
  rclone copy &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt; &amp;lt;local_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upload a local directory to PIC&lt;br /&gt;
  rclone ${UPLOAD_FLAGS} copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When uploading data, we recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only&lt;br /&gt;
&lt;br /&gt;
See rclone manual for more extensive documentation https://rclone.org/docs/&lt;br /&gt;
&lt;br /&gt;
== Obtaining a macaroon (for contacts) ==&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid up to 7 days.&lt;br /&gt;
&lt;br /&gt;
For downloading data (read-only permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USERNAME} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For uploading data (full permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USERNAME} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1097</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1097"/>
		<updated>2023-12-15T12:59:03Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to provide data access to PIC massive storage (dCache) ==&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
 * Install and configure Rclone&lt;br /&gt;
 * PIC credentials or macaroon&lt;br /&gt;
&lt;br /&gt;
== Install Rclone ==&lt;br /&gt;
&lt;br /&gt;
You can directly download the binary without installing anything. For instance, for a linux 64 bits machine:&lt;br /&gt;
&lt;br /&gt;
    $ curl -JLO https://downloads.rclone.org/rclone-current-linux-amd64.zip&lt;br /&gt;
    [...]&lt;br /&gt;
    $ unzip rclone-current-linux-amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or if you prefer, you can install Rclone like the next example on a Ubuntu machine:&lt;br /&gt;
&lt;br /&gt;
    $ cd /tmp&lt;br /&gt;
    $ curl -JLO 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'&lt;br /&gt;
    $ sudo apt install ./rclone-current-linux-amd64.deb&lt;br /&gt;
&lt;br /&gt;
== Configure Rclone ==&lt;br /&gt;
&lt;br /&gt;
You should have been given some credentials and the url of a WebDAV endpoint at PIC.&lt;br /&gt;
With them, you just need to create the config in rclone:&lt;br /&gt;
&lt;br /&gt;
    $ rclone config&lt;br /&gt;
    No remotes found, make a new one?&lt;br /&gt;
    n) New remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    n/s/q&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Enter name for new remote.&lt;br /&gt;
    name&amp;gt; pic&lt;br /&gt;
    &lt;br /&gt;
    Option Storage.&lt;br /&gt;
    Type of storage to configure.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
     1 / 1Fichier&lt;br /&gt;
       \ (fichier)&lt;br /&gt;
    [...]&lt;br /&gt;
    Storage&amp;gt; webdav&lt;br /&gt;
    &lt;br /&gt;
    Option url.&lt;br /&gt;
    URL of http host to connect to.&lt;br /&gt;
    E.g. https://example.com.&lt;br /&gt;
    Enter a value.&lt;br /&gt;
    url&amp;gt;  https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    &lt;br /&gt;
    Option vendor.&lt;br /&gt;
    Name of the WebDAV site/service/software you are using.&lt;br /&gt;
    Choose a number from below, or type in your own value.&lt;br /&gt;
    Press Enter to leave empty.&lt;br /&gt;
     1 / Nextcloud&lt;br /&gt;
       \ (nextcloud)&lt;br /&gt;
    [...]&lt;br /&gt;
     5 / Other site/service or software&lt;br /&gt;
       \ (other)&lt;br /&gt;
    vendor&amp;gt; other&lt;br /&gt;
    &lt;br /&gt;
===  Using your PIC credentials ===&lt;br /&gt;
&lt;br /&gt;
If you have a PIC user, enter it and the corresponding password in this step. Otherwise, leave these fields blank.&lt;br /&gt;
&lt;br /&gt;
    Option user.&lt;br /&gt;
    User name.&lt;br /&gt;
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    user&amp;gt; YOUR_PIC_USERNAME&lt;br /&gt;
&lt;br /&gt;
    Option pass.&lt;br /&gt;
    Password.&lt;br /&gt;
    Choose an alternative below. Press Enter for the default (n).&lt;br /&gt;
    y) Yes, type in my own password&lt;br /&gt;
    g) Generate random password&lt;br /&gt;
    n) No, leave this optional password blank (default)&lt;br /&gt;
    y/g/n&amp;gt; y&lt;br /&gt;
    Enter the password:&lt;br /&gt;
    password: YOUR_PIC_PASSWORD&lt;br /&gt;
    Confirm the password:&lt;br /&gt;
    Password: YOUR_PIC_PASSWORD&lt;br /&gt;
&lt;br /&gt;
=== Using a Macaroon token ===&lt;br /&gt;
&lt;br /&gt;
If you have been given a Macaroon token, provide it as a bearer token after leaving the user and password blank&lt;br /&gt;
&lt;br /&gt;
    Option bearer_token.&lt;br /&gt;
    Bearer token instead of user/pass (e.g. a Macaroon).&lt;br /&gt;
    Enter a value. Press Enter to leave empty.&lt;br /&gt;
    bearer_token&amp;gt; YOUR_MACAROON_TOKEN&lt;br /&gt;
&lt;br /&gt;
=== Review settings ===&lt;br /&gt;
&lt;br /&gt;
At the end, just review the information you entered and confirm.&lt;br /&gt;
&lt;br /&gt;
    Edit advanced config?&lt;br /&gt;
    y) Yes&lt;br /&gt;
    n) No (default)&lt;br /&gt;
    y/n&amp;gt; n&lt;br /&gt;
    &lt;br /&gt;
    Configuration complete.&lt;br /&gt;
    Options:&lt;br /&gt;
    - type: webdav&lt;br /&gt;
    - url: https://webdav.pic.es/PATH_TO_YOUR_STORAGE_SPACE&lt;br /&gt;
    - vendor: other&lt;br /&gt;
    - user: YOUR_PIC_USERNAME&lt;br /&gt;
    - pass: *** ENCRYPTED ***&lt;br /&gt;
    Keep this &amp;quot;pic&amp;quot; remote?&lt;br /&gt;
    y) Yes this is OK (default)&lt;br /&gt;
    e) Edit this remote&lt;br /&gt;
    d) Delete this remote&lt;br /&gt;
    y/e/d&amp;gt; y&lt;br /&gt;
    &lt;br /&gt;
    Current remotes:&lt;br /&gt;
    &lt;br /&gt;
    Name                 Type&lt;br /&gt;
    ====                 ====&lt;br /&gt;
    pic                  webdav&lt;br /&gt;
    &lt;br /&gt;
    e) Edit existing remote&lt;br /&gt;
    n) New remote&lt;br /&gt;
    d) Delete remote&lt;br /&gt;
    r) Rename remote&lt;br /&gt;
    c) Copy remote&lt;br /&gt;
    s) Set configuration password&lt;br /&gt;
    q) Quit config&lt;br /&gt;
    e/n/d/r/c/s/q&amp;gt; q&lt;br /&gt;
&lt;br /&gt;
Once done, you can use command line to browse and download/upload data.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Download a remote directory from PIC&lt;br /&gt;
  rclone copy &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt; &amp;lt;local_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upload a local directory to PIC&lt;br /&gt;
  rclone ${UPLOAD_FLAGS} copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When uploading data, we recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only&lt;br /&gt;
&lt;br /&gt;
See rclone manual for more extensive documentation https://rclone.org/docs/&lt;br /&gt;
&lt;br /&gt;
== Obtaining a macaroon (for contacts) ==&lt;br /&gt;
&lt;br /&gt;
Macaroons are valid up to 7 days.&lt;br /&gt;
&lt;br /&gt;
For downloading data (read-only permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USERNAME} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For uploading data (full permissions on the path):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u ${USERNAME} -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/${RESTRICTED_PATH}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/${RESTRICTED_PATH}&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1096</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1096"/>
		<updated>2023-12-06T11:24:02Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to provide data access to external users without PIC account  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== dCache webdav door ====&lt;br /&gt;
&lt;br /&gt;
https://webdav.pic.es or https://webdav.pic.es:8460&lt;br /&gt;
&lt;br /&gt;
==== dCacheView frontend (optional) ====&lt;br /&gt;
&lt;br /&gt;
https://webdav.pic.es:8470&lt;br /&gt;
&lt;br /&gt;
==== Authentication ====&lt;br /&gt;
&lt;br /&gt;
Either PIC credentials (user/password) or a macaroon (https://dcache.org/old/manuals/UserGuide-7.0/macaroons.shtml).&lt;br /&gt;
Any authenticated user can get a macaroon for an external user. Remember to add proper caveats to restrict privileges.&lt;br /&gt;
In the next example, I retrieve a macaroon with 7 days validity, that can only download and list, and can only access the subtree of the provided URL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u tallada -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/pnfs/pic.es/data/astro/euclid/disk/simulations/ComplementarySimulations&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/pnfs/pic.es/data/astro/euclid/disk/simulations/ComplementarySimulations?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/pnfs/pic.es/data/astro/euclid/disk/simulations/ComplementarySimulations&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Browser access ====&lt;br /&gt;
&lt;br /&gt;
You can access the data either through the webdav door or dCacheView. If you have PIC credentials (user/password), just input them when requested by the browser.&lt;br /&gt;
&lt;br /&gt;
If you only have a macaroon token, you can access the webdav using the preauthenticated URL (either targetWithMacaroon or baseWithMacaroon). You will only be able to browse to the restricted subtree.&lt;br /&gt;
You can also use command line clients like cURL or wget.&lt;br /&gt;
&lt;br /&gt;
In order to use the macarron with dCacheView, DO NOT ENTER any credentials at the login step. Instead, click the three bar menu at the top right, a panel on the left will open. On that panel, select the &amp;quot;Shared files&amp;quot; option. Then, clic the &amp;quot;Add&amp;quot; button on the bottom right and enter the macaroon token.&lt;br /&gt;
&lt;br /&gt;
==== rclone ====&lt;br /&gt;
&lt;br /&gt;
We can use rclone on Windows, Linux and MacOS to be able to automatize data transfer, even mount the remote data as a local filesystem.&lt;br /&gt;
First, follow the instructions to install rclone in your host (https://rclone.org/install/).&lt;br /&gt;
Note that for mounting you might need additional software (https://rclone.org/commands/rclone_mount/)&lt;br /&gt;
&lt;br /&gt;
Then, create a new remote, either using the &amp;quot;rclone config&amp;quot; command line, or opening the web GUI with the command &amp;quot;rclone rcd --rc-web-gui&amp;quot;. You might need to add &amp;quot;--no-check-certificates&amp;quot; in some cases.&lt;br /&gt;
Provide the following info for the remote:&lt;br /&gt;
* name: &amp;quot;pic&amp;quot; or any other short identifier&lt;br /&gt;
* provider: webdav&lt;br /&gt;
* url: https://webdav.pic.es (you can use the full path here to to restrict the visible tree)&lt;br /&gt;
* username/password: if you have PIC credentials, otherwise leave empty and use macaroon below.&lt;br /&gt;
* bearer token: MDANOxGCg (the macaroon token)&lt;br /&gt;
&lt;br /&gt;
Once done, you can use either the command line or the explorer tab to browse and download data.&lt;br /&gt;
&lt;br /&gt;
Most common command lines:&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Copy a local directory to PIC&lt;br /&gt;
  rclone copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  rclone --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also mount the remote data to a local path. Use the &amp;quot;Mounts&amp;quot; tab in the web GUI, select the remote filesystem and a local folder (or drive letter in Windows), and press create.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1095</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=1095"/>
		<updated>2023-12-06T11:23:49Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to provide data access to external users without PIC account  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== dCache webdav door ====&lt;br /&gt;
&lt;br /&gt;
https://webdav.pic.es or https://webdav.pic.es:8460&lt;br /&gt;
&lt;br /&gt;
==== dCacheView frontend (optional) ====&lt;br /&gt;
&lt;br /&gt;
https://webdav-mice.pic.es:8470&lt;br /&gt;
&lt;br /&gt;
==== Authentication ====&lt;br /&gt;
&lt;br /&gt;
Either PIC credentials (user/password) or a macaroon (https://dcache.org/old/manuals/UserGuide-7.0/macaroons.shtml).&lt;br /&gt;
Any authenticated user can get a macaroon for an external user. Remember to add proper caveats to restrict privileges.&lt;br /&gt;
In the next example, I retrieve a macaroon with 7 days validity, that can only download and list, and can only access the subtree of the provided URL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u tallada -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav.pic.es:8460/pnfs/pic.es/data/astro/euclid/disk/simulations/ComplementarySimulations&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/pnfs/pic.es/data/astro/euclid/disk/simulations/ComplementarySimulations?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav.pic.es:8460/?authz=MDA2MGxvY2F0aW&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav.pic.es:8460/pnfs/pic.es/data/astro/euclid/disk/simulations/ComplementarySimulations&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav.pic.es:8460/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Browser access ====&lt;br /&gt;
&lt;br /&gt;
You can access the data either through the webdav door or dCacheView. If you have PIC credentials (user/password), just input them when requested by the browser.&lt;br /&gt;
&lt;br /&gt;
If you only have a macaroon token, you can access the webdav using the preauthenticated URL (either targetWithMacaroon or baseWithMacaroon). You will only be able to browse to the restricted subtree.&lt;br /&gt;
You can also use command line clients like cURL or wget.&lt;br /&gt;
&lt;br /&gt;
In order to use the macarron with dCacheView, DO NOT ENTER any credentials at the login step. Instead, click the three bar menu at the top right, a panel on the left will open. On that panel, select the &amp;quot;Shared files&amp;quot; option. Then, clic the &amp;quot;Add&amp;quot; button on the bottom right and enter the macaroon token.&lt;br /&gt;
&lt;br /&gt;
==== rclone ====&lt;br /&gt;
&lt;br /&gt;
We can use rclone on Windows, Linux and MacOS to be able to automatize data transfer, even mount the remote data as a local filesystem.&lt;br /&gt;
First, follow the instructions to install rclone in your host (https://rclone.org/install/).&lt;br /&gt;
Note that for mounting you might need additional software (https://rclone.org/commands/rclone_mount/)&lt;br /&gt;
&lt;br /&gt;
Then, create a new remote, either using the &amp;quot;rclone config&amp;quot; command line, or opening the web GUI with the command &amp;quot;rclone rcd --rc-web-gui&amp;quot;. You might need to add &amp;quot;--no-check-certificates&amp;quot; in some cases.&lt;br /&gt;
Provide the following info for the remote:&lt;br /&gt;
* name: &amp;quot;pic&amp;quot; or any other short identifier&lt;br /&gt;
* provider: webdav&lt;br /&gt;
* url: https://webdav.pic.es (you can use the full path here to to restrict the visible tree)&lt;br /&gt;
* username/password: if you have PIC credentials, otherwise leave empty and use macaroon below.&lt;br /&gt;
* bearer token: MDANOxGCg (the macaroon token)&lt;br /&gt;
&lt;br /&gt;
Once done, you can use either the command line or the explorer tab to browse and download data.&lt;br /&gt;
&lt;br /&gt;
Most common command lines:&lt;br /&gt;
&lt;br /&gt;
* List a remote PIC directory: &lt;br /&gt;
  rclone lsd &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
* Copy a local directory to PIC&lt;br /&gt;
  rclone copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I recommend using the following flags, where n_transfers can be up to 350 if transferring lots of small files &lt;br /&gt;
  rclone --check-first -P --stats-one-line --transfers &amp;lt;n_transfers&amp;gt; --size-only copy &amp;lt;local_dir&amp;gt; &amp;lt;name&amp;gt;:&amp;lt;path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also mount the remote data to a local path. Use the &amp;quot;Mounts&amp;quot; tab in the web GUI, select the remote filesystem and a local folder (or drive letter in Windows), and press create.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=934</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=934"/>
		<updated>2021-12-23T11:49:32Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to provide data access to external users without PIC account  ==&lt;br /&gt;
&lt;br /&gt;
I will use an example for MICE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== dCache webdav door ====&lt;br /&gt;
&lt;br /&gt;
https://webdav-mice.pic.es:8454&lt;br /&gt;
&lt;br /&gt;
==== dCacheView frontend (optional) ====&lt;br /&gt;
&lt;br /&gt;
https://webdav-mice.pic.es:8464&lt;br /&gt;
&lt;br /&gt;
==== Authentication ====&lt;br /&gt;
&lt;br /&gt;
Either PIC credentials (user/password) or a macaroon (https://dcache.org/old/manuals/UserGuide-7.0/macaroons.shtml).&lt;br /&gt;
Any authenticated user can get a macaroon for an external user. Remember to add proper caveats to restrict privileges.&lt;br /&gt;
In the next example, I retrieve a macaroon with 7 days validity, that can only download and list, and can only access the subtree of the provided URL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u tallada -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav-mice.pic.es:8454/tape/raw/production/N4096_L3072_LC3/maps/n8192/kmapgcpy/&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDANOxGCg&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav-mice.pic.es:8454/tape/raw/production/N4096_L3072_LC3/maps/n8192/kmapgcpy/?authz=MDANOxGCg&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav-mice.pic.es:8454/?authz=MDANOxGCg&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav-mice.pic.es:8454/tape/raw/production/N4096_L3072_LC3/maps/n8192/kmapgcpy/&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav-mice.pic.es:8454/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Browser access ====&lt;br /&gt;
&lt;br /&gt;
You can access the data either through the webdav door or dCacheView. If you have PIC credentials (user/password), just input them when requested by the browser.&lt;br /&gt;
&lt;br /&gt;
If you only have a macaroon token, you can access the webdav using the preauthenticated URL (either targetWithMacaroon or baseWithMacaroon). You will only be able to browse to the restricted subtree.&lt;br /&gt;
You can also use command line clients like cURL or wget.&lt;br /&gt;
&lt;br /&gt;
In order to use the macarron with dCacheView, DO NOT ENTER any credentials at the login step. Instead, click the three bar menu at the top right, a panel on the left will open. On that panel, select the &amp;quot;Shared files&amp;quot; option. Then, clic the &amp;quot;Add&amp;quot; button on the bottom right and enter the macaroon token.&lt;br /&gt;
&lt;br /&gt;
==== rclone ====&lt;br /&gt;
&lt;br /&gt;
We can use rclone on Windows, Linux and MacOS to be able to automatize data transfer, even mount the remote data as a local filesystem.&lt;br /&gt;
First, follow the instructions to install rclone in your host (https://rclone.org/install/).&lt;br /&gt;
Note that for mounting you might need additional software (https://rclone.org/commands/rclone_mount/)&lt;br /&gt;
&lt;br /&gt;
Then, open the web GUI with the command &amp;quot;rclone rcd --rc-web-gui&amp;quot;. You might need to add &amp;quot;--no-check-certificates&amp;quot; in some cases.&lt;br /&gt;
Once opened, create a config with the following info:&lt;br /&gt;
* provider: webdav&lt;br /&gt;
* url: https://webdav-mice.pic.es:8454 (either the base or target url)&lt;br /&gt;
* username/password: if you have PIC credentials&lt;br /&gt;
* bearer token: MDANOxGCg (the macaroon token)&lt;br /&gt;
&lt;br /&gt;
Once done, you can use the explorer tab to browse and download data.&lt;br /&gt;
&lt;br /&gt;
You can also mount the remote data to a local path. Use the &amp;quot;Mounts&amp;quot; tab, select the remote filesystem and a local folder (or diver letter in Windows), and press create.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=933</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=933"/>
		<updated>2021-12-23T11:48:34Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to provide data access to external users without PIC account  ==&lt;br /&gt;
&lt;br /&gt;
I will use an example for MICE&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
1) dCache webdav door that exports your data.&lt;br /&gt;
&lt;br /&gt;
https://webdav-mice.pic.es:8454&lt;br /&gt;
&lt;br /&gt;
2) dCacheView frontend (optional)&lt;br /&gt;
&lt;br /&gt;
https://webdav-mice.pic.es:8464&lt;br /&gt;
&lt;br /&gt;
3) Authentication&lt;br /&gt;
&lt;br /&gt;
Either PIC credentials (user/password) or a macaroon (https://dcache.org/old/manuals/UserGuide-7.0/macaroons.shtml).&lt;br /&gt;
Any authenticated user can get a macaroon for an external user. Remember to add proper caveats to restrict privileges.&lt;br /&gt;
In the next example, I retrieve a macaroon with 7 days validity, that can only download and list, and can only access the subtree of the provided URL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u tallada -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav-mice.pic.es:8454/tape/raw/production/N4096_L3072_LC3/maps/n8192/kmapgcpy/&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDANOxGCg&amp;quot;,&lt;br /&gt;
    &amp;quot;uri&amp;quot;: {&lt;br /&gt;
        &amp;quot;targetWithMacaroon&amp;quot;: &amp;quot;https://webdav-mice.pic.es:8454/tape/raw/production/N4096_L3072_LC3/maps/n8192/kmapgcpy/?authz=MDANOxGCg&amp;quot;,&lt;br /&gt;
        &amp;quot;baseWithMacaroon&amp;quot;: &amp;quot;https://webdav-mice.pic.es:8454/?authz=MDANOxGCg&amp;quot;,&lt;br /&gt;
        &amp;quot;target&amp;quot;: &amp;quot;https://webdav-mice.pic.es:8454/tape/raw/production/N4096_L3072_LC3/maps/n8192/kmapgcpy/&amp;quot;,&lt;br /&gt;
        &amp;quot;base&amp;quot;: &amp;quot;https://webdav-mice.pic.es:8454/&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Browser access&lt;br /&gt;
&lt;br /&gt;
You can access the data either through the webdav door or dCacheView. If you have PIC credentials (user/password), just input them when requested by the browser.&lt;br /&gt;
&lt;br /&gt;
If you only have a macaroon token, you can access the webdav using the preauthenticated URL (either targetWithMacaroon or baseWithMacaroon). You will only be able to browse to the restricted subtree.&lt;br /&gt;
You can also use command line clients like cURL or wget.&lt;br /&gt;
&lt;br /&gt;
In order to use the macarron with dCacheView, DO NOT ENTER any credentials at the login step. Instead, click the three bar menu at the top right, a panel on the left will open. On that panel, select the &amp;quot;Shared files&amp;quot; option. Then, clic the &amp;quot;Add&amp;quot; button on the bottom right and enter the macaroon token.&lt;br /&gt;
&lt;br /&gt;
5) rclone&lt;br /&gt;
&lt;br /&gt;
We can use rclone on Windows, Linux and MacOS to be able to automatize data transfer, even mount the remote data as a local filesystem.&lt;br /&gt;
First, follow the instructions to install rclone in your host (https://rclone.org/install/).&lt;br /&gt;
Note that for mounting you might need additional software (https://rclone.org/commands/rclone_mount/)&lt;br /&gt;
&lt;br /&gt;
Then, open the web GUI with the command &amp;quot;rclone rcd --rc-web-gui&amp;quot;. You might need to add &amp;quot;--no-check-certificates&amp;quot; in some cases.&lt;br /&gt;
Once opened, create a config with the following info:&lt;br /&gt;
* provider: webdav&lt;br /&gt;
* url: https://webdav-mice.pic.es:8454 (either the base or target url)&lt;br /&gt;
* username/password: if you have PIC credentials&lt;br /&gt;
* bearer token: MDANOxGCg (the macaroon token)&lt;br /&gt;
&lt;br /&gt;
Once done, you can use the explorer tab to browse and download data.&lt;br /&gt;
&lt;br /&gt;
You can also mount the remote data to a local path. Use the &amp;quot;Mounts&amp;quot; tab, select the remote filesystem and a local folder (or diver letter in Windows), and press create.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=932</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=932"/>
		<updated>2021-12-23T08:50:20Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to provide data access to external users without PIC account  ==&lt;br /&gt;
&lt;br /&gt;
I will use an example for MICE&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
1) dCache webdav door that exports your data.&lt;br /&gt;
&lt;br /&gt;
https://webdav-mice.pic.es:8454&lt;br /&gt;
&lt;br /&gt;
2) dCacheView frontend (optional)&lt;br /&gt;
&lt;br /&gt;
https://webdav-mice.pic.es:8464&lt;br /&gt;
&lt;br /&gt;
3) Authentication&lt;br /&gt;
&lt;br /&gt;
Either PIC credentials (user/password) or a macaroon (https://dcache.org/old/manuals/UserGuide-7.0/macaroons.shtml).&lt;br /&gt;
Any authenticated user can get a macaroon for an external user. Remember to add proper caveats to restrict privileges.&lt;br /&gt;
In the next example, I retrieve a macaroon with 7 days validity, that can only download and list, and can only access the subtree of the provided URL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -u tallada -X POST -H 'Content-Type: application/macaroon-request' \&lt;br /&gt;
-d '{&amp;quot;caveats&amp;quot;: [&amp;quot;activity:DOWNLOAD,LIST&amp;quot;], &amp;quot;validity&amp;quot;: &amp;quot;P7D&amp;quot;}' \&lt;br /&gt;
https://webdav-mice.pic.es:8454/tape/raw/production/N4096_L3072_LC3/maps/n8192/kmapgcpy/&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;macaroon&amp;quot;: &amp;quot;MDA3NWxvJmc2lnbmF0dXJlIJt81Pp8G1KXMH8FqwpWhJtwYnLfUAvNPQuq7bTwNOxGCg&amp;quot;,   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=931</id>
		<title>Transferring data to/from PIC</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Transferring_data_to/from_PIC&amp;diff=931"/>
		<updated>2021-12-23T08:37:44Z</updated>

		<summary type="html">&lt;p&gt;Tallada: Created page with &amp;quot;== How to provide data access to external users without PIC account  ==  I will use an example for MICE  === Steps ===  1) Ensure you have a dCache webdav door that exports yo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to provide data access to external users without PIC account  ==&lt;br /&gt;
&lt;br /&gt;
I will use an example for MICE&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
1) Ensure you have a dCache webdav door that exports your data.&lt;br /&gt;
&lt;br /&gt;
In our case: https://webdav-mice.pic.es:8454&lt;br /&gt;
&lt;br /&gt;
* dcacheview frontend (optional)&lt;br /&gt;
* PIC account or macaroon&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=930</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Main_Page&amp;diff=930"/>
		<updated>2021-12-23T08:32:21Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Astrophysics &amp;amp; Cosmology Department */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Computing Department ==&lt;br /&gt;
* [[HTCondor User Guide]]&lt;br /&gt;
* [[jupyter.pic.es]]&lt;br /&gt;
&lt;br /&gt;
== Storage Department ==&lt;br /&gt;
* [[dCache.org]]&lt;br /&gt;
* [[FileSystems]]&lt;br /&gt;
&lt;br /&gt;
== Astrophysics &amp;amp; Cosmology Department ==&lt;br /&gt;
&lt;br /&gt;
*[[CosmoHub | CosmoHub User Guide]]&lt;br /&gt;
*[[Gitlab_Migration | Gitlab migration]]&lt;br /&gt;
*[[Python_Jupyter | Python environments and Jupyter ]]&lt;br /&gt;
*[[AC_UserManual | User manual]]&lt;br /&gt;
*[[Spark_on_farm | Spark on farm]]&lt;br /&gt;
*[[Catalogs | Catalogs]]&lt;br /&gt;
*[[Mock pipeline v2.0]]&lt;br /&gt;
*[[dCache webdav i dCacheView]]&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]&lt;br /&gt;
* Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Spark_on_farm&amp;diff=912</id>
		<title>Spark on farm</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Spark_on_farm&amp;diff=912"/>
		<updated>2021-04-27T09:14:34Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to launch a Spark cluster, follow these steps:&lt;br /&gt;
&lt;br /&gt;
1) Deploy a Spark installation on your ~&lt;br /&gt;
&lt;br /&gt;
2) On a UI, start a spark master using this command and write down the master url provided&lt;br /&gt;
&lt;br /&gt;
    ${SPARK_HOME}/sbin/start-master.sh -h $(hostname)&lt;br /&gt;
&lt;br /&gt;
3) Create a submit script like this one, substituting &amp;lt;VARIABLES&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    SPARK_MASTER=&amp;lt;MASTER_URL&amp;gt;&lt;br /&gt;
    NUM_CORES=1&lt;br /&gt;
    MEMORY=4g&lt;br /&gt;
    &lt;br /&gt;
    cd ${TMPDIR}&lt;br /&gt;
    &lt;br /&gt;
    echo &amp;quot;spark.executor.extraJavaOptions -Djava.io.tmpdir=${TMPDIR}&amp;quot; &amp;gt; spark-defaults.conf&lt;br /&gt;
    echo &amp;quot;spark.local.dir ${TMPDIR}&amp;quot; &amp;gt;&amp;gt; spark-defaults.conf&lt;br /&gt;
    echo &amp;quot;spark.pyspark.python &amp;lt;PYTHON_VENV_EXECUTABLE_PATH&amp;gt;&amp;quot; &amp;gt;&amp;gt; spark-defaults.conf&lt;br /&gt;
    &lt;br /&gt;
    PYSPARK_PYTHON=&amp;lt;PYTHON_VENV_EXECUTABLE_PATH&amp;gt; \&lt;br /&gt;
    &amp;lt;SPARK_HOME&amp;gt;/bin/spark-class \&lt;br /&gt;
    org.apache.spark.deploy.worker.Worker ${SPARK_MASTER} \&lt;br /&gt;
    -c ${NUM_CORES} -m ${MEMORY} -d ${TMPDIR} --properties-file spark-defaults.conf&lt;br /&gt;
&lt;br /&gt;
4) Submit the previous script to the farm&lt;br /&gt;
&lt;br /&gt;
    qsub -q &amp;lt;QUEUE&amp;gt; -t 1-&amp;lt;NUM_WORKERS&amp;gt; &amp;lt;SUBMIT_SCRIPT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) After a few minutes, workers should start registering to the master.&lt;br /&gt;
&lt;br /&gt;
6) Create your SparkContext connecting it to the &amp;lt;MASTER_URL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    spark = SparkSession.builder.master(&amp;lt;MASTER_URL&amp;gt;).getOrCreate()&lt;br /&gt;
    sc = spark.sparkContext&lt;br /&gt;
&lt;br /&gt;
7) Enjoy!&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=High-z_galaxies&amp;diff=890</id>
		<title>High-z galaxies</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=High-z_galaxies&amp;diff=890"/>
		<updated>2021-01-15T16:38:31Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Description of the process to generate the High-z galaxies catalog for SC8 == &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pau runs the pipeline and create a catalog in parquet:&lt;br /&gt;
&lt;br /&gt;
Ojo porque en el hdfs tiene 1_10_4 y sin embargo en el 1_10_5 &lt;br /&gt;
&lt;br /&gt;
    /software/astro/scripts/create_table_from_parquet.sh -p /hdfs/user/tallada/data/euclid/flagship_mock_1_10_4_high_z/0.pq -t jcarrete.flagship_mock_1_10_5_highz_pq -e&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    CREATE EXTERNAL TABLE jcarrete.flagship_mock_1_10_5_highz_pq (&lt;br /&gt;
        `type` STRING,&lt;br /&gt;
        `z` DOUBLE,&lt;br /&gt;
        `abs_muv` DOUBLE,&lt;br /&gt;
        `sedname` STRING,&lt;br /&gt;
        `sedname_int` BIGINT,&lt;br /&gt;
        `rhalf_kpc` DOUBLE,&lt;br /&gt;
        `rhalf_arcsec` DOUBLE,&lt;br /&gt;
        `muv` DOUBLE,&lt;br /&gt;
        `beta` DOUBLE,&lt;br /&gt;
        `r` DOUBLE,&lt;br /&gt;
        `hpix_9_nest` BIGINT,&lt;br /&gt;
        `kind` BIGINT,&lt;br /&gt;
        `step` BIGINT,&lt;br /&gt;
        `unique_id` BIGINT,&lt;br /&gt;
        `hpix_29_nest` BIGINT,&lt;br /&gt;
        `ra` DOUBLE,&lt;br /&gt;
        `dec` DOUBLE,&lt;br /&gt;
        `l` DOUBLE,&lt;br /&gt;
        `b` DOUBLE,&lt;br /&gt;
        `mw_extinction` DOUBLE,&lt;br /&gt;
        `blanco_decam_g_true` DOUBLE,&lt;br /&gt;
        `blanco_decam_g` DOUBLE,&lt;br /&gt;
        `blanco_decam_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `blanco_decam_i_true` DOUBLE,&lt;br /&gt;
        `blanco_decam_i` DOUBLE,&lt;br /&gt;
        `blanco_decam_i_odonnell_ext` DOUBLE,&lt;br /&gt;
        `blanco_decam_r_true` DOUBLE,&lt;br /&gt;
        `blanco_decam_r` DOUBLE,&lt;br /&gt;
        `blanco_decam_r_odonnell_ext` DOUBLE,&lt;br /&gt;
        `blanco_decam_z_true` DOUBLE,&lt;br /&gt;
        `blanco_decam_z` DOUBLE,&lt;br /&gt;
        `blanco_decam_z_odonnell_ext` DOUBLE,&lt;br /&gt;
        `subaru_hsc_z_true` DOUBLE,&lt;br /&gt;
        `subaru_hsc_z` DOUBLE,&lt;br /&gt;
        `subaru_hsc_z_odonnell_ext` DOUBLE,&lt;br /&gt;
        `jst_jpcam_g_true` DOUBLE,&lt;br /&gt;
        `jst_jpcam_g` DOUBLE,&lt;br /&gt;
        `jst_jpcam_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `kids_g_true` DOUBLE,&lt;br /&gt;
        `kids_g` DOUBLE,&lt;br /&gt;
        `kids_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `kids_i_true` DOUBLE,&lt;br /&gt;
        `kids_i` DOUBLE,&lt;br /&gt;
        `kids_i_odonnell_ext` DOUBLE,&lt;br /&gt;
        `kids_r_true` DOUBLE,&lt;br /&gt;
        `kids_r` DOUBLE,&lt;br /&gt;
        `kids_r_odonnell_ext` DOUBLE,&lt;br /&gt;
        `kids_u_true` DOUBLE,&lt;br /&gt;
        `kids_u` DOUBLE,&lt;br /&gt;
        `kids_u_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_g_true` DOUBLE,&lt;br /&gt;
        `lsst_g` DOUBLE,&lt;br /&gt;
        `lsst_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_i_true` DOUBLE,&lt;br /&gt;
        `lsst_i` DOUBLE,&lt;br /&gt;
        `lsst_i_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_r_true` DOUBLE,&lt;br /&gt;
        `lsst_r` DOUBLE,&lt;br /&gt;
        `lsst_r_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_u_true` DOUBLE,&lt;br /&gt;
        `lsst_u` DOUBLE,&lt;br /&gt;
        `lsst_u_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_y_true` DOUBLE,&lt;br /&gt;
        `lsst_y` DOUBLE,&lt;br /&gt;
        `lsst_y_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_z_true` DOUBLE,&lt;br /&gt;
        `lsst_z` DOUBLE,&lt;br /&gt;
        `lsst_z_odonnell_ext` DOUBLE,&lt;br /&gt;
        `cfht_megacam_r_true` DOUBLE,&lt;br /&gt;
        `cfht_megacam_r` DOUBLE,&lt;br /&gt;
        `cfht_megacam_r_odonnell_ext` DOUBLE,&lt;br /&gt;
        `cfht_megacam_u_true` DOUBLE,&lt;br /&gt;
        `cfht_megacam_u` DOUBLE,&lt;br /&gt;
        `cfht_megacam_u_odonnell_ext` DOUBLE,&lt;br /&gt;
        `pan_starrs_i_true` DOUBLE,&lt;br /&gt;
        `pan_starrs_i` DOUBLE,&lt;br /&gt;
        `pan_starrs_i_odonnell_ext` DOUBLE,&lt;br /&gt;
        `pan_starrs_z_true` DOUBLE,&lt;br /&gt;
        `pan_starrs_z` DOUBLE,&lt;br /&gt;
        `pan_starrs_z_odonnell_ext` DOUBLE,&lt;br /&gt;
        `2mass_h_true` DOUBLE,&lt;br /&gt;
        `2mass_h` DOUBLE,&lt;br /&gt;
        `2mass_h_odonnell_ext` DOUBLE,&lt;br /&gt;
        `2mass_j_true` DOUBLE,&lt;br /&gt;
        `2mass_j` DOUBLE,&lt;br /&gt;
        `2mass_j_odonnell_ext` DOUBLE,&lt;br /&gt;
        `2mass_ks_true` DOUBLE,&lt;br /&gt;
        `2mass_ks` DOUBLE,&lt;br /&gt;
        `2mass_ks_odonnell_ext` DOUBLE,&lt;br /&gt;
        `sdss_r01_true` DOUBLE,&lt;br /&gt;
        `sdss_r01` DOUBLE,&lt;br /&gt;
        `sdss_r01_odonnell_ext` DOUBLE,&lt;br /&gt;
        `gaia_bp_true` DOUBLE,&lt;br /&gt;
        `gaia_bp` DOUBLE,&lt;br /&gt;
        `gaia_bp_odonnell_ext` DOUBLE,&lt;br /&gt;
        `gaia_g_true` DOUBLE,&lt;br /&gt;
        `gaia_g` DOUBLE,&lt;br /&gt;
        `gaia_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `gaia_rp_true` DOUBLE,&lt;br /&gt;
        `gaia_rp` DOUBLE,&lt;br /&gt;
        `gaia_rp_odonnell_ext` DOUBLE,&lt;br /&gt;
        `euclid_nisp_h_true` DOUBLE,&lt;br /&gt;
        `euclid_nisp_h` DOUBLE,&lt;br /&gt;
        `euclid_nisp_h_odonnell_ext` DOUBLE,&lt;br /&gt;
        `euclid_nisp_j_true` DOUBLE,&lt;br /&gt;
        `euclid_nisp_j` DOUBLE,&lt;br /&gt;
        `euclid_nisp_j_odonnell_ext` DOUBLE,&lt;br /&gt;
        `euclid_nisp_y_true` DOUBLE,&lt;br /&gt;
        `euclid_nisp_y` DOUBLE,&lt;br /&gt;
        `euclid_nisp_y_odonnell_ext` DOUBLE,&lt;br /&gt;
        `euclid_vis_true` DOUBLE,&lt;br /&gt;
        `euclid_vis` DOUBLE,&lt;br /&gt;
        `euclid_vis_odonnell_ext` DOUBLE,&lt;br /&gt;
        `id` BIGINT&lt;br /&gt;
    )&lt;br /&gt;
    STORED AS PARQUET&lt;br /&gt;
    LOCATION '/user/tallada/data/euclid/flagship_mock_1_10_4_high_z'&lt;br /&gt;
    ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clusterizo:&lt;br /&gt;
&lt;br /&gt;
    CREATE TABLE cosmohub.flagship_mock_1_10_5_highz_c (&lt;br /&gt;
        `unique_id` BIGINT COMMENT 'unique identifier',&lt;br /&gt;
        `id` INT COMMENT 'ID',&lt;br /&gt;
        `kind` tinyint COMMENT 'Galaxy type: 0: CENTRAL, 1: SATELLITE, 2: QSO, 3: HIGH REDSHIFT',&lt;br /&gt;
        `z` FLOAT,&lt;br /&gt;
        `ra` FLOAT,&lt;br /&gt;
        `dec` FLOAT,&lt;br /&gt;
        `l` FLOAT,&lt;br /&gt;
        `b` FLOAT,&lt;br /&gt;
        `mw_extinction` FLOAT,&lt;br /&gt;
        `abs_muv` FLOAT,&lt;br /&gt;
        `sedname` STRING,&lt;br /&gt;
        `sedname_int` BIGINT,&lt;br /&gt;
        `rhalf_kpc` FLOAT,&lt;br /&gt;
        `rhalf_arcsec` FLOAT,&lt;br /&gt;
        `muv` FLOAT,&lt;br /&gt;
        `beta` FLOAT,&lt;br /&gt;
        `hpix_9_nest` INT,&lt;br /&gt;
        `hpix_13_nest` INT,&lt;br /&gt;
        `hpix_29_nest` BIGINT,&lt;br /&gt;
        `blanco_decam_g_true` FLOAT,&lt;br /&gt;
        `blanco_decam_g` FLOAT,&lt;br /&gt;
        `blanco_decam_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `blanco_decam_i_true` FLOAT,&lt;br /&gt;
        `blanco_decam_i` FLOAT,&lt;br /&gt;
        `blanco_decam_i_odonnell_ext` FLOAT,&lt;br /&gt;
        `blanco_decam_r_true` FLOAT,&lt;br /&gt;
        `blanco_decam_r` FLOAT,&lt;br /&gt;
        `blanco_decam_r_odonnell_ext` FLOAT,&lt;br /&gt;
        `blanco_decam_z_true` FLOAT,&lt;br /&gt;
        `blanco_decam_z` FLOAT,&lt;br /&gt;
        `blanco_decam_z_odonnell_ext` FLOAT,&lt;br /&gt;
        `subaru_hsc_z_true` FLOAT,&lt;br /&gt;
        `subaru_hsc_z` FLOAT,&lt;br /&gt;
        `subaru_hsc_z_odonnell_ext` FLOAT,&lt;br /&gt;
        `jst_jpcam_g_true` FLOAT,&lt;br /&gt;
        `jst_jpcam_g` FLOAT,&lt;br /&gt;
        `jst_jpcam_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `kids_g_true` FLOAT,&lt;br /&gt;
        `kids_g` FLOAT,&lt;br /&gt;
        `kids_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `kids_i_true` FLOAT,&lt;br /&gt;
        `kids_i` FLOAT,&lt;br /&gt;
        `kids_i_odonnell_ext` FLOAT,&lt;br /&gt;
        `kids_r_true` FLOAT,&lt;br /&gt;
        `kids_r` FLOAT,&lt;br /&gt;
        `kids_r_odonnell_ext` FLOAT,&lt;br /&gt;
        `kids_u_true` FLOAT,&lt;br /&gt;
        `kids_u` FLOAT,&lt;br /&gt;
        `kids_u_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_g_true` FLOAT,&lt;br /&gt;
        `lsst_g` FLOAT,&lt;br /&gt;
        `lsst_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_i_true` FLOAT,&lt;br /&gt;
        `lsst_i` FLOAT,&lt;br /&gt;
        `lsst_i_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_r_true` FLOAT,&lt;br /&gt;
        `lsst_r` FLOAT,&lt;br /&gt;
        `lsst_r_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_u_true` FLOAT,&lt;br /&gt;
        `lsst_u` FLOAT,&lt;br /&gt;
        `lsst_u_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_y_true` FLOAT,&lt;br /&gt;
        `lsst_y` FLOAT,&lt;br /&gt;
        `lsst_y_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_z_true` FLOAT,&lt;br /&gt;
        `lsst_z` FLOAT,&lt;br /&gt;
        `lsst_z_odonnell_ext` FLOAT,&lt;br /&gt;
        `cfht_megacam_r_true` FLOAT,&lt;br /&gt;
        `cfht_megacam_r` FLOAT,&lt;br /&gt;
        `cfht_megacam_r_odonnell_ext` FLOAT,&lt;br /&gt;
        `cfht_megacam_u_true` FLOAT,&lt;br /&gt;
        `cfht_megacam_u` FLOAT,&lt;br /&gt;
        `cfht_megacam_u_odonnell_ext` FLOAT,&lt;br /&gt;
        `pan_starrs_i_true` FLOAT,&lt;br /&gt;
        `pan_starrs_i` FLOAT,&lt;br /&gt;
        `pan_starrs_i_odonnell_ext` FLOAT,&lt;br /&gt;
        `pan_starrs_z_true` FLOAT,&lt;br /&gt;
        `pan_starrs_z` FLOAT,&lt;br /&gt;
        `pan_starrs_z_odonnell_ext` FLOAT,&lt;br /&gt;
        `2mass_h_true` FLOAT,&lt;br /&gt;
        `2mass_h` FLOAT,&lt;br /&gt;
        `2mass_h_odonnell_ext` FLOAT,&lt;br /&gt;
        `2mass_j_true` FLOAT,&lt;br /&gt;
        `2mass_j` FLOAT,&lt;br /&gt;
        `2mass_j_odonnell_ext` FLOAT,&lt;br /&gt;
        `2mass_ks_true` FLOAT,&lt;br /&gt;
        `2mass_ks` FLOAT,&lt;br /&gt;
        `2mass_ks_odonnell_ext` FLOAT,&lt;br /&gt;
        `sdss_r01_true` FLOAT,&lt;br /&gt;
        `sdss_r01` FLOAT,&lt;br /&gt;
        `sdss_r01_odonnell_ext` FLOAT,&lt;br /&gt;
        `gaia_bp_true` FLOAT,&lt;br /&gt;
        `gaia_bp` FLOAT,&lt;br /&gt;
        `gaia_bp_odonnell_ext` FLOAT,&lt;br /&gt;
        `gaia_g_true` FLOAT,&lt;br /&gt;
        `gaia_g` FLOAT,&lt;br /&gt;
        `gaia_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `gaia_rp_true` FLOAT,&lt;br /&gt;
        `gaia_rp` FLOAT,&lt;br /&gt;
        `gaia_rp_odonnell_ext` FLOAT,&lt;br /&gt;
        `euclid_nisp_h_true` FLOAT,&lt;br /&gt;
        `euclid_nisp_h` FLOAT,&lt;br /&gt;
        `euclid_nisp_h_odonnell_ext` FLOAT,&lt;br /&gt;
        `euclid_nisp_j_true` FLOAT,&lt;br /&gt;
        `euclid_nisp_j` FLOAT,&lt;br /&gt;
        `euclid_nisp_j_odonnell_ext` FLOAT,&lt;br /&gt;
        `euclid_nisp_y_true` FLOAT,&lt;br /&gt;
        `euclid_nisp_y` FLOAT,&lt;br /&gt;
        `euclid_nisp_y_odonnell_ext` FLOAT,&lt;br /&gt;
        `euclid_vis_true` FLOAT,&lt;br /&gt;
        `euclid_vis` FLOAT,&lt;br /&gt;
        `euclid_vis_odonnell_ext` FLOAT,&lt;br /&gt;
        `step` smallint COMMENT 'redshift step number'&lt;br /&gt;
    )&lt;br /&gt;
    CLUSTERED BY (&lt;br /&gt;
      step,&lt;br /&gt;
      hpix_13_nest)&lt;br /&gt;
    SORTED BY (&lt;br /&gt;
      step ASC,&lt;br /&gt;
      hpix_13_nest ASC)&lt;br /&gt;
    INTO 4096 BUCKETS&lt;br /&gt;
    STORED AS ORC&lt;br /&gt;
    ;&lt;br /&gt;
&lt;br /&gt;
    INSERT OVERWRITE TABLE cosmohub.flagship_mock_1_10_5_highz_c&lt;br /&gt;
    SELECT&lt;br /&gt;
    `unique_id`, `id`, `kind`, `z`, `ra`, `dec`, `l`, `b`, `mw_extinction`, `abs_muv`, `sedname`, `sedname_int`, `rhalf_kpc`, `rhalf_arcsec`, `muv`, `beta`, `hpix_9_nest`, SHIFTRIGHT(hpix_29_nest, (29-13)*2), `hpix_29_nest`, `blanco_decam_g_true`, `blanco_decam_g`, `blanco_decam_g_odonnell_ext`, `blanco_decam_i_true`, `blanco_decam_i`, `blanco_decam_i_odonnell_ext`, `blanco_decam_r_true`, `blanco_decam_r`, `blanco_decam_r_odonnell_ext`, `blanco_decam_z_true`, `blanco_decam_z`, `blanco_decam_z_odonnell_ext`, `subaru_hsc_z_true`, `subaru_hsc_z`, `subaru_hsc_z_odonnell_ext`, `jst_jpcam_g_true`, `jst_jpcam_g`, `jst_jpcam_g_odonnell_ext`, `kids_g_true`, `kids_g`, `kids_g_odonnell_ext`, `kids_i_true`, `kids_i`, `kids_i_odonnell_ext`, `kids_r_true`, `kids_r`, `kids_r_odonnell_ext`, `kids_u_true`, `kids_u`, `kids_u_odonnell_ext`, `lsst_g_true`, `lsst_g`, `lsst_g_odonnell_ext`, `lsst_i_true`, `lsst_i`, `lsst_i_odonnell_ext`, `lsst_r_true`, `lsst_r`, `lsst_r_odonnell_ext`, `lsst_u_true`, `lsst_u`, `lsst_u_odonnell_ext`, `lsst_y_true`, `lsst_y`, `lsst_y_odonnell_ext`, `lsst_z_true`, `lsst_z`, `lsst_z_odonnell_ext`, `cfht_megacam_r_true`, `cfht_megacam_r`, `cfht_megacam_r_odonnell_ext`, `cfht_megacam_u_true`, `cfht_megacam_u`, `cfht_megacam_u_odonnell_ext`, `pan_starrs_i_true`, `pan_starrs_i`, `pan_starrs_i_odonnell_ext`, `pan_starrs_z_true`, `pan_starrs_z`, `pan_starrs_z_odonnell_ext`, `2mass_h_true`, `2mass_h`, `2mass_h_odonnell_ext`, `2mass_j_true`, `2mass_j`, `2mass_j_odonnell_ext`, `2mass_ks_true`, `2mass_ks`, `2mass_ks_odonnell_ext`, `sdss_r01_true`, `sdss_r01`, `sdss_r01_odonnell_ext`, `gaia_bp_true`, `gaia_bp`, `gaia_bp_odonnell_ext`, `gaia_g_true`, `gaia_g`, `gaia_g_odonnell_ext`, `gaia_rp_true`, `gaia_rp`, `gaia_rp_odonnell_ext`, `euclid_nisp_h_true`, `euclid_nisp_h`, `euclid_nisp_h_odonnell_ext`, `euclid_nisp_j_true`, `euclid_nisp_j`, `euclid_nisp_j_odonnell_ext`, `euclid_nisp_y_true`, `euclid_nisp_y`, `euclid_nisp_y_odonnell_ext`, `euclid_vis_true`, `euclid_vis`, `euclid_vis_odonnell_ext`, `step`&lt;br /&gt;
    FROM jcarrete.flagship_mock_1_10_5_highz_pq;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ANALYZE TABLE cosmohub.flagship_mock_1_10_5_highz_c COMPUTE STATISTICS FOR COLUMNS;&lt;br /&gt;
&lt;br /&gt;
Añado el lensing:&lt;br /&gt;
&lt;br /&gt;
    CREATE TABLE cosmohub.flagship_mock_1_10_5_highz_s (&lt;br /&gt;
        `unique_id` BIGINT COMMENT 'unique identifier',&lt;br /&gt;
        `id` INT COMMENT 'ID',&lt;br /&gt;
        `kind` tinyint COMMENT 'Galaxy type: 0: CENTRAL, 1: SATELLITE, 2: QSO, 3: HIGH REDSHIFT',&lt;br /&gt;
        `z` float COMMENT 'true galaxy redshift',&lt;br /&gt;
        `ra` FLOAT COMMENT 'galaxy right ascension (degrees)',&lt;br /&gt;
        `dec` FLOAT COMMENT 'galaxy declination (degrees)',&lt;br /&gt;
        `ra_mag` float COMMENT 'galaxy magnified right ascension (degree)', &lt;br /&gt;
        `dec_mag` float COMMENT 'galaxy magnified declination (degree)', &lt;br /&gt;
        `kappa` float COMMENT 'convergence', &lt;br /&gt;
        `gamma1` float COMMENT 'shear', &lt;br /&gt;
        `gamma2` float COMMENT 'shear',&lt;br /&gt;
        `defl1` float COMMENT 'deflection1',&lt;br /&gt;
        `defl2` float COMMENT 'deflection2',&lt;br /&gt;
        `l` FLOAT COMMENT 'galactic longitude (degrees)',&lt;br /&gt;
        `b` FLOAT COMMENT 'galactic latitude (degrees)',&lt;br /&gt;
        `mw_extinction` float COMMENT 'EBV from file: HFI_CompMap_ThermalDustModel_2048_R1.20.fits',&lt;br /&gt;
        `abs_muv` FLOAT COMMENT 'absolute magnitude at 1500 angstroms',&lt;br /&gt;
        `sedname` STRING COMMENT 'Spectral Energy Distribution name (among 76, 38 without UV lines, 38 with UV lines, corresponding to a given UV slope)',&lt;br /&gt;
        `sedname_int` BIGINT COMMENT 'sedname as integer (from 0 to 75, from 0 to 37 without UV lines, from 38 to 75 with UV lines)',&lt;br /&gt;
        `rhalf_kpc` FLOAT COMMENT 'half light radius (in physical kpc)',&lt;br /&gt;
        `rhalf_arcsec` FLOAT COMMENT 'half light radius (in arcsec)',&lt;br /&gt;
        `muv` FLOAT COMMENT 'for information only, observed magnitude at rest-frame 1500',&lt;br /&gt;
        `beta` FLOAT COMMENT 'for information only, used to assign an SED',&lt;br /&gt;
        `hpix_9_nest` int COMMENT 'healpix pixel id using order = 9 in NESTED format',&lt;br /&gt;
        `hpix_13_nest` int COMMENT 'healpix pixel id using order = 13 in NESTED format',&lt;br /&gt;
        `hpix_29_nest` bigint COMMENT 'healpix pixel id using order = 29 in NESTED format',&lt;br /&gt;
      `blanco_decam_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in DES g-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_g` float COMMENT 'Interpolated observed flux in DES g-band (Euclid provided)',&lt;br /&gt;
      `blanco_decam_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in DES g-band (Euclid provided)',&lt;br /&gt;
      `blanco_decam_i_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in DES i-band (Euclid provided)',  &lt;br /&gt;
      `blanco_decam_i` float COMMENT 'Interpolated observed flux in DES i-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_i_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in DES i-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_r_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in DES r-band (Euclid provided)',  &lt;br /&gt;
      `blanco_decam_r` float COMMENT 'Interpolated observed flux in DES r-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_r_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in DES r-band (Euclid provided)',  &lt;br /&gt;
      `blanco_decam_z_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in DES z-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_z` float COMMENT 'Interpolated observed flux in DES z-band (Euclid provided)',&lt;br /&gt;
      `blanco_decam_z_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in DES z-band (Euclid provided)', &lt;br /&gt;
      `subaru_hsc_z_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in HYPER SUPRIME CAMERA SUBARU z-band (Euclid provided)',&lt;br /&gt;
      `subaru_hsc_z` float COMMENT 'Interpolated observed flux in HYPER SUPRIME CAMERA SUBARU z-band (Euclid provided)',&lt;br /&gt;
      `subaru_hsc_z_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in HYPER SUPRIME CAMERA SUBARU z-band (Euclid provided)',&lt;br /&gt;
      `jst_jpcam_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in JST g-band (Euclid provided)', &lt;br /&gt;
      `jst_jpcam_g` float COMMENT 'Interpolated observed flux in JST g-band (Euclid provided)',&lt;br /&gt;
      `jst_jpcam_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in JST g-band (Euclid provided)',&lt;br /&gt;
      `kids_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in KIDS g-band (Euclid provided)', &lt;br /&gt;
      `kids_g` float COMMENT 'Interpolated observed flux in KIDS g-band (Euclid provided)',&lt;br /&gt;
      `kids_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in KIDS g-band (Euclid provided)',&lt;br /&gt;
      `kids_i_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in KIDS i-band (Euclid provided)', &lt;br /&gt;
      `kids_i` float COMMENT 'Interpolated observed flux in KIDS i-band (Euclid provided)',&lt;br /&gt;
      `kids_i_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in KIDS i-band (Euclid provided)', &lt;br /&gt;
      `kids_r_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in KIDS r-band (Euclid provided)', &lt;br /&gt;
      `kids_r` float COMMENT 'Interpolated observed flux in KIDS r-band (Euclid provided)',&lt;br /&gt;
      `kids_r_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in KIDS r-band (Euclid provided)',&lt;br /&gt;
      `kids_u_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in KIDS u-band (Euclid provided)', &lt;br /&gt;
      `kids_u` float COMMENT 'Interpolated observed flux in KIDS u-band (Euclid provided)',&lt;br /&gt;
      `kids_u_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in KIDS u-band (Euclid provided)',&lt;br /&gt;
      `lsst_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST g-band (Euclid provided)', &lt;br /&gt;
      `lsst_g` float COMMENT 'Interpolated observed flux in LSST g-band (Euclid provided)',&lt;br /&gt;
      `lsst_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST g-band (Euclid provided)',&lt;br /&gt;
      `lsst_i_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST i-band (Euclid provided)', &lt;br /&gt;
      `lsst_i` float COMMENT 'Interpolated observed flux in LSST i-band (Euclid provided)',&lt;br /&gt;
      `lsst_i_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST i-band (Euclid provided)',&lt;br /&gt;
      `lsst_r_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST r-band (Euclid provided)', &lt;br /&gt;
      `lsst_r` float COMMENT 'Interpolated observed flux in LSST r-band (Euclid provided)',&lt;br /&gt;
      `lsst_r_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST r-band (Euclid provided)',&lt;br /&gt;
      `lsst_u_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST u-band (Euclid provided)', &lt;br /&gt;
      `lsst_u` float COMMENT 'Interpolated observed flux in LSST u-band (Euclid provided)',&lt;br /&gt;
      `lsst_u_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST u-band (Euclid provided)',&lt;br /&gt;
      `lsst_y_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST y-band (Euclid provided)', &lt;br /&gt;
      `lsst_y` float COMMENT 'Interpolated observed flux in LSST y-band (Euclid provided)',&lt;br /&gt;
      `lsst_y_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST y-band (Euclid provided)',&lt;br /&gt;
      `lsst_z_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST z-band (Euclid provided)', &lt;br /&gt;
      `lsst_z` float COMMENT 'Interpolated observed flux in LSST z-band (Euclid provided)',&lt;br /&gt;
      `lsst_z_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST z-band (Euclid provided)',&lt;br /&gt;
      `cfht_megacam_r_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in CFHT r-band (Euclid provided)', &lt;br /&gt;
      `cfht_megacam_r` float COMMENT 'Interpolated observed flux in CFHT r-band (Euclid provided)',&lt;br /&gt;
      `cfht_megacam_r_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in CFHT r-band (Euclid provided)',&lt;br /&gt;
      `cfht_megacam_u_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in CFHT u-band (Euclid provided)', &lt;br /&gt;
      `cfht_megacam_u` float COMMENT 'Interpolated observed flux in CFHT u-band (Euclid provided)',&lt;br /&gt;
      `cfht_megacam_u_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in CFHT u-band (Euclid provided)',&lt;br /&gt;
      `pan_starrs_i_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Pan-STARRS i-band (Euclid provided)',  &lt;br /&gt;
      `pan_starrs_i` float COMMENT 'Interpolated observed flux in Pan-STARRS i-band (Euclid provided)',&lt;br /&gt;
      `pan_starrs_i_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Pan-STARRS i-band (Euclid provided)',&lt;br /&gt;
      `pan_starrs_z_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Pan-STARRS z-band (Euclid provided)', &lt;br /&gt;
      `pan_starrs_z` float COMMENT 'Interpolated observed flux in Pan-STARRS z-band (Euclid provided)',&lt;br /&gt;
      `pan_starrs_z_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Pan-STARRS z-band (Euclid provided)',&lt;br /&gt;
      `2mass_h_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in 2MASS H-band (Euclid provided)', &lt;br /&gt;
      `2mass_h` float COMMENT 'Interpolated observed flux in 2MASS H-band (Euclid provided)',&lt;br /&gt;
      `2mass_h_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in 2MASS H-band (Euclid provided)',&lt;br /&gt;
      `2mass_j_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in 2MASS J-band (Euclid provided)', &lt;br /&gt;
      `2mass_j` float COMMENT 'Interpolated observed flux in 2MASS J-band (Euclid provided)',&lt;br /&gt;
      `2mass_j_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in 2MASS J-band (Euclid provided)',&lt;br /&gt;
      `2mass_ks_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in 2MASS Ks-band (Euclid provided)', &lt;br /&gt;
      `2mass_ks` float COMMENT 'Interpolated observed flux in 2MASS Ks-band (Euclid provided)',&lt;br /&gt;
      `2mass_ks_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in 2MASS Ks-band (Euclid provided)',&lt;br /&gt;
      `sdss_r01_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in sdss r-band redshifted to z=0.1 (Euclid provided)', &lt;br /&gt;
      `sdss_r01` float COMMENT 'Interpolated observed flux in sdss r-band redshifted to z=0.1 (Euclid provided)',&lt;br /&gt;
      `sdss_r01_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in sdss r-band redshifted to z=0.1 (Euclid provided)',&lt;br /&gt;
      `gaia_bp_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Gaia-BP band (Euclid provided)', &lt;br /&gt;
      `gaia_bp` float COMMENT 'Interpolated observed flux in Gaia-BP band (Euclid provided)',&lt;br /&gt;
      `gaia_bp_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Gaia-BP band (Euclid provided)',&lt;br /&gt;
      `gaia_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Gaia-G band (Euclid provided)', &lt;br /&gt;
      `gaia_g` float COMMENT 'Interpolated observed flux in Gaia-G band (Euclid provided)',&lt;br /&gt;
      `gaia_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Gaia-G band (Euclid provided)', &lt;br /&gt;
      `gaia_rp_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Gaia-RP band (Euclid provided)', &lt;br /&gt;
      `gaia_rp` float COMMENT 'Interpolated observed flux in Gaia-RP band (Euclid provided)',&lt;br /&gt;
      `gaia_rp_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Gaia-RP band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_h_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Euclid NISP-H band (Euclid provided)', &lt;br /&gt;
      `euclid_nisp_h` float COMMENT 'Interpolated observed flux in Euclid NISP-H band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_h_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Euclid NISP-H band (Euclid provided)', &lt;br /&gt;
      `euclid_nisp_j_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Euclid NISP-J band (Euclid provided)', &lt;br /&gt;
      `euclid_nisp_j` float COMMENT 'Interpolated observed flux in Euclid NISP-J band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_j_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Euclid NISP-J band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_y_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Euclid NISP-Y band (Euclid provided)', &lt;br /&gt;
      `euclid_nisp_y` float COMMENT 'Interpolated observed flux in Euclid NISP-Y band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_y_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Euclid NISP-Y band (Euclid provided)', &lt;br /&gt;
      `euclid_vis_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Euclid VIS band (Euclid provided)', &lt;br /&gt;
      `euclid_vis` float COMMENT 'Interpolated observed flux in Euclid VIS band (Euclid provided)',&lt;br /&gt;
      `euclid_vis_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Euclid VIS band (Euclid provided)',&lt;br /&gt;
      `step` smallint COMMENT 'redshift step number'&lt;br /&gt;
    )&lt;br /&gt;
    CLUSTERED BY (&lt;br /&gt;
      step,&lt;br /&gt;
      hpix_13_nest)&lt;br /&gt;
    SORTED BY (&lt;br /&gt;
      step ASC,&lt;br /&gt;
      hpix_13_nest ASC)&lt;br /&gt;
    INTO 4096 BUCKETS&lt;br /&gt;
    STORED AS ORC&lt;br /&gt;
    ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    SET hive.auto.convert.join.noconditionaltask.size=1000;&lt;br /&gt;
&lt;br /&gt;
    INSERT OVERWRITE TABLE cosmohub.flagship_mock_1_10_5_highz_s&lt;br /&gt;
    SELECT &lt;br /&gt;
    `unique_id`, `id`, `kind`, `z`, `ra`, `dec`, mag_pos.ra_mag, mag_pos.dec_mag, kappa, gamma1, gamma2, defl1, defl2, `l`, `b`, `mw_extinction`, `abs_muv`, `sedname`, `sedname_int`, `rhalf_kpc`, `rhalf_arcsec`, `muv`, `beta`, `hpix_9_nest`, `hpix_13_nest`, `hpix_29_nest`, `blanco_decam_g_true`, `blanco_decam_g`, `blanco_decam_g_odonnell_ext`, `blanco_decam_i_true`, `blanco_decam_i`, `blanco_decam_i_odonnell_ext`, `blanco_decam_r_true`, `blanco_decam_r`, `blanco_decam_r_odonnell_ext`, `blanco_decam_z_true`, `blanco_decam_z`, `blanco_decam_z_odonnell_ext`, `subaru_hsc_z_true`, `subaru_hsc_z`, `subaru_hsc_z_odonnell_ext`, `jst_jpcam_g_true`, `jst_jpcam_g`, `jst_jpcam_g_odonnell_ext`, `kids_g_true`, `kids_g`, `kids_g_odonnell_ext`, `kids_i_true`, `kids_i`, `kids_i_odonnell_ext`, `kids_r_true`, `kids_r`, `kids_r_odonnell_ext`, `kids_u_true`, `kids_u`, `kids_u_odonnell_ext`, `lsst_g_true`, `lsst_g`, `lsst_g_odonnell_ext`, `lsst_i_true`, `lsst_i`, `lsst_i_odonnell_ext`, `lsst_r_true`, `lsst_r`, `lsst_r_odonnell_ext`, `lsst_u_true`, `lsst_u`, `lsst_u_odonnell_ext`, `lsst_y_true`, `lsst_y`, `lsst_y_odonnell_ext`, `lsst_z_true`, `lsst_z`, `lsst_z_odonnell_ext`, `cfht_megacam_r_true`, `cfht_megacam_r`, `cfht_megacam_r_odonnell_ext`, `cfht_megacam_u_true`, `cfht_megacam_u`, `cfht_megacam_u_odonnell_ext`, `pan_starrs_i_true`, `pan_starrs_i`, `pan_starrs_i_odonnell_ext`, `pan_starrs_z_true`, `pan_starrs_z`, `pan_starrs_z_odonnell_ext`, `2mass_h_true`, `2mass_h`, `2mass_h_odonnell_ext`, `2mass_j_true`, `2mass_j`, `2mass_j_odonnell_ext`, `2mass_ks_true`, `2mass_ks`, `2mass_ks_odonnell_ext`, `sdss_r01_true`, `sdss_r01`, `sdss_r01_odonnell_ext`, `gaia_bp_true`, `gaia_bp`, `gaia_bp_odonnell_ext`, `gaia_g_true`, `gaia_g`, `gaia_g_odonnell_ext`, `gaia_rp_true`, `gaia_rp`, `gaia_rp_odonnell_ext`, `euclid_nisp_h_true`, `euclid_nisp_h`, `euclid_nisp_h_odonnell_ext`, `euclid_nisp_j_true`, `euclid_nisp_j`, `euclid_nisp_j_odonnell_ext`, `euclid_nisp_y_true`, `euclid_nisp_y`, `euclid_nisp_y_odonnell_ext`, `euclid_vis_true`, `euclid_vis`, `euclid_vis_odonnell_ext`, `step`&lt;br /&gt;
    FROM&lt;br /&gt;
    (SELECT &lt;br /&gt;
    `unique_id`, `id`, `kind`, `z`, `ra`, `dec`, udf.magnified_positions(CAST(ra AS DOUBLE), CAST(`dec` AS DOUBLE), CAST(l.defl1 AS DOUBLE), CAST(l.defl2 AS DOUBLE)) as mag_pos, l.kappa, l.gamma1, l.gamma2, l.defl1, l.defl2, `l`, `b`, `mw_extinction`, `abs_muv`, `sedname`, `sedname_int`, `rhalf_kpc`, `rhalf_arcsec`, `muv`, `beta`, `hpix_9_nest`, l.hpix_13_nest, `hpix_29_nest`, `blanco_decam_g_true`, `blanco_decam_g`, `blanco_decam_g_odonnell_ext`, `blanco_decam_i_true`, `blanco_decam_i`, `blanco_decam_i_odonnell_ext`, `blanco_decam_r_true`, `blanco_decam_r`, `blanco_decam_r_odonnell_ext`, `blanco_decam_z_true`, `blanco_decam_z`, `blanco_decam_z_odonnell_ext`, `subaru_hsc_z_true`, `subaru_hsc_z`, `subaru_hsc_z_odonnell_ext`, `jst_jpcam_g_true`, `jst_jpcam_g`, `jst_jpcam_g_odonnell_ext`, `kids_g_true`, `kids_g`, `kids_g_odonnell_ext`, `kids_i_true`, `kids_i`, `kids_i_odonnell_ext`, `kids_r_true`, `kids_r`, `kids_r_odonnell_ext`, `kids_u_true`, `kids_u`, `kids_u_odonnell_ext`, `lsst_g_true`, `lsst_g`, `lsst_g_odonnell_ext`, `lsst_i_true`, `lsst_i`, `lsst_i_odonnell_ext`, `lsst_r_true`, `lsst_r`, `lsst_r_odonnell_ext`, `lsst_u_true`, `lsst_u`, `lsst_u_odonnell_ext`, `lsst_y_true`, `lsst_y`, `lsst_y_odonnell_ext`, `lsst_z_true`, `lsst_z`, `lsst_z_odonnell_ext`, `cfht_megacam_r_true`, `cfht_megacam_r`, `cfht_megacam_r_odonnell_ext`, `cfht_megacam_u_true`, `cfht_megacam_u`, `cfht_megacam_u_odonnell_ext`, `pan_starrs_i_true`, `pan_starrs_i`, `pan_starrs_i_odonnell_ext`, `pan_starrs_z_true`, `pan_starrs_z`, `pan_starrs_z_odonnell_ext`, `2mass_h_true`, `2mass_h`, `2mass_h_odonnell_ext`, `2mass_j_true`, `2mass_j`, `2mass_j_odonnell_ext`, `2mass_ks_true`, `2mass_ks`, `2mass_ks_odonnell_ext`, `sdss_r01_true`, `sdss_r01`, `sdss_r01_odonnell_ext`, `gaia_bp_true`, `gaia_bp`, `gaia_bp_odonnell_ext`, `gaia_g_true`, `gaia_g`, `gaia_g_odonnell_ext`, `gaia_rp_true`, `gaia_rp`, `gaia_rp_odonnell_ext`, `euclid_nisp_h_true`, `euclid_nisp_h`, `euclid_nisp_h_odonnell_ext`, `euclid_nisp_j_true`, `euclid_nisp_j`, `euclid_nisp_j_odonnell_ext`, `euclid_nisp_y_true`, `euclid_nisp_y`, `euclid_nisp_y_odonnell_ext`, `euclid_vis_true`, `euclid_vis`, `euclid_vis_odonnell_ext`, l.step&lt;br /&gt;
    FROM cosmohub.flagship_mock_1_10_5_highz_c as m&lt;br /&gt;
    JOIN cosmohub.flagship_lensing2 as l&lt;br /&gt;
    ON m.step = l.step&lt;br /&gt;
    AND m.hpix_13_nest = l.hpix_13_nest) as t&lt;br /&gt;
    ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ANALYZE TABLE cosmohub.flagship_mock_1_10_5_highz_s COMPUTE STATISTICS FOR COLUMNS;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Information in CosmoHub:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the first SC8 High-z galaxies release.&lt;br /&gt;
&lt;br /&gt;
We have selected galaxies from [https://cosmohub.pic.es/catalogs/209](https://cosmohub.pic.es/catalogs/209) (copied information below) and located randomly in SC8 area.&lt;br /&gt;
&lt;br /&gt;
We have assigned lensing parameters from last redshift step (86) since lensing and deflection maps are not yet available for higher redshift.&lt;br /&gt;
&lt;br /&gt;
Therefore we have used those parameters to estimate the magnified positions and also magnified fluxes in the TU FITS files.&lt;br /&gt;
&lt;br /&gt;
Note that **we provide fluxes instead of magnitudes**. In order **to get magnitudes** you can enter in the &amp;quot;Expert mode&amp;quot; and estimate the magnitude as follows: &lt;br /&gt;
&lt;br /&gt;
m = -2.5 * log10(flux) - 48.6&lt;br /&gt;
&lt;br /&gt;
And in order to estimate magnified magnitudes:&lt;br /&gt;
&lt;br /&gt;
m_mag = m + 2.5 * log10((1-kappa)*(1-kappa) - gamma1 * gamma1 - gamma2 * gamma2)&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
**The catalog of LBG sources is based on the &amp;quot;Recipes&amp;quot; described in this [Euclid Redmine entry](https://euclid.roe.ac.uk/projects/puswg/wiki/Galaxies)**.&lt;br /&gt;
&lt;br /&gt;
Important features to be noted:&lt;br /&gt;
&lt;br /&gt;
1) The corresponding area is 16 deg2&lt;br /&gt;
&lt;br /&gt;
2) Magnitude cut at H=27 (AB mag)&lt;br /&gt;
&lt;br /&gt;
3) SEDs are provided with given UV continuum slopes&lt;br /&gt;
&lt;br /&gt;
4) A standard cosmology with h=0.7, Om=0.3, Olambda=0.7 was used to convert kpc to arcsec and abs_muv (absolute magnitude at 1500 angstroms) to muv (observed magnitude at rest-frame 1500)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fits file example in CosmoHub:&lt;br /&gt;
&lt;br /&gt;
    {&lt;br /&gt;
        &amp;quot;sql&amp;quot;: &amp;quot;SELECT CAST(unique_id AS bigint) AS SOURCE_ID,  \nCAST(-1 AS float) AS HALO_ID, \nCAST(kind AS smallint) AS KIND,  \nCAST(ra AS double) AS RA,  \nCAST(`dec` AS double) AS `DEC`,  \nCAST(ra_mag AS double) AS RA_MAG,  \nCAST(dec_mag AS double) AS DEC_MAG,  \nCAST(z AS float) AS Z_OBS,  \nCAST(abs_muv AS float) AS REF_MAG_ABS,  \nCAST(abs_muv AS float) AS REF_MAG,  \nCAST(1 AS float) AS BULGE_FRACTION,  \nCAST(rhalf_arcsec AS float) AS BULGE_R50,  \nCAST(rhalf_arcsec AS float) AS DISK_R50,  \nCAST(1.5 AS float) AS BULGE_NSERSIC,  \nCAST(-1 AS float) AS BULGE_AXIS_RATIO,  \nCAST(-1 AS float) AS INCLINATION_ANGLE,  \nCAST(-1 AS float) AS DISK_ANGLE,  \nCAST(kappa AS float) AS KAPPA,  \nCAST(gamma1 AS float) AS GAMMA1,  \nCAST(gamma2 AS float) AS GAMMA2,  \nCAST(sedname_int AS float) AS SED_TEMPLATE,  \nCAST(0 AS smallint) AS EXT_LAW,  \nCAST(-1 AS float) AS EBV,  \nCAST(-1 AS float) AS HALPHA_LOGFLAM_EXT_MAG,  \nCAST(-1 AS float) AS HBETA_LOGFLAM_EXT_MAG,  \nCAST(-1 AS float) AS O2_LOGFLAM_EXT_MAG,  \nCAST(-1 AS float) AS O3_LOGFLAM_EXT_MAG,  \nCAST(-1 AS float) AS N2_LOGFLAM_EXT_MAG,  \nCAST(-1 AS float) AS S2_LOGFLAM_EXT_MAG,  \nCAST(mw_extinction AS float) AS AV,\nCAST(euclid_vis*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_VIS_MAG,  \nCAST(euclid_nisp_y*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_Y_NISP_MAG,  \nCAST(euclid_nisp_j*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_J_NISP_MAG,  \nCAST(euclid_nisp_h*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_H_NISP_MAG,  \nCAST(blanco_decam_g*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_G_DECAM_MAG,  \nCAST(blanco_decam_r*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_R_DECAM_MAG,  \nCAST(blanco_decam_i*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_I_DECAM_MAG,  \nCAST(blanco_decam_z*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_Z_DECAM_MAG,  \nCAST(cfht_megacam_u*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_U_MEGACAM_MAG,  \nCAST(cfht_megacam_r*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_R_MEGACAM_MAG,  \nCAST(jst_jpcam_g*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_G_JPCAM_MAG,  \nCAST(pan_starrs_i*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_I_PANSTARRS_MAG,  \nCAST(pan_starrs_z*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_Z_PANSTARRS_MAG,  \nCAST(subaru_hsc_z*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_Z_HSC_MAG,  \nCAST(gaia_g*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float)  AS TU_FNU_G_GAIA_MAG,  \nCAST(gaia_bp*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_BP_GAIA_MAG,  \nCAST(gaia_rp*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_RP_GAIA_MAG,  \nCAST(lsst_u*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_U_LSST_MAG,  \nCAST(lsst_g*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_G_LSST_MAG,  \nCAST(lsst_r*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_R_LSST_MAG,  \nCAST(lsst_i*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_I_LSST_MAG,  \nCAST(lsst_z*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_Z_LSST_MAG,  \nCAST(lsst_y*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_Y_LSST_MAG,  \nCAST(kids_u*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_U_KIDS_MAG,  \nCAST(kids_g*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_G_KIDS_MAG,  \nCAST(kids_r*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_R_KIDS_MAG,  \nCAST(kids_i*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_I_KIDS_MAG,  \nCAST(2mass_j*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_J_2MASS_MAG,  \nCAST(2mass_h*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_H_2MASS_MAG,  \nCAST(2mass_ks*1.e23*(1/((1 - kappa)*(1 - kappa) - gamma1*gamma1 - gamma2*gamma2))  AS float) AS TU_FNU_KS_2MASS_MAG  \nFROM cosmohub.flagship_mock_1_10_5_highz_s  \nWHERE SHIFTRIGHT(hpix_29_nest, (29-5)*2) = 2063&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
I made the following choices:&lt;br /&gt;
&lt;br /&gt;
* HALO_ID = -1 when kind = 2 or 3&lt;br /&gt;
* BULGE_FRACTION = 1 and then the disk information is not used!&lt;br /&gt;
* BULGE_NSERSIC = 1.5&lt;br /&gt;
&lt;br /&gt;
The rest of the fields that are not included in the catalog but are necessary for the FITS file format = -1; [REF_MAG_ABS, REF_MAG] = (m1450 OR abs_muv) when kind = 2 and 3, respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    SELECT `unique_id`, `kind`, `ra`, `dec`, `ra_mag`, `dec_mag`, `kappa`, `gamma1`, `gamma2`, `defl1`, `defl2`, `hpix_9_nest`, `hpix_13_nest`, `hpix_29_nest`, `step` &lt;br /&gt;
    FROM flagship_mock_1_10_5_highz_s LIMIT 2;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Aplicamos los cambios en la pipeline de high-z galaxies (.ipynb) que nos menciona Eric en el email y generamos un nuevo catálogo en formato parquet:&lt;br /&gt;
&lt;br /&gt;
    /software/astro/scripts/create_table_from_parquet.sh -p /hdfs/user/jcarrete/data/euclid/flagship_mock_1_10_7_high_z/0.pq -t jcarrete.flagship_mock_1_10_7_highz_pq -e&lt;br /&gt;
&lt;br /&gt;
    CREATE EXTERNAL TABLE jcarrete.flagship_mock_1_10_7_highz_pq (&lt;br /&gt;
        `type` STRING,&lt;br /&gt;
        `z` DOUBLE,&lt;br /&gt;
        `abs_muv` DOUBLE,&lt;br /&gt;
        `sedname` STRING,&lt;br /&gt;
        `sedname_int` BIGINT,&lt;br /&gt;
        `rhalf_kpc` DOUBLE,&lt;br /&gt;
        `rhalf_arcsec` DOUBLE,&lt;br /&gt;
        `muv` DOUBLE,&lt;br /&gt;
        `beta` DOUBLE,&lt;br /&gt;
        `r` DOUBLE,&lt;br /&gt;
        `hpix_9_nest` BIGINT,&lt;br /&gt;
        `kind` BIGINT,&lt;br /&gt;
        `step` BIGINT,&lt;br /&gt;
        `unique_id` BIGINT,&lt;br /&gt;
        `hpix_29_nest` BIGINT,&lt;br /&gt;
        `ra` DOUBLE,&lt;br /&gt;
        `dec` DOUBLE,&lt;br /&gt;
        `l` DOUBLE,&lt;br /&gt;
        `b` DOUBLE,&lt;br /&gt;
        `mw_extinction` DOUBLE,&lt;br /&gt;
        `blanco_decam_g_true` DOUBLE,&lt;br /&gt;
        `blanco_decam_g` DOUBLE,&lt;br /&gt;
        `blanco_decam_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `blanco_decam_i_true` DOUBLE,&lt;br /&gt;
        `blanco_decam_i` DOUBLE,&lt;br /&gt;
        `blanco_decam_i_odonnell_ext` DOUBLE,&lt;br /&gt;
        `blanco_decam_r_true` DOUBLE,&lt;br /&gt;
        `blanco_decam_r` DOUBLE,&lt;br /&gt;
        `blanco_decam_r_odonnell_ext` DOUBLE,&lt;br /&gt;
        `blanco_decam_z_true` DOUBLE,&lt;br /&gt;
        `blanco_decam_z` DOUBLE,&lt;br /&gt;
        `blanco_decam_z_odonnell_ext` DOUBLE,&lt;br /&gt;
        `subaru_hsc_z_true` DOUBLE,&lt;br /&gt;
        `subaru_hsc_z` DOUBLE,&lt;br /&gt;
        `subaru_hsc_z_odonnell_ext` DOUBLE,&lt;br /&gt;
        `jst_jpcam_g_true` DOUBLE,&lt;br /&gt;
        `jst_jpcam_g` DOUBLE,&lt;br /&gt;
        `jst_jpcam_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `kids_g_true` DOUBLE,&lt;br /&gt;
        `kids_g` DOUBLE,&lt;br /&gt;
        `kids_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `kids_i_true` DOUBLE,&lt;br /&gt;
        `kids_i` DOUBLE,&lt;br /&gt;
        `kids_i_odonnell_ext` DOUBLE,&lt;br /&gt;
        `kids_r_true` DOUBLE,&lt;br /&gt;
        `kids_r` DOUBLE,&lt;br /&gt;
        `kids_r_odonnell_ext` DOUBLE,&lt;br /&gt;
        `kids_u_true` DOUBLE,&lt;br /&gt;
        `kids_u` DOUBLE,&lt;br /&gt;
        `kids_u_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_g_true` DOUBLE,&lt;br /&gt;
        `lsst_g` DOUBLE,&lt;br /&gt;
        `lsst_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_i_true` DOUBLE,&lt;br /&gt;
        `lsst_i` DOUBLE,&lt;br /&gt;
        `lsst_i_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_r_true` DOUBLE,&lt;br /&gt;
        `lsst_r` DOUBLE,&lt;br /&gt;
        `lsst_r_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_u_true` DOUBLE,&lt;br /&gt;
        `lsst_u` DOUBLE,&lt;br /&gt;
        `lsst_u_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_y_true` DOUBLE,&lt;br /&gt;
        `lsst_y` DOUBLE,&lt;br /&gt;
        `lsst_y_odonnell_ext` DOUBLE,&lt;br /&gt;
        `lsst_z_true` DOUBLE,&lt;br /&gt;
        `lsst_z` DOUBLE,&lt;br /&gt;
        `lsst_z_odonnell_ext` DOUBLE,&lt;br /&gt;
        `cfht_megacam_r_true` DOUBLE,&lt;br /&gt;
        `cfht_megacam_r` DOUBLE,&lt;br /&gt;
        `cfht_megacam_r_odonnell_ext` DOUBLE,&lt;br /&gt;
        `cfht_megacam_u_true` DOUBLE,&lt;br /&gt;
        `cfht_megacam_u` DOUBLE,&lt;br /&gt;
        `cfht_megacam_u_odonnell_ext` DOUBLE,&lt;br /&gt;
        `pan_starrs_i_true` DOUBLE,&lt;br /&gt;
        `pan_starrs_i` DOUBLE,&lt;br /&gt;
        `pan_starrs_i_odonnell_ext` DOUBLE,&lt;br /&gt;
        `pan_starrs_z_true` DOUBLE,&lt;br /&gt;
        `pan_starrs_z` DOUBLE,&lt;br /&gt;
        `pan_starrs_z_odonnell_ext` DOUBLE,&lt;br /&gt;
        `2mass_h_true` DOUBLE,&lt;br /&gt;
        `2mass_h` DOUBLE,&lt;br /&gt;
        `2mass_h_odonnell_ext` DOUBLE,&lt;br /&gt;
        `2mass_j_true` DOUBLE,&lt;br /&gt;
        `2mass_j` DOUBLE,&lt;br /&gt;
        `2mass_j_odonnell_ext` DOUBLE,&lt;br /&gt;
        `2mass_ks_true` DOUBLE,&lt;br /&gt;
        `2mass_ks` DOUBLE,&lt;br /&gt;
        `2mass_ks_odonnell_ext` DOUBLE,&lt;br /&gt;
        `sdss_r01_true` DOUBLE,&lt;br /&gt;
        `sdss_r01` DOUBLE,&lt;br /&gt;
        `sdss_r01_odonnell_ext` DOUBLE,&lt;br /&gt;
        `gaia_bp_true` DOUBLE,&lt;br /&gt;
        `gaia_bp` DOUBLE,&lt;br /&gt;
        `gaia_bp_odonnell_ext` DOUBLE,&lt;br /&gt;
        `gaia_g_true` DOUBLE,&lt;br /&gt;
        `gaia_g` DOUBLE,&lt;br /&gt;
        `gaia_g_odonnell_ext` DOUBLE,&lt;br /&gt;
        `gaia_rp_true` DOUBLE,&lt;br /&gt;
        `gaia_rp` DOUBLE,&lt;br /&gt;
        `gaia_rp_odonnell_ext` DOUBLE,&lt;br /&gt;
        `euclid_nisp_h_true` DOUBLE,&lt;br /&gt;
        `euclid_nisp_h` DOUBLE,&lt;br /&gt;
        `euclid_nisp_h_odonnell_ext` DOUBLE,&lt;br /&gt;
        `euclid_nisp_j_true` DOUBLE,&lt;br /&gt;
        `euclid_nisp_j` DOUBLE,&lt;br /&gt;
        `euclid_nisp_j_odonnell_ext` DOUBLE,&lt;br /&gt;
        `euclid_nisp_y_true` DOUBLE,&lt;br /&gt;
        `euclid_nisp_y` DOUBLE,&lt;br /&gt;
        `euclid_nisp_y_odonnell_ext` DOUBLE,&lt;br /&gt;
        `euclid_vis_true` DOUBLE,&lt;br /&gt;
        `euclid_vis` DOUBLE,&lt;br /&gt;
        `euclid_vis_odonnell_ext` DOUBLE,&lt;br /&gt;
        `bulge_fraction` DOUBLE,&lt;br /&gt;
        `bulge_nsersic` DOUBLE,&lt;br /&gt;
        `bulge_ellipticity` DOUBLE,&lt;br /&gt;
        `bulge_axis_ratio` DOUBLE,&lt;br /&gt;
        `disk_angle` DOUBLE,&lt;br /&gt;
        `id` BIGINT&lt;br /&gt;
    )&lt;br /&gt;
    STORED AS PARQUET&lt;br /&gt;
    LOCATION '/user/jcarrete/data/euclid/flagship_mock_1_10_7_high_z'&lt;br /&gt;
    ;&lt;br /&gt;
&lt;br /&gt;
Clusterizo:&lt;br /&gt;
&lt;br /&gt;
    CREATE TABLE cosmohub.flagship_mock_1_10_7_highz_c (&lt;br /&gt;
        `unique_id` BIGINT COMMENT 'unique identifier',&lt;br /&gt;
        `id` INT COMMENT 'ID',&lt;br /&gt;
        `kind` tinyint COMMENT 'Galaxy type: 0: CENTRAL, 1: SATELLITE, 2: QSO, 3: HIGH REDSHIFT',&lt;br /&gt;
        `z` FLOAT,&lt;br /&gt;
        `ra` FLOAT,&lt;br /&gt;
        `dec` FLOAT,&lt;br /&gt;
        `l` FLOAT,&lt;br /&gt;
        `b` FLOAT,&lt;br /&gt;
        `mw_extinction` FLOAT,&lt;br /&gt;
        `abs_muv` FLOAT,&lt;br /&gt;
        `sedname` STRING,&lt;br /&gt;
        `sedname_int` BIGINT,&lt;br /&gt;
        `rhalf_kpc` FLOAT,&lt;br /&gt;
        `rhalf_arcsec` FLOAT,&lt;br /&gt;
        `muv` FLOAT,&lt;br /&gt;
        `beta` FLOAT,&lt;br /&gt;
        `hpix_9_nest` INT,&lt;br /&gt;
        `hpix_13_nest` INT,&lt;br /&gt;
        `hpix_29_nest` BIGINT,&lt;br /&gt;
        `blanco_decam_g_true` FLOAT,&lt;br /&gt;
        `blanco_decam_g` FLOAT,&lt;br /&gt;
        `blanco_decam_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `blanco_decam_i_true` FLOAT,&lt;br /&gt;
        `blanco_decam_i` FLOAT,&lt;br /&gt;
        `blanco_decam_i_odonnell_ext` FLOAT,&lt;br /&gt;
        `blanco_decam_r_true` FLOAT,&lt;br /&gt;
        `blanco_decam_r` FLOAT,&lt;br /&gt;
        `blanco_decam_r_odonnell_ext` FLOAT,&lt;br /&gt;
        `blanco_decam_z_true` FLOAT,&lt;br /&gt;
        `blanco_decam_z` FLOAT,&lt;br /&gt;
        `blanco_decam_z_odonnell_ext` FLOAT,&lt;br /&gt;
        `subaru_hsc_z_true` FLOAT,&lt;br /&gt;
        `subaru_hsc_z` FLOAT,&lt;br /&gt;
        `subaru_hsc_z_odonnell_ext` FLOAT,&lt;br /&gt;
        `jst_jpcam_g_true` FLOAT,&lt;br /&gt;
        `jst_jpcam_g` FLOAT,&lt;br /&gt;
        `jst_jpcam_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `kids_g_true` FLOAT,&lt;br /&gt;
        `kids_g` FLOAT,&lt;br /&gt;
        `kids_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `kids_i_true` FLOAT,&lt;br /&gt;
        `kids_i` FLOAT,&lt;br /&gt;
        `kids_i_odonnell_ext` FLOAT,&lt;br /&gt;
        `kids_r_true` FLOAT,&lt;br /&gt;
        `kids_r` FLOAT,&lt;br /&gt;
        `kids_r_odonnell_ext` FLOAT,&lt;br /&gt;
        `kids_u_true` FLOAT,&lt;br /&gt;
        `kids_u` FLOAT,&lt;br /&gt;
        `kids_u_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_g_true` FLOAT,&lt;br /&gt;
        `lsst_g` FLOAT,&lt;br /&gt;
        `lsst_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_i_true` FLOAT,&lt;br /&gt;
        `lsst_i` FLOAT,&lt;br /&gt;
        `lsst_i_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_r_true` FLOAT,&lt;br /&gt;
        `lsst_r` FLOAT,&lt;br /&gt;
        `lsst_r_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_u_true` FLOAT,&lt;br /&gt;
        `lsst_u` FLOAT,&lt;br /&gt;
        `lsst_u_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_y_true` FLOAT,&lt;br /&gt;
        `lsst_y` FLOAT,&lt;br /&gt;
        `lsst_y_odonnell_ext` FLOAT,&lt;br /&gt;
        `lsst_z_true` FLOAT,&lt;br /&gt;
        `lsst_z` FLOAT,&lt;br /&gt;
        `lsst_z_odonnell_ext` FLOAT,&lt;br /&gt;
        `cfht_megacam_r_true` FLOAT,&lt;br /&gt;
        `cfht_megacam_r` FLOAT,&lt;br /&gt;
        `cfht_megacam_r_odonnell_ext` FLOAT,&lt;br /&gt;
        `cfht_megacam_u_true` FLOAT,&lt;br /&gt;
        `cfht_megacam_u` FLOAT,&lt;br /&gt;
        `cfht_megacam_u_odonnell_ext` FLOAT,&lt;br /&gt;
        `pan_starrs_i_true` FLOAT,&lt;br /&gt;
        `pan_starrs_i` FLOAT,&lt;br /&gt;
        `pan_starrs_i_odonnell_ext` FLOAT,&lt;br /&gt;
        `pan_starrs_z_true` FLOAT,&lt;br /&gt;
        `pan_starrs_z` FLOAT,&lt;br /&gt;
        `pan_starrs_z_odonnell_ext` FLOAT,&lt;br /&gt;
        `2mass_h_true` FLOAT,&lt;br /&gt;
        `2mass_h` FLOAT,&lt;br /&gt;
        `2mass_h_odonnell_ext` FLOAT,&lt;br /&gt;
        `2mass_j_true` FLOAT,&lt;br /&gt;
        `2mass_j` FLOAT,&lt;br /&gt;
        `2mass_j_odonnell_ext` FLOAT,&lt;br /&gt;
        `2mass_ks_true` FLOAT,&lt;br /&gt;
        `2mass_ks` FLOAT,&lt;br /&gt;
        `2mass_ks_odonnell_ext` FLOAT,&lt;br /&gt;
        `sdss_r01_true` FLOAT,&lt;br /&gt;
        `sdss_r01` FLOAT,&lt;br /&gt;
        `sdss_r01_odonnell_ext` FLOAT,&lt;br /&gt;
        `gaia_bp_true` FLOAT,&lt;br /&gt;
        `gaia_bp` FLOAT,&lt;br /&gt;
        `gaia_bp_odonnell_ext` FLOAT,&lt;br /&gt;
        `gaia_g_true` FLOAT,&lt;br /&gt;
        `gaia_g` FLOAT,&lt;br /&gt;
        `gaia_g_odonnell_ext` FLOAT,&lt;br /&gt;
        `gaia_rp_true` FLOAT,&lt;br /&gt;
        `gaia_rp` FLOAT,&lt;br /&gt;
        `gaia_rp_odonnell_ext` FLOAT,&lt;br /&gt;
        `euclid_nisp_h_true` FLOAT,&lt;br /&gt;
        `euclid_nisp_h` FLOAT,&lt;br /&gt;
        `euclid_nisp_h_odonnell_ext` FLOAT,&lt;br /&gt;
        `euclid_nisp_j_true` FLOAT,&lt;br /&gt;
        `euclid_nisp_j` FLOAT,&lt;br /&gt;
        `euclid_nisp_j_odonnell_ext` FLOAT,&lt;br /&gt;
        `euclid_nisp_y_true` FLOAT,&lt;br /&gt;
        `euclid_nisp_y` FLOAT,&lt;br /&gt;
        `euclid_nisp_y_odonnell_ext` FLOAT,&lt;br /&gt;
        `euclid_vis_true` FLOAT,&lt;br /&gt;
        `euclid_vis` FLOAT,&lt;br /&gt;
        `euclid_vis_odonnell_ext` FLOAT,&lt;br /&gt;
        `bulge_fraction` FLOAT,&lt;br /&gt;
        `bulge_nsersic` FLOAT,&lt;br /&gt;
        `bulge_ellipticity` FLOAT,&lt;br /&gt;
        `bulge_axis_ratio` FLOAT,&lt;br /&gt;
        `disk_angle` FLOAT,&lt;br /&gt;
        `step` smallint COMMENT 'redshift step number'&lt;br /&gt;
    )&lt;br /&gt;
    CLUSTERED BY (&lt;br /&gt;
      step,&lt;br /&gt;
      hpix_13_nest)&lt;br /&gt;
    SORTED BY (&lt;br /&gt;
      step ASC,&lt;br /&gt;
      hpix_13_nest ASC)&lt;br /&gt;
    INTO 4096 BUCKETS&lt;br /&gt;
    STORED AS ORC&lt;br /&gt;
    ;&lt;br /&gt;
&lt;br /&gt;
    INSERT OVERWRITE TABLE cosmohub.flagship_mock_1_10_7_highz_c&lt;br /&gt;
    SELECT `unique_id`, `id`, `kind`, `z`, `ra`, `dec`, `l`, `b`, `mw_extinction`, `abs_muv`, `sedname`, `sedname_int`, `rhalf_kpc`, `rhalf_arcsec`, `muv`, `beta`, `hpix_9_nest`, SHIFTRIGHT(hpix_29_nest, (29-13)*2), `hpix_29_nest`, `blanco_decam_g_true`, `blanco_decam_g`, `blanco_decam_g_odonnell_ext`, `blanco_decam_i_true`, `blanco_decam_i`, `blanco_decam_i_odonnell_ext`, `blanco_decam_r_true`, `blanco_decam_r`, `blanco_decam_r_odonnell_ext`, `blanco_decam_z_true`, `blanco_decam_z`, `blanco_decam_z_odonnell_ext`, `subaru_hsc_z_true`, `subaru_hsc_z`, `subaru_hsc_z_odonnell_ext`, `jst_jpcam_g_true`, `jst_jpcam_g`, `jst_jpcam_g_odonnell_ext`, `kids_g_true`, `kids_g`, `kids_g_odonnell_ext`, `kids_i_true`, `kids_i`, `kids_i_odonnell_ext`, `kids_r_true`, `kids_r`, `kids_r_odonnell_ext`, `kids_u_true`, `kids_u`, `kids_u_odonnell_ext`, `lsst_g_true`, `lsst_g`, `lsst_g_odonnell_ext`, `lsst_i_true`, `lsst_i`, `lsst_i_odonnell_ext`, `lsst_r_true`, `lsst_r`, `lsst_r_odonnell_ext`, `lsst_u_true`, `lsst_u`, `lsst_u_odonnell_ext`, `lsst_y_true`, `lsst_y`, `lsst_y_odonnell_ext`, `lsst_z_true`, `lsst_z`, `lsst_z_odonnell_ext`, `cfht_megacam_r_true`, `cfht_megacam_r`, `cfht_megacam_r_odonnell_ext`, `cfht_megacam_u_true`, `cfht_megacam_u`, `cfht_megacam_u_odonnell_ext`, `pan_starrs_i_true`, `pan_starrs_i`, `pan_starrs_i_odonnell_ext`, `pan_starrs_z_true`, `pan_starrs_z`, `pan_starrs_z_odonnell_ext`, `2mass_h_true`, `2mass_h`, `2mass_h_odonnell_ext`, `2mass_j_true`, `2mass_j`, `2mass_j_odonnell_ext`, `2mass_ks_true`, `2mass_ks`, `2mass_ks_odonnell_ext`, `sdss_r01_true`, `sdss_r01`, `sdss_r01_odonnell_ext`, `gaia_bp_true`, `gaia_bp`, `gaia_bp_odonnell_ext`, `gaia_g_true`, `gaia_g`, `gaia_g_odonnell_ext`, `gaia_rp_true`, `gaia_rp`, `gaia_rp_odonnell_ext`, `euclid_nisp_h_true`, `euclid_nisp_h`, `euclid_nisp_h_odonnell_ext`, `euclid_nisp_j_true`, `euclid_nisp_j`, `euclid_nisp_j_odonnell_ext`, `euclid_nisp_y_true`, `euclid_nisp_y`, `euclid_nisp_y_odonnell_ext`, `euclid_vis_true`, `euclid_vis`, `euclid_vis_odonnell_ext`, `bulge_fraction`, `bulge_nsersic`, `bulge_ellipticity`, `bulge_axis_ratio`, `disk_angle`, `step`&lt;br /&gt;
    FROM jcarrete.flagship_mock_1_10_7_highz_pq;&lt;br /&gt;
&lt;br /&gt;
    ANALYZE TABLE cosmohub.flagship_mock_1_10_7_highz_c COMPUTE STATISTICS FOR COLUMNS;&lt;br /&gt;
&lt;br /&gt;
Añado el lensing:&lt;br /&gt;
&lt;br /&gt;
    CREATE TABLE cosmohub.flagship_mock_1_10_7_highz_s (&lt;br /&gt;
        `unique_id` BIGINT COMMENT 'unique identifier',&lt;br /&gt;
        `id` INT COMMENT 'ID',&lt;br /&gt;
        `kind` tinyint COMMENT 'Galaxy type: 0: CENTRAL, 1: SATELLITE, 2: QSO, 3: HIGH REDSHIFT',&lt;br /&gt;
        `z` float COMMENT 'true galaxy redshift',&lt;br /&gt;
        `ra` FLOAT COMMENT 'galaxy right ascension (degrees)',&lt;br /&gt;
        `dec` FLOAT COMMENT 'galaxy declination (degrees)',&lt;br /&gt;
        `ra_mag` float COMMENT 'galaxy magnified right ascension (degree)', &lt;br /&gt;
        `dec_mag` float COMMENT 'galaxy magnified declination (degree)', &lt;br /&gt;
        `kappa` float COMMENT 'convergence', &lt;br /&gt;
        `gamma1` float COMMENT 'shear', &lt;br /&gt;
        `gamma2` float COMMENT 'shear',&lt;br /&gt;
        `defl1` float COMMENT 'deflection1',&lt;br /&gt;
        `defl2` float COMMENT 'deflection2',&lt;br /&gt;
        `l` FLOAT COMMENT 'galactic longitude (degrees)',&lt;br /&gt;
        `b` FLOAT COMMENT 'galactic latitude (degrees)',&lt;br /&gt;
        `mw_extinction` float COMMENT 'EBV from file: HFI_CompMap_ThermalDustModel_2048_R1.20.fits',&lt;br /&gt;
        `abs_muv` FLOAT COMMENT 'absolute magnitude at 1500 angstroms',&lt;br /&gt;
        `sedname` STRING COMMENT 'Spectral Energy Distribution name (among 76, 38 without UV lines, 38 with UV lines, corresponding to a given UV slope)',&lt;br /&gt;
        `sedname_int` BIGINT COMMENT 'sedname as integer (from 0 to 75, from 0 to 37 without UV lines, from 38 to 75 with UV lines)',&lt;br /&gt;
        `rhalf_kpc` FLOAT COMMENT 'half light radius (in physical kpc)',&lt;br /&gt;
        `rhalf_arcsec` FLOAT COMMENT 'half light radius (in arcsec)',&lt;br /&gt;
        `muv` FLOAT COMMENT 'for information only, observed magnitude at rest-frame 1500',&lt;br /&gt;
        `beta` FLOAT COMMENT 'for information only, used to assign an SED',&lt;br /&gt;
        `hpix_9_nest` int COMMENT 'healpix pixel id using order = 9 in NESTED format',&lt;br /&gt;
        `hpix_13_nest` int COMMENT 'healpix pixel id using order = 13 in NESTED format',&lt;br /&gt;
        `hpix_29_nest` bigint COMMENT 'healpix pixel id using order = 29 in NESTED format',&lt;br /&gt;
      `blanco_decam_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in DES g-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_g` float COMMENT 'Interpolated observed flux in DES g-band (Euclid provided)',&lt;br /&gt;
      `blanco_decam_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in DES g-band (Euclid provided)',&lt;br /&gt;
      `blanco_decam_i_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in DES i-band (Euclid provided)',  &lt;br /&gt;
      `blanco_decam_i` float COMMENT 'Interpolated observed flux in DES i-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_i_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in DES i-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_r_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in DES r-band (Euclid provided)',  &lt;br /&gt;
      `blanco_decam_r` float COMMENT 'Interpolated observed flux in DES r-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_r_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in DES r-band (Euclid provided)',  &lt;br /&gt;
      `blanco_decam_z_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in DES z-band (Euclid provided)', &lt;br /&gt;
      `blanco_decam_z` float COMMENT 'Interpolated observed flux in DES z-band (Euclid provided)',&lt;br /&gt;
      `blanco_decam_z_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in DES z-band (Euclid provided)', &lt;br /&gt;
      `subaru_hsc_z_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in HYPER SUPRIME CAMERA SUBARU z-band (Euclid provided)',&lt;br /&gt;
      `subaru_hsc_z` float COMMENT 'Interpolated observed flux in HYPER SUPRIME CAMERA SUBARU z-band (Euclid provided)',&lt;br /&gt;
      `subaru_hsc_z_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in HYPER SUPRIME CAMERA SUBARU z-band (Euclid provided)',&lt;br /&gt;
      `jst_jpcam_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in JST g-band (Euclid provided)', &lt;br /&gt;
      `jst_jpcam_g` float COMMENT 'Interpolated observed flux in JST g-band (Euclid provided)',&lt;br /&gt;
      `jst_jpcam_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in JST g-band (Euclid provided)',&lt;br /&gt;
      `kids_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in KIDS g-band (Euclid provided)', &lt;br /&gt;
      `kids_g` float COMMENT 'Interpolated observed flux in KIDS g-band (Euclid provided)',&lt;br /&gt;
      `kids_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in KIDS g-band (Euclid provided)',&lt;br /&gt;
      `kids_i_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in KIDS i-band (Euclid provided)', &lt;br /&gt;
      `kids_i` float COMMENT 'Interpolated observed flux in KIDS i-band (Euclid provided)',&lt;br /&gt;
      `kids_i_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in KIDS i-band (Euclid provided)', &lt;br /&gt;
      `kids_r_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in KIDS r-band (Euclid provided)', &lt;br /&gt;
      `kids_r` float COMMENT 'Interpolated observed flux in KIDS r-band (Euclid provided)',&lt;br /&gt;
      `kids_r_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in KIDS r-band (Euclid provided)',&lt;br /&gt;
      `kids_u_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in KIDS u-band (Euclid provided)', &lt;br /&gt;
      `kids_u` float COMMENT 'Interpolated observed flux in KIDS u-band (Euclid provided)',&lt;br /&gt;
      `kids_u_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in KIDS u-band (Euclid provided)',&lt;br /&gt;
      `lsst_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST g-band (Euclid provided)', &lt;br /&gt;
      `lsst_g` float COMMENT 'Interpolated observed flux in LSST g-band (Euclid provided)',&lt;br /&gt;
      `lsst_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST g-band (Euclid provided)',&lt;br /&gt;
      `lsst_i_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST i-band (Euclid provided)', &lt;br /&gt;
      `lsst_i` float COMMENT 'Interpolated observed flux in LSST i-band (Euclid provided)',&lt;br /&gt;
      `lsst_i_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST i-band (Euclid provided)',&lt;br /&gt;
      `lsst_r_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST r-band (Euclid provided)', &lt;br /&gt;
      `lsst_r` float COMMENT 'Interpolated observed flux in LSST r-band (Euclid provided)',&lt;br /&gt;
      `lsst_r_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST r-band (Euclid provided)',&lt;br /&gt;
      `lsst_u_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST u-band (Euclid provided)', &lt;br /&gt;
      `lsst_u` float COMMENT 'Interpolated observed flux in LSST u-band (Euclid provided)',&lt;br /&gt;
      `lsst_u_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST u-band (Euclid provided)',&lt;br /&gt;
      `lsst_y_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST y-band (Euclid provided)', &lt;br /&gt;
      `lsst_y` float COMMENT 'Interpolated observed flux in LSST y-band (Euclid provided)',&lt;br /&gt;
      `lsst_y_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST y-band (Euclid provided)',&lt;br /&gt;
      `lsst_z_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in LSST z-band (Euclid provided)', &lt;br /&gt;
      `lsst_z` float COMMENT 'Interpolated observed flux in LSST z-band (Euclid provided)',&lt;br /&gt;
      `lsst_z_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in LSST z-band (Euclid provided)',&lt;br /&gt;
      `cfht_megacam_r_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in CFHT r-band (Euclid provided)', &lt;br /&gt;
      `cfht_megacam_r` float COMMENT 'Interpolated observed flux in CFHT r-band (Euclid provided)',&lt;br /&gt;
      `cfht_megacam_r_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in CFHT r-band (Euclid provided)',&lt;br /&gt;
      `cfht_megacam_u_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in CFHT u-band (Euclid provided)', &lt;br /&gt;
      `cfht_megacam_u` float COMMENT 'Interpolated observed flux in CFHT u-band (Euclid provided)',&lt;br /&gt;
      `cfht_megacam_u_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in CFHT u-band (Euclid provided)',&lt;br /&gt;
      `pan_starrs_i_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Pan-STARRS i-band (Euclid provided)',  &lt;br /&gt;
      `pan_starrs_i` float COMMENT 'Interpolated observed flux in Pan-STARRS i-band (Euclid provided)',&lt;br /&gt;
      `pan_starrs_i_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Pan-STARRS i-band (Euclid provided)',&lt;br /&gt;
      `pan_starrs_z_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Pan-STARRS z-band (Euclid provided)', &lt;br /&gt;
      `pan_starrs_z` float COMMENT 'Interpolated observed flux in Pan-STARRS z-band (Euclid provided)',&lt;br /&gt;
      `pan_starrs_z_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Pan-STARRS z-band (Euclid provided)',&lt;br /&gt;
      `2mass_h_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in 2MASS H-band (Euclid provided)', &lt;br /&gt;
      `2mass_h` float COMMENT 'Interpolated observed flux in 2MASS H-band (Euclid provided)',&lt;br /&gt;
      `2mass_h_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in 2MASS H-band (Euclid provided)',&lt;br /&gt;
      `2mass_j_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in 2MASS J-band (Euclid provided)', &lt;br /&gt;
      `2mass_j` float COMMENT 'Interpolated observed flux in 2MASS J-band (Euclid provided)',&lt;br /&gt;
      `2mass_j_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in 2MASS J-band (Euclid provided)',&lt;br /&gt;
      `2mass_ks_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in 2MASS Ks-band (Euclid provided)', &lt;br /&gt;
      `2mass_ks` float COMMENT 'Interpolated observed flux in 2MASS Ks-band (Euclid provided)',&lt;br /&gt;
      `2mass_ks_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in 2MASS Ks-band (Euclid provided)',&lt;br /&gt;
      `sdss_r01_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in sdss r-band redshifted to z=0.1 (Euclid provided)', &lt;br /&gt;
      `sdss_r01` float COMMENT 'Interpolated observed flux in sdss r-band redshifted to z=0.1 (Euclid provided)',&lt;br /&gt;
      `sdss_r01_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in sdss r-band redshifted to z=0.1 (Euclid provided)',&lt;br /&gt;
      `gaia_bp_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Gaia-BP band (Euclid provided)', &lt;br /&gt;
      `gaia_bp` float COMMENT 'Interpolated observed flux in Gaia-BP band (Euclid provided)',&lt;br /&gt;
      `gaia_bp_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Gaia-BP band (Euclid provided)',&lt;br /&gt;
      `gaia_g_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Gaia-G band (Euclid provided)', &lt;br /&gt;
      `gaia_g` float COMMENT 'Interpolated observed flux in Gaia-G band (Euclid provided)',&lt;br /&gt;
      `gaia_g_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Gaia-G band (Euclid provided)', &lt;br /&gt;
      `gaia_rp_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Gaia-RP band (Euclid provided)', &lt;br /&gt;
      `gaia_rp` float COMMENT 'Interpolated observed flux in Gaia-RP band (Euclid provided)',&lt;br /&gt;
      `gaia_rp_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Gaia-RP band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_h_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Euclid NISP-H band (Euclid provided)', &lt;br /&gt;
      `euclid_nisp_h` float COMMENT 'Interpolated observed flux in Euclid NISP-H band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_h_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Euclid NISP-H band (Euclid provided)', &lt;br /&gt;
      `euclid_nisp_j_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Euclid NISP-J band (Euclid provided)', &lt;br /&gt;
      `euclid_nisp_j` float COMMENT 'Interpolated observed flux in Euclid NISP-J band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_j_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Euclid NISP-J band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_y_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Euclid NISP-Y band (Euclid provided)', &lt;br /&gt;
      `euclid_nisp_y` float COMMENT 'Interpolated observed flux in Euclid NISP-Y band (Euclid provided)',&lt;br /&gt;
      `euclid_nisp_y_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Euclid NISP-Y band (Euclid provided)', &lt;br /&gt;
      `euclid_vis_true` float COMMENT 'Integrated observed flux including (properly) MW extinction in Euclid VIS band (Euclid provided)', &lt;br /&gt;
      `euclid_vis` float COMMENT 'Interpolated observed flux in Euclid VIS band (Euclid provided)',&lt;br /&gt;
      `euclid_vis_odonnell_ext` float COMMENT 'Interpolated observed flux including MW extinction in Euclid VIS band (Euclid provided)',&lt;br /&gt;
        `bulge_fraction` FLOAT COMMENT 'ratio of the flux in the bulge component to the total flux (often written B/T)',&lt;br /&gt;
        `bulge_nsersic` FLOAT COMMENT 'Sersic index of the bulge component',&lt;br /&gt;
        `bulge_ellipticity` FLOAT COMMENT 'ellipticity of the bulge defined as  bulge_ellipticity = (1 - bulge_axis_ratio) / (1 + bulge_axis_ratio)', &lt;br /&gt;
        `bulge_axis_ratio` FLOAT COMMENT 'disk projected axis ratio defined as b/a (b: semi-minor axis, a: semi-major axis)', &lt;br /&gt;
        `disk_angle` FLOAT COMMENT 'position of the disk rotation axis (degrees). TU Galaxy stamps convention for OU-SIM: the standard is to set the position angle from North to East, with the major axis aligned in Declination',&lt;br /&gt;
      `step` smallint COMMENT 'redshift step number'&lt;br /&gt;
    )&lt;br /&gt;
    CLUSTERED BY (&lt;br /&gt;
      step,&lt;br /&gt;
      hpix_13_nest)&lt;br /&gt;
    SORTED BY (&lt;br /&gt;
      step ASC,&lt;br /&gt;
      hpix_13_nest ASC)&lt;br /&gt;
    INTO 4096 BUCKETS&lt;br /&gt;
    STORED AS ORC&lt;br /&gt;
    ;&lt;br /&gt;
&lt;br /&gt;
    SET hive.auto.convert.join.noconditionaltask.size=1000;&lt;br /&gt;
&lt;br /&gt;
    INSERT OVERWRITE TABLE cosmohub.flagship_mock_1_10_7_highz_s&lt;br /&gt;
    SELECT &lt;br /&gt;
    `unique_id`, `id`, `kind`, `z`, `ra`, `dec`, mag_pos.ra_mag, mag_pos.dec_mag, kappa, gamma1, gamma2, defl1, defl2, `l`, `b`, `mw_extinction`, `abs_muv`, `sedname`, `sedname_int`, `rhalf_kpc`, `rhalf_arcsec`, `muv`, `beta`, `hpix_9_nest`, `hpix_13_nest`, `hpix_29_nest`, `blanco_decam_g_true`, `blanco_decam_g`, `blanco_decam_g_odonnell_ext`, `blanco_decam_i_true`, `blanco_decam_i`, `blanco_decam_i_odonnell_ext`, `blanco_decam_r_true`, `blanco_decam_r`, `blanco_decam_r_odonnell_ext`, `blanco_decam_z_true`, `blanco_decam_z`, `blanco_decam_z_odonnell_ext`, `subaru_hsc_z_true`, `subaru_hsc_z`, `subaru_hsc_z_odonnell_ext`, `jst_jpcam_g_true`, `jst_jpcam_g`, `jst_jpcam_g_odonnell_ext`, `kids_g_true`, `kids_g`, `kids_g_odonnell_ext`, `kids_i_true`, `kids_i`, `kids_i_odonnell_ext`, `kids_r_true`, `kids_r`, `kids_r_odonnell_ext`, `kids_u_true`, `kids_u`, `kids_u_odonnell_ext`, `lsst_g_true`, `lsst_g`, `lsst_g_odonnell_ext`, `lsst_i_true`, `lsst_i`, `lsst_i_odonnell_ext`, `lsst_r_true`, `lsst_r`, `lsst_r_odonnell_ext`, `lsst_u_true`, `lsst_u`, `lsst_u_odonnell_ext`, `lsst_y_true`, `lsst_y`, `lsst_y_odonnell_ext`, `lsst_z_true`, `lsst_z`, `lsst_z_odonnell_ext`, `cfht_megacam_r_true`, `cfht_megacam_r`, `cfht_megacam_r_odonnell_ext`, `cfht_megacam_u_true`, `cfht_megacam_u`, `cfht_megacam_u_odonnell_ext`, `pan_starrs_i_true`, `pan_starrs_i`, `pan_starrs_i_odonnell_ext`, `pan_starrs_z_true`, `pan_starrs_z`, `pan_starrs_z_odonnell_ext`, `2mass_h_true`, `2mass_h`, `2mass_h_odonnell_ext`, `2mass_j_true`, `2mass_j`, `2mass_j_odonnell_ext`, `2mass_ks_true`, `2mass_ks`, `2mass_ks_odonnell_ext`, `sdss_r01_true`, `sdss_r01`, `sdss_r01_odonnell_ext`, `gaia_bp_true`, `gaia_bp`, `gaia_bp_odonnell_ext`, `gaia_g_true`, `gaia_g`, `gaia_g_odonnell_ext`, `gaia_rp_true`, `gaia_rp`, `gaia_rp_odonnell_ext`, `euclid_nisp_h_true`, `euclid_nisp_h`, `euclid_nisp_h_odonnell_ext`, `euclid_nisp_j_true`, `euclid_nisp_j`, `euclid_nisp_j_odonnell_ext`, `euclid_nisp_y_true`, `euclid_nisp_y`, `euclid_nisp_y_odonnell_ext`, `euclid_vis_true`, `euclid_vis`, `euclid_vis_odonnell_ext`, `bulge_fraction`, `bulge_nsersic`, `bulge_ellipticity`, `bulge_axis_ratio`, `disk_angle`, `step`&lt;br /&gt;
    FROM&lt;br /&gt;
    (SELECT &lt;br /&gt;
    `unique_id`, `id`, `kind`, `z`, `ra`, `dec`, udf.magnified_positions(CAST(ra AS DOUBLE), CAST(`dec` AS DOUBLE), CAST(l.defl1 AS DOUBLE), CAST(l.defl2 AS DOUBLE)) as mag_pos, l.kappa, l.gamma1, l.gamma2, l.defl1, l.defl2, `l`, `b`, `mw_extinction`, `abs_muv`, `sedname`, `sedname_int`, `rhalf_kpc`, `rhalf_arcsec`, `muv`, `beta`, `hpix_9_nest`, l.hpix_13_nest, `hpix_29_nest`, `blanco_decam_g_true`, `blanco_decam_g`, `blanco_decam_g_odonnell_ext`, `blanco_decam_i_true`, `blanco_decam_i`, `blanco_decam_i_odonnell_ext`, `blanco_decam_r_true`, `blanco_decam_r`, `blanco_decam_r_odonnell_ext`, `blanco_decam_z_true`, `blanco_decam_z`, `blanco_decam_z_odonnell_ext`, `subaru_hsc_z_true`, `subaru_hsc_z`, `subaru_hsc_z_odonnell_ext`, `jst_jpcam_g_true`, `jst_jpcam_g`, `jst_jpcam_g_odonnell_ext`, `kids_g_true`, `kids_g`, `kids_g_odonnell_ext`, `kids_i_true`, `kids_i`, `kids_i_odonnell_ext`, `kids_r_true`, `kids_r`, `kids_r_odonnell_ext`, `kids_u_true`, `kids_u`, `kids_u_odonnell_ext`, `lsst_g_true`, `lsst_g`, `lsst_g_odonnell_ext`, `lsst_i_true`, `lsst_i`, `lsst_i_odonnell_ext`, `lsst_r_true`, `lsst_r`, `lsst_r_odonnell_ext`, `lsst_u_true`, `lsst_u`, `lsst_u_odonnell_ext`, `lsst_y_true`, `lsst_y`, `lsst_y_odonnell_ext`, `lsst_z_true`, `lsst_z`, `lsst_z_odonnell_ext`, `cfht_megacam_r_true`, `cfht_megacam_r`, `cfht_megacam_r_odonnell_ext`, `cfht_megacam_u_true`, `cfht_megacam_u`, `cfht_megacam_u_odonnell_ext`, `pan_starrs_i_true`, `pan_starrs_i`, `pan_starrs_i_odonnell_ext`, `pan_starrs_z_true`, `pan_starrs_z`, `pan_starrs_z_odonnell_ext`, `2mass_h_true`, `2mass_h`, `2mass_h_odonnell_ext`, `2mass_j_true`, `2mass_j`, `2mass_j_odonnell_ext`, `2mass_ks_true`, `2mass_ks`, `2mass_ks_odonnell_ext`, `sdss_r01_true`, `sdss_r01`, `sdss_r01_odonnell_ext`, `gaia_bp_true`, `gaia_bp`, `gaia_bp_odonnell_ext`, `gaia_g_true`, `gaia_g`, `gaia_g_odonnell_ext`, `gaia_rp_true`, `gaia_rp`, `gaia_rp_odonnell_ext`, `euclid_nisp_h_true`, `euclid_nisp_h`, `euclid_nisp_h_odonnell_ext`, `euclid_nisp_j_true`, `euclid_nisp_j`, `euclid_nisp_j_odonnell_ext`, `euclid_nisp_y_true`, `euclid_nisp_y`, `euclid_nisp_y_odonnell_ext`, `euclid_vis_true`, `euclid_vis`, `euclid_vis_odonnell_ext`, `bulge_fraction`, `bulge_nsersic`, `bulge_ellipticity`, `bulge_axis_ratio`, `disk_angle`, l.step&lt;br /&gt;
    FROM cosmohub.flagship_mock_1_10_7_highz_c as m&lt;br /&gt;
    JOIN cosmohub.flagship_lensing2 as l&lt;br /&gt;
    ON m.step = l.step&lt;br /&gt;
    AND m.hpix_13_nest = l.hpix_13_nest) as t;&lt;br /&gt;
&lt;br /&gt;
    ANALYZE TABLE cosmohub.flagship_mock_1_10_7_highz_s COMPUTE STATISTICS FOR COLUMNS;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Gaia_EDR3&amp;diff=885</id>
		<title>Gaia EDR3</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Gaia_EDR3&amp;diff=885"/>
		<updated>2020-12-03T17:40:35Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Raw data ==&lt;br /&gt;
&lt;br /&gt;
Mirrored to cephfs using lftp:&lt;br /&gt;
&lt;br /&gt;
    mirror -r -v -c -P4 http://cdn.gea.esac.esa.int/Gaia/gedr3/gaia_source/ /cephfs/pic.es/astro/scratch/tallada/gaia_edr3&lt;br /&gt;
&lt;br /&gt;
== External table ==&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE tallada.gaia_edr3_csv (&lt;br /&gt;
     solution_id bigint,&lt;br /&gt;
     designation string,&lt;br /&gt;
     source_id bigint,&lt;br /&gt;
     random_index bigint,&lt;br /&gt;
     ref_epoch float,&lt;br /&gt;
     ra double,&lt;br /&gt;
     ra_error float,&lt;br /&gt;
     `dec` double,&lt;br /&gt;
     dec_error float,&lt;br /&gt;
     parallax double,&lt;br /&gt;
     parallax_error float,&lt;br /&gt;
     parallax_over_error float,&lt;br /&gt;
     pm float,&lt;br /&gt;
     pmra double,&lt;br /&gt;
     pmra_error float,&lt;br /&gt;
     pmdec double,&lt;br /&gt;
     pmdec_error float,&lt;br /&gt;
     ra_dec_corr float,&lt;br /&gt;
     ra_parallax_corr float,&lt;br /&gt;
     ra_pmra_corr float,&lt;br /&gt;
     ra_pmdec_corr float,&lt;br /&gt;
     dec_parallax_corr float,&lt;br /&gt;
     dec_pmra_corr float,&lt;br /&gt;
     dec_pmdec_corr float,&lt;br /&gt;
     parallax_pmra_corr float,&lt;br /&gt;
     parallax_pmdec_corr float,&lt;br /&gt;
     pmra_pmdec_corr float,&lt;br /&gt;
     astrometric_n_obs_al smallint,&lt;br /&gt;
     astrometric_n_obs_ac smallint,&lt;br /&gt;
     astrometric_n_good_obs_al smallint,&lt;br /&gt;
     astrometric_n_bad_obs_al smallint,&lt;br /&gt;
     astrometric_gof_al float,&lt;br /&gt;
     astrometric_chi2_al float,&lt;br /&gt;
     astrometric_excess_noise float,&lt;br /&gt;
     astrometric_excess_noise_sig float,&lt;br /&gt;
     astrometric_params_solved tinyint,&lt;br /&gt;
     astrometric_primary_flag boolean,&lt;br /&gt;
     nu_eff_used_in_astrometry float,&lt;br /&gt;
     pseudocolour float,&lt;br /&gt;
     pseudocolour_error float,&lt;br /&gt;
     ra_pseudocolour_corr float,&lt;br /&gt;
     dec_pseudocolour_corr float,&lt;br /&gt;
     parallax_pseudocolour_corr float,&lt;br /&gt;
     pmra_pseudocolour_corr float,&lt;br /&gt;
     pmdec_pseudocolour_corr float,&lt;br /&gt;
     astrometric_matched_transits smallint,&lt;br /&gt;
     visibility_periods_used smallint,&lt;br /&gt;
     astrometric_sigma5d_max float,&lt;br /&gt;
     matched_transits smallint,&lt;br /&gt;
     new_matched_transits smallint,&lt;br /&gt;
     matched_transits_removed smallint,&lt;br /&gt;
     ipd_gof_harmonic_amplitude float,&lt;br /&gt;
     ipd_gof_harmonic_phase float,&lt;br /&gt;
     ipd_frac_multi_peak tinyint,&lt;br /&gt;
     ipd_frac_odd_win tinyint,&lt;br /&gt;
     ruwe float,&lt;br /&gt;
     scan_direction_strength_k1 float,&lt;br /&gt;
     scan_direction_strength_k2 float,&lt;br /&gt;
     scan_direction_strength_k3 float,&lt;br /&gt;
     scan_direction_strength_k4 float,&lt;br /&gt;
     scan_direction_mean_k1 float,&lt;br /&gt;
     scan_direction_mean_k2 float,&lt;br /&gt;
     scan_direction_mean_k3 float,&lt;br /&gt;
     scan_direction_mean_k4 float,&lt;br /&gt;
     duplicated_source boolean,&lt;br /&gt;
     phot_g_n_obs smallint,&lt;br /&gt;
     phot_g_mean_flux double,&lt;br /&gt;
     phot_g_mean_flux_error float,&lt;br /&gt;
     phot_g_mean_flux_over_error float,&lt;br /&gt;
     phot_g_mean_mag float,&lt;br /&gt;
     phot_bp_n_obs smallint,&lt;br /&gt;
     phot_bp_mean_flux double,&lt;br /&gt;
     phot_bp_mean_flux_error float,&lt;br /&gt;
     phot_bp_mean_flux_over_error float,&lt;br /&gt;
     phot_bp_mean_mag float,&lt;br /&gt;
     phot_rp_n_obs smallint,&lt;br /&gt;
     phot_rp_mean_flux double,&lt;br /&gt;
     phot_rp_mean_flux_error float,&lt;br /&gt;
     phot_rp_mean_flux_over_error float,&lt;br /&gt;
     phot_rp_mean_mag float,&lt;br /&gt;
     phot_bp_n_contaminated_transits smallint,&lt;br /&gt;
     phot_bp_n_blended_transits smallint,&lt;br /&gt;
     phot_rp_n_contaminated_transits smallint,&lt;br /&gt;
     phot_rp_n_blended_transits smallint,&lt;br /&gt;
     phot_proc_mode tinyint,&lt;br /&gt;
     phot_bp_rp_excess_factor float,&lt;br /&gt;
     bp_rp float,&lt;br /&gt;
     bp_g float,&lt;br /&gt;
     g_rp float,&lt;br /&gt;
     dr2_radial_velocity float,&lt;br /&gt;
     dr2_radial_velocity_error float,&lt;br /&gt;
     dr2_rv_nb_transits smallint,&lt;br /&gt;
     dr2_rv_template_teff float,&lt;br /&gt;
     dr2_rv_template_logg float,&lt;br /&gt;
     dr2_rv_template_fe_h float,&lt;br /&gt;
     l double,&lt;br /&gt;
     b double,&lt;br /&gt;
     ecl_lon double,&lt;br /&gt;
     ecl_lat double&lt;br /&gt;
 )&lt;br /&gt;
 ROW FORMAT DELIMITED&lt;br /&gt;
 FIELDS TERMINATED BY ','&lt;br /&gt;
 LOCATION '/user/tallada/data/gaia_edr3'&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Internal table ==&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE cosmohub.gaia_edr3 (&lt;br /&gt;
     solution_id bigint,&lt;br /&gt;
     designation string,&lt;br /&gt;
     source_id bigint,&lt;br /&gt;
     random_index bigint,&lt;br /&gt;
     ref_epoch float,&lt;br /&gt;
     ra double,&lt;br /&gt;
     ra_error float,&lt;br /&gt;
     `dec` double,&lt;br /&gt;
     dec_error float,&lt;br /&gt;
     parallax double,&lt;br /&gt;
     parallax_error float,&lt;br /&gt;
     parallax_over_error float,&lt;br /&gt;
     pm float,&lt;br /&gt;
     pmra double,&lt;br /&gt;
     pmra_error float,&lt;br /&gt;
     pmdec double,&lt;br /&gt;
     pmdec_error float,&lt;br /&gt;
     ra_dec_corr float,&lt;br /&gt;
     ra_parallax_corr float,&lt;br /&gt;
     ra_pmra_corr float,&lt;br /&gt;
     ra_pmdec_corr float,&lt;br /&gt;
     dec_parallax_corr float,&lt;br /&gt;
     dec_pmra_corr float,&lt;br /&gt;
     dec_pmdec_corr float,&lt;br /&gt;
     parallax_pmra_corr float,&lt;br /&gt;
     parallax_pmdec_corr float,&lt;br /&gt;
     pmra_pmdec_corr float,&lt;br /&gt;
     astrometric_n_obs_al smallint,&lt;br /&gt;
     astrometric_n_obs_ac smallint,&lt;br /&gt;
     astrometric_n_good_obs_al smallint,&lt;br /&gt;
     astrometric_n_bad_obs_al smallint,&lt;br /&gt;
     astrometric_gof_al float,&lt;br /&gt;
     astrometric_chi2_al float,&lt;br /&gt;
     astrometric_excess_noise float,&lt;br /&gt;
     astrometric_excess_noise_sig float,&lt;br /&gt;
     astrometric_params_solved tinyint,&lt;br /&gt;
     astrometric_primary_flag boolean,&lt;br /&gt;
     nu_eff_used_in_astrometry float,&lt;br /&gt;
     pseudocolour float,&lt;br /&gt;
     pseudocolour_error float,&lt;br /&gt;
     ra_pseudocolour_corr float,&lt;br /&gt;
     dec_pseudocolour_corr float,&lt;br /&gt;
     parallax_pseudocolour_corr float,&lt;br /&gt;
     pmra_pseudocolour_corr float,&lt;br /&gt;
     pmdec_pseudocolour_corr float,&lt;br /&gt;
     astrometric_matched_transits smallint,&lt;br /&gt;
     visibility_periods_used smallint,&lt;br /&gt;
     astrometric_sigma5d_max float,&lt;br /&gt;
     matched_transits smallint,&lt;br /&gt;
     new_matched_transits smallint,&lt;br /&gt;
     matched_transits_removed smallint,&lt;br /&gt;
     ipd_gof_harmonic_amplitude float,&lt;br /&gt;
     ipd_gof_harmonic_phase float,&lt;br /&gt;
     ipd_frac_multi_peak tinyint,&lt;br /&gt;
     ipd_frac_odd_win tinyint,&lt;br /&gt;
     ruwe float,&lt;br /&gt;
     scan_direction_strength_k1 float,&lt;br /&gt;
     scan_direction_strength_k2 float,&lt;br /&gt;
     scan_direction_strength_k3 float,&lt;br /&gt;
     scan_direction_strength_k4 float,&lt;br /&gt;
     scan_direction_mean_k1 float,&lt;br /&gt;
     scan_direction_mean_k2 float,&lt;br /&gt;
     scan_direction_mean_k3 float,&lt;br /&gt;
     scan_direction_mean_k4 float,&lt;br /&gt;
     duplicated_source boolean,&lt;br /&gt;
     phot_g_n_obs smallint,&lt;br /&gt;
     phot_g_mean_flux double,&lt;br /&gt;
     phot_g_mean_flux_error float,&lt;br /&gt;
     phot_g_mean_flux_over_error float,&lt;br /&gt;
     phot_g_mean_mag float,&lt;br /&gt;
     phot_bp_n_obs smallint,&lt;br /&gt;
     phot_bp_mean_flux double,&lt;br /&gt;
     phot_bp_mean_flux_error float,&lt;br /&gt;
     phot_bp_mean_flux_over_error float,&lt;br /&gt;
     phot_bp_mean_mag float,&lt;br /&gt;
     phot_rp_n_obs smallint,&lt;br /&gt;
     phot_rp_mean_flux double,&lt;br /&gt;
     phot_rp_mean_flux_error float,&lt;br /&gt;
     phot_rp_mean_flux_over_error float,&lt;br /&gt;
     phot_rp_mean_mag float,&lt;br /&gt;
     phot_bp_n_contaminated_transits smallint,&lt;br /&gt;
     phot_bp_n_blended_transits smallint,&lt;br /&gt;
     phot_rp_n_contaminated_transits smallint,&lt;br /&gt;
     phot_rp_n_blended_transits smallint,&lt;br /&gt;
     phot_proc_mode tinyint,&lt;br /&gt;
     phot_bp_rp_excess_factor float,&lt;br /&gt;
     bp_rp float,&lt;br /&gt;
     bp_g float,&lt;br /&gt;
     g_rp float,&lt;br /&gt;
     dr2_radial_velocity float,&lt;br /&gt;
     dr2_radial_velocity_error float,&lt;br /&gt;
     dr2_rv_nb_transits smallint,&lt;br /&gt;
     dr2_rv_template_teff float,&lt;br /&gt;
     dr2_rv_template_logg float,&lt;br /&gt;
     dr2_rv_template_fe_h float,&lt;br /&gt;
     l double,&lt;br /&gt;
     b double,&lt;br /&gt;
     ecl_lon double,&lt;br /&gt;
     ecl_lat double&lt;br /&gt;
 )&lt;br /&gt;
 CLUSTERED BY (source_id)&lt;br /&gt;
 SORTED BY (source_id ASC)&lt;br /&gt;
 INTO 2048 BUCKETS&lt;br /&gt;
 STORED AS ORC&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
 INSERT INTO cosmohub.gaia_edr3&lt;br /&gt;
 SELECT * FROM tallada.gaia_edr3_csv&lt;br /&gt;
 WHERE source_id IS NOT NULL&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE solution_id solution_id bigint COMMENT &amp;quot;Solution Identifier&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE designation designation string COMMENT &amp;quot;Unique source designation, unique across all Data Releases&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE source_id source_id bigint COMMENT &amp;quot;Unique source identifier, unique within a particular Data Release&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE random_index random_index bigint COMMENT &amp;quot;Random index used to select subsets&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ref_epoch ref_epoch float COMMENT &amp;quot;Reference epoch&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ra ra double COMMENT &amp;quot;Right ascension&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ra_error ra_error float COMMENT &amp;quot;Standard error of right ascension&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE `dec` `dec` double COMMENT &amp;quot;Declination&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dec_error dec_error float COMMENT &amp;quot;Standard error of declination&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE parallax parallax double COMMENT &amp;quot;Parallax&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE parallax_error parallax_error float COMMENT &amp;quot;Standard error of parallax&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE parallax_over_error parallax_over_error float COMMENT &amp;quot;Parallax divided by its standard error&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pm pm float COMMENT &amp;quot;Total proper motion&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pmra pmra double COMMENT &amp;quot;Proper motion in right ascension direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pmra_error pmra_error float COMMENT &amp;quot;Standard error of proper motion in right ascension direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pmdec pmdec double COMMENT &amp;quot;Proper motion in declination direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pmdec_error pmdec_error float COMMENT &amp;quot;Standard error of proper motion in declination direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ra_dec_corr ra_dec_corr float COMMENT &amp;quot;Correlation between right ascension and declination&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ra_parallax_corr ra_parallax_corr float COMMENT &amp;quot;Correlation between right ascension and parallax&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ra_pmra_corr ra_pmra_corr float COMMENT &amp;quot;Correlation between right ascension and proper motion in right ascension&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ra_pmdec_corr ra_pmdec_corr float COMMENT &amp;quot;Correlation between right ascension and proper motion in declination&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dec_parallax_corr dec_parallax_corr float COMMENT &amp;quot;Correlation between declination and parallax&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dec_pmra_corr dec_pmra_corr float COMMENT &amp;quot;Correlation between declination and proper motion in right ascension&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dec_pmdec_corr dec_pmdec_corr float COMMENT &amp;quot;Correlation between declination and proper motion in declination&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE parallax_pmra_corr parallax_pmra_corr float COMMENT &amp;quot;Correlation between parallax and proper motion in right ascension&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE parallax_pmdec_corr parallax_pmdec_corr float COMMENT &amp;quot;Correlation between parallax and proper motion in declination&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pmra_pmdec_corr pmra_pmdec_corr float COMMENT &amp;quot;Correlation between proper motion in right ascension and proper motion in declination&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_n_obs_al astrometric_n_obs_al smallint COMMENT &amp;quot;Total number of observations AL&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_n_obs_ac astrometric_n_obs_ac smallint COMMENT &amp;quot;Total number of observations AC&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_n_good_obs_al astrometric_n_good_obs_al smallint COMMENT &amp;quot;Number of good observations AL&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_n_bad_obs_al astrometric_n_bad_obs_al smallint COMMENT &amp;quot;Number of bad observations AL&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_gof_al astrometric_gof_al float COMMENT &amp;quot;Goodness of fit statistic of model wrt along-scan observations&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_chi2_al astrometric_chi2_al float COMMENT &amp;quot;AL chi-square value&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_excess_noise astrometric_excess_noise float COMMENT &amp;quot;Excess noise of the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_excess_noise_sig astrometric_excess_noise_sig float COMMENT &amp;quot;Significance of excess noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_params_solved astrometric_params_solved tinyint COMMENT &amp;quot;Which parameters have been solved for?&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_primary_flag astrometric_primary_flag boolean COMMENT &amp;quot;Primary or seconday&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE nu_eff_used_in_astrometry nu_eff_used_in_astrometry float COMMENT &amp;quot;Effective wavenumber of the source used in the astrometric solution&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pseudocolour pseudocolour float COMMENT &amp;quot;Astrometrically estimated pseudocolour of the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pseudocolour_error pseudocolour_error float COMMENT &amp;quot;Standard error of the pseudocolour of the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ra_pseudocolour_corr ra_pseudocolour_corr float COMMENT &amp;quot;Correlation between right ascension and pseudocolour&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dec_pseudocolour_corr dec_pseudocolour_corr float COMMENT &amp;quot;Correlation between declination and pseudocolour&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE parallax_pseudocolour_corr parallax_pseudocolour_corr float COMMENT &amp;quot;Correlation between parallax and pseudocolour&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pmra_pseudocolour_corr pmra_pseudocolour_corr float COMMENT &amp;quot;Correlation between proper motion in right asension and pseudocolour&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE pmdec_pseudocolour_corr pmdec_pseudocolour_corr float COMMENT &amp;quot;Correlation between proper motion in declination and pseudocolour&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_matched_transits astrometric_matched_transits smallint COMMENT &amp;quot;Matched FOV transits used in the AGIS solution&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE visibility_periods_used visibility_periods_used smallint COMMENT &amp;quot;Number of visibility periods used in Astrometric solution&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE astrometric_sigma5d_max astrometric_sigma5d_max float COMMENT &amp;quot;The longest semi-major axis of the 5-d error ellipsoid&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE matched_transits matched_transits smallint COMMENT &amp;quot;The number of transits matched to this source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE new_matched_transits new_matched_transits smallint COMMENT &amp;quot;The number of transits newly incorporated into an existing source in the current cycle&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE matched_transits_removed matched_transits_removed smallint COMMENT &amp;quot;The number of transits removed from an existing source in the current cycle&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ipd_gof_harmonic_amplitude ipd_gof_harmonic_amplitude float COMMENT &amp;quot;Amplitude of the IPD GoF versus position angle of scan&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ipd_gof_harmonic_phase ipd_gof_harmonic_phase float COMMENT &amp;quot;Phase of the IPD GoF versus position angle of scan&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ipd_frac_multi_peak ipd_frac_multi_peak tinyint COMMENT &amp;quot;Percent of successful-IPD windows with more than one peak&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ipd_frac_odd_win ipd_frac_odd_win tinyint COMMENT &amp;quot;Percent of transits with truncated windows or multiple gate&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ruwe ruwe float COMMENT &amp;quot;Renormalised unit weight error&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE scan_direction_strength_k1 scan_direction_strength_k1 float COMMENT &amp;quot;Degree of concentration of scan directions across the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE scan_direction_strength_k2 scan_direction_strength_k2 float COMMENT &amp;quot;Degree of concentration of scan directions across the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE scan_direction_strength_k3 scan_direction_strength_k3 float COMMENT &amp;quot;Degree of concentration of scan directions across the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE scan_direction_strength_k4 scan_direction_strength_k4 float COMMENT &amp;quot;Degree of concentration of scan directions across the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE scan_direction_mean_k1 scan_direction_mean_k1 float COMMENT &amp;quot;Mean position angle of scan directions across the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE scan_direction_mean_k2 scan_direction_mean_k2 float COMMENT &amp;quot;Mean position angle of scan directions across the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE scan_direction_mean_k3 scan_direction_mean_k3 float COMMENT &amp;quot;Mean position angle of scan directions across the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE scan_direction_mean_k4 scan_direction_mean_k4 float COMMENT &amp;quot;Mean position angle of scan directions across the source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE duplicated_source duplicated_source boolean COMMENT &amp;quot;Source with multiple source identifiers&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_g_n_obs phot_g_n_obs smallint COMMENT &amp;quot;Number of observations contributing to G photometry&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_g_mean_flux phot_g_mean_flux double COMMENT &amp;quot;G-band mean flux&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_g_mean_flux_error phot_g_mean_flux_error float COMMENT &amp;quot;Error on G-band mean flux&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_g_mean_flux_over_error phot_g_mean_flux_over_error float COMMENT &amp;quot;G-band mean flux divided by its error&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_g_mean_mag phot_g_mean_mag float COMMENT &amp;quot;G-band mean magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_bp_n_obs phot_bp_n_obs smallint COMMENT &amp;quot;Number of observations contributing to BP photometry&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_bp_mean_flux phot_bp_mean_flux double COMMENT &amp;quot;Integrated BP mean flux&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_bp_mean_flux_error phot_bp_mean_flux_error float COMMENT &amp;quot;Error on the integrated BP mean flux&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_bp_mean_flux_over_error phot_bp_mean_flux_over_error float COMMENT &amp;quot;Integrated BP mean flux divided by its error&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_bp_mean_mag phot_bp_mean_mag float COMMENT &amp;quot;Integrated BP mean magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_rp_n_obs phot_rp_n_obs smallint COMMENT &amp;quot;Number of observations contributing to RP photometry&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_rp_mean_flux phot_rp_mean_flux double COMMENT &amp;quot;Integrated RP mean flux&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_rp_mean_flux_error phot_rp_mean_flux_error float COMMENT &amp;quot;Error on the integrated RP mean flux&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_rp_mean_flux_over_error phot_rp_mean_flux_over_error float COMMENT &amp;quot;Integrated RP mean flux divided by its error&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_rp_mean_mag phot_rp_mean_mag float COMMENT &amp;quot;Integrated RP mean magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_bp_n_contaminated_transits phot_bp_n_contaminated_transits smallint COMMENT &amp;quot;Number of BP contaminated transits&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_bp_n_blended_transits phot_bp_n_blended_transits smallint COMMENT &amp;quot;Number of BP blended transits&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_rp_n_contaminated_transits phot_rp_n_contaminated_transits smallint COMMENT &amp;quot;Number of RP contaminated transits&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_rp_n_blended_transits phot_rp_n_blended_transits smallint COMMENT &amp;quot;Number of RP blended transits&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_proc_mode phot_proc_mode tinyint COMMENT &amp;quot;Photometry processing mode&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE phot_bp_rp_excess_factor phot_bp_rp_excess_factor float COMMENT &amp;quot;BP/RP excess factor&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE bp_rp bp_rp float COMMENT &amp;quot;BP - RP colour&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE bp_g bp_g float COMMENT &amp;quot;BP - G colour&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE g_rp g_rp float COMMENT &amp;quot;G - RP colour&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dr2_radial_velocity dr2_radial_velocity float COMMENT &amp;quot;Radial velocity from Gaia DR2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dr2_radial_velocity_error dr2_radial_velocity_error float COMMENT &amp;quot;Radial velocity error from Gaia DR2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dr2_rv_nb_transits dr2_rv_nb_transits smallint COMMENT &amp;quot;Number of transits used to compute radial velocity in Gaia DR2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dr2_rv_template_teff dr2_rv_template_teff float COMMENT &amp;quot;Teff of the template used to compute radial velocity in Gaia DR2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dr2_rv_template_logg dr2_rv_template_logg float COMMENT &amp;quot;logg of the template used to compute radial velocity in Gaia DR2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE dr2_rv_template_fe_h dr2_rv_template_fe_h float COMMENT &amp;quot;Fe/H of the template used to compute radial velocity in Gaia DR2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE l l double COMMENT &amp;quot;Galactic longitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE b b double COMMENT &amp;quot;Galactic latitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ecl_lon ecl_lon double COMMENT &amp;quot;Ecliptic longitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.gaia_edr3 CHANGE ecl_lat ecl_lat double COMMENT &amp;quot;Ecliptic latitude&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
 ANALYZE TABLE cosmohub.gaia_edr3 COMPUTE STATISTICS FOR COLUMNS;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Gaia_EDR3&amp;diff=884</id>
		<title>Gaia EDR3</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Gaia_EDR3&amp;diff=884"/>
		<updated>2020-12-03T14:39:10Z</updated>

		<summary type="html">&lt;p&gt;Tallada: Created page with &amp;quot;== Raw data ==  Mirrored to cephfs using lftp:      mirror -r -v -c -P4 http://cdn.gea.esac.esa.int/Gaia/gedr3/gaia_source/ /cephfs/pic.es/astro/scratch/tallada/gaia_edr3  ==...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Raw data ==&lt;br /&gt;
&lt;br /&gt;
Mirrored to cephfs using lftp:&lt;br /&gt;
&lt;br /&gt;
    mirror -r -v -c -P4 http://cdn.gea.esac.esa.int/Gaia/gedr3/gaia_source/ /cephfs/pic.es/astro/scratch/tallada/gaia_edr3&lt;br /&gt;
&lt;br /&gt;
== External table ==&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE tallada.gaia_edr3_csv (&lt;br /&gt;
     solution_id bigint,&lt;br /&gt;
     designation string,&lt;br /&gt;
     source_id bigint,&lt;br /&gt;
     random_index bigint,&lt;br /&gt;
     ref_epoch float,&lt;br /&gt;
     ra double,&lt;br /&gt;
     ra_error float,&lt;br /&gt;
     `dec` double,&lt;br /&gt;
     dec_error float,&lt;br /&gt;
     parallax double,&lt;br /&gt;
     parallax_error float,&lt;br /&gt;
     parallax_over_error float,&lt;br /&gt;
     pm float,&lt;br /&gt;
     pmra double,&lt;br /&gt;
     pmra_error float,&lt;br /&gt;
     pmdec double,&lt;br /&gt;
     pmdec_error float,&lt;br /&gt;
     ra_dec_corr float,&lt;br /&gt;
     ra_parallax_corr float,&lt;br /&gt;
     ra_pmra_corr float,&lt;br /&gt;
     ra_pmdec_corr float,&lt;br /&gt;
     dec_parallax_corr float,&lt;br /&gt;
     dec_pmra_corr float,&lt;br /&gt;
     dec_pmdec_corr float,&lt;br /&gt;
     parallax_pmra_corr float,&lt;br /&gt;
     parallax_pmdec_corr float,&lt;br /&gt;
     pmra_pmdec_corr float,&lt;br /&gt;
     astrometric_n_obs_al smallint,&lt;br /&gt;
     astrometric_n_obs_ac smallint,&lt;br /&gt;
     astrometric_n_good_obs_al smallint,&lt;br /&gt;
     astrometric_n_bad_obs_al smallint,&lt;br /&gt;
     astrometric_gof_al float,&lt;br /&gt;
     astrometric_chi2_al float,&lt;br /&gt;
     astrometric_excess_noise float,&lt;br /&gt;
     astrometric_excess_noise_sig float,&lt;br /&gt;
     astrometric_params_solved tinyint,&lt;br /&gt;
     astrometric_primary_flag boolean,&lt;br /&gt;
     nu_eff_used_in_astrometry float,&lt;br /&gt;
     pseudocolour float,&lt;br /&gt;
     pseudocolour_error float,&lt;br /&gt;
     ra_pseudocolour_corr float,&lt;br /&gt;
     dec_pseudocolour_corr float,&lt;br /&gt;
     parallax_pseudocolour_corr float,&lt;br /&gt;
     pmra_pseudocolour_corr float,&lt;br /&gt;
     pmdec_pseudocolour_corr float,&lt;br /&gt;
     astrometric_matched_transits smallint,&lt;br /&gt;
     visibility_periods_used smallint,&lt;br /&gt;
     astrometric_sigma5d_max float,&lt;br /&gt;
     matched_transits smallint,&lt;br /&gt;
     new_matched_transits smallint,&lt;br /&gt;
     matched_transits_removed smallint,&lt;br /&gt;
     ipd_gof_harmonic_amplitude float,&lt;br /&gt;
     ipd_gof_harmonic_phase float,&lt;br /&gt;
     ipd_frac_multi_peak tinyint,&lt;br /&gt;
     ipd_frac_odd_win tinyint,&lt;br /&gt;
     ruwe float,&lt;br /&gt;
     scan_direction_strength_k1 float,&lt;br /&gt;
     scan_direction_strength_k2 float,&lt;br /&gt;
     scan_direction_strength_k3 float,&lt;br /&gt;
     scan_direction_strength_k4 float,&lt;br /&gt;
     scan_direction_mean_k1 float,&lt;br /&gt;
     scan_direction_mean_k2 float,&lt;br /&gt;
     scan_direction_mean_k3 float,&lt;br /&gt;
     scan_direction_mean_k4 float,&lt;br /&gt;
     duplicated_source boolean,&lt;br /&gt;
     phot_g_n_obs smallint,&lt;br /&gt;
     phot_g_mean_flux double,&lt;br /&gt;
     phot_g_mean_flux_error float,&lt;br /&gt;
     phot_g_mean_flux_over_error float,&lt;br /&gt;
     phot_g_mean_mag float,&lt;br /&gt;
     phot_bp_n_obs smallint,&lt;br /&gt;
     phot_bp_mean_flux double,&lt;br /&gt;
     phot_bp_mean_flux_error float,&lt;br /&gt;
     phot_bp_mean_flux_over_error float,&lt;br /&gt;
     phot_bp_mean_mag float,&lt;br /&gt;
     phot_rp_n_obs smallint,&lt;br /&gt;
     phot_rp_mean_flux double,&lt;br /&gt;
     phot_rp_mean_flux_error float,&lt;br /&gt;
     phot_rp_mean_flux_over_error float,&lt;br /&gt;
     phot_rp_mean_mag float,&lt;br /&gt;
     phot_bp_n_contaminated_transits smallint,&lt;br /&gt;
     phot_bp_n_blended_transits smallint,&lt;br /&gt;
     phot_rp_n_contaminated_transits smallint,&lt;br /&gt;
     phot_rp_n_blended_transits smallint,&lt;br /&gt;
     phot_proc_mode tinyint,&lt;br /&gt;
     phot_bp_rp_excess_factor float,&lt;br /&gt;
     bp_rp float,&lt;br /&gt;
     bp_g float,&lt;br /&gt;
     g_rp float,&lt;br /&gt;
     dr2_radial_velocity float,&lt;br /&gt;
     dr2_radial_velocity_error float,&lt;br /&gt;
     dr2_rv_nb_transits smallint,&lt;br /&gt;
     dr2_rv_template_teff float,&lt;br /&gt;
     dr2_rv_template_logg float,&lt;br /&gt;
     dr2_rv_template_fe_h float,&lt;br /&gt;
     l double,&lt;br /&gt;
     b double,&lt;br /&gt;
     ecl_lon double,&lt;br /&gt;
     ecl_lat double&lt;br /&gt;
 )&lt;br /&gt;
 ROW FORMAT DELIMITED&lt;br /&gt;
 FIELDS TERMINATED BY ','&lt;br /&gt;
 LOCATION '/user/tallada/data/gaia_edr3'&lt;br /&gt;
 ;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Catalogs&amp;diff=883</id>
		<title>Catalogs</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Catalogs&amp;diff=883"/>
		<updated>2020-12-03T14:23:14Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* External */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Euclid productions ==&lt;br /&gt;
&lt;br /&gt;
====  Mock Galaxy catalogs ====&lt;br /&gt;
&lt;br /&gt;
More info from Euclid wiki (Francesc):&lt;br /&gt;
&lt;br /&gt;
https://euclid.roe.ac.uk/projects/sgv/wiki/SC456_#Galaxies&lt;br /&gt;
&lt;br /&gt;
* [[ Euclid_mock_production_v1.6.20 | v1.6.20 ]] ([https://euclid.roe.ac.uk/issues/9153 #9153])&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17 | v1.7.17 ]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.1 | v1.8.1 ]]&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.3 | v1.8.3 ]] (single octant for Helsinki)&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.3_c | v1.8.3_c ]] (clustered table without lensing)&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.4_s | v1.8.4_s ]] (from 1.8.3 with correct lensing and without buffer)&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.5 | v1.8.5 ]] (Kai subset with additional magnitudes for IA)&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17_correct | v1.7.17_correct (v1.7.18)]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17_deep_correct | v1.7.17_deep_correct]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17_correct_v2 | v1.7.17_correct_v2 (v1.7.19)]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17_deep_correct_v2 | v1.7.17_deep_correct_v2]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.2 | v1.9.2]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.3 | v1.9.3]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.4 | v1.9.4]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.5 | v1.9.5]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.6 | v1.9.6]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.7 | v1.9.7]] (SC8)&lt;br /&gt;
&lt;br /&gt;
====  Zurich Dark Matter Halo catalogs ====&lt;br /&gt;
&lt;br /&gt;
* [[ v1.0 | v1.0 ]]&lt;br /&gt;
&lt;br /&gt;
* [[ v1.1 | v1.1 Corrected Velocities ]]&lt;br /&gt;
&lt;br /&gt;
====  Primeval Universe Catalogs ====&lt;br /&gt;
* [[ QSOs | QSOs]]&lt;br /&gt;
* [[ High_redshift_galaxies | High-z galaxies]]&lt;br /&gt;
&lt;br /&gt;
== MICE productions ==&lt;br /&gt;
&lt;br /&gt;
* [[ MIDES Wide Field v5.0 | MIDES Wide Field v5.0 ]]&lt;br /&gt;
* [[ MIDES Wide Field v6.0 | MIDES Wide Field v6.0 ]]&lt;br /&gt;
* [[ MICE Redmagic v5.1 ]]&lt;br /&gt;
* [[ DESY3 MICE2 source catalog | DESY3 MICE2 source catalog ]]&lt;br /&gt;
&lt;br /&gt;
== PAUS productions ==&lt;br /&gt;
&lt;br /&gt;
=== Observations ===&lt;br /&gt;
&lt;br /&gt;
* [[ PAUdm_forced_aperture_coadd | PAUdm forced aperture coadd ]]&lt;br /&gt;
&lt;br /&gt;
==== Photoz productions ====&lt;br /&gt;
&lt;br /&gt;
* [[ photoz_bcnz | bcnz_v29.parquet ]]&lt;br /&gt;
&lt;br /&gt;
* [[ production_table | paudm_production_table ]]&lt;br /&gt;
&lt;br /&gt;
* [[ PAUS+COSMOS_photoz  | PAUS+COSMOS_photoz ]]&lt;br /&gt;
&lt;br /&gt;
==== CIGALE catalogs ====&lt;br /&gt;
&lt;br /&gt;
* [[ CIGALE-W3 | CIGALE W3 ]]&lt;br /&gt;
&lt;br /&gt;
====  Mock Galaxy catalogs ====&lt;br /&gt;
&lt;br /&gt;
* [[ Flagship-PAU | Flagship-PAU v1.8.4_v0.1 ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Flagship-PAU_v02 | Flagship-PAU v1.8.4_v0.2 ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Flagship-PAU_v03 | Flagship-PAU v1.8.4_v0.3 ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Durham-LC-PAU lc5.field1.63  | Durham LC lc5.field1.63 ]]&lt;br /&gt;
&lt;br /&gt;
== External ==&lt;br /&gt;
&lt;br /&gt;
* [[ Cosmos_2015_DR_2.1 | COSMOS 2015 DR 2.1 ]]&lt;br /&gt;
* [[ ZEST_v1.0 | Zest v1.0 ]]&lt;br /&gt;
* [[ CANDELS_2018 | CANDELS 2018 ]]&lt;br /&gt;
* [[ Legacy Survey DR8 | Legacy Survey DR8 ]]&lt;br /&gt;
* [[ Legacy Survey DR9 | Legacy Survey DR9 ]]&lt;br /&gt;
* [[ KiDS DR4 ]]&lt;br /&gt;
* [[ VIPERS ]]&lt;br /&gt;
* [[ The COSMOS ACS Catalog ]]&lt;br /&gt;
* [[ GLADE ]]&lt;br /&gt;
* [[ Gaia_EDR3 | Gaia EDR3 ]]&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Catalogs&amp;diff=879</id>
		<title>Catalogs</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Catalogs&amp;diff=879"/>
		<updated>2020-12-01T20:05:04Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* External */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Euclid productions ==&lt;br /&gt;
&lt;br /&gt;
====  Mock Galaxy catalogs ====&lt;br /&gt;
&lt;br /&gt;
More info from Euclid wiki (Francesc):&lt;br /&gt;
&lt;br /&gt;
https://euclid.roe.ac.uk/projects/sgv/wiki/SC456_#Galaxies&lt;br /&gt;
&lt;br /&gt;
* [[ Euclid_mock_production_v1.6.20 | v1.6.20 ]] ([https://euclid.roe.ac.uk/issues/9153 #9153])&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17 | v1.7.17 ]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.1 | v1.8.1 ]]&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.3 | v1.8.3 ]] (single octant for Helsinki)&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.3_c | v1.8.3_c ]] (clustered table without lensing)&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.4_s | v1.8.4_s ]] (from 1.8.3 with correct lensing and without buffer)&lt;br /&gt;
* [[ Euclid_mock_production_v1.8.5 | v1.8.5 ]] (Kai subset with additional magnitudes for IA)&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17_correct | v1.7.17_correct (v1.7.18)]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17_deep_correct | v1.7.17_deep_correct]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17_correct_v2 | v1.7.17_correct_v2 (v1.7.19)]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.7.17_deep_correct_v2 | v1.7.17_deep_correct_v2]] (SC456)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.2 | v1.9.2]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.3 | v1.9.3]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.4 | v1.9.4]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.5 | v1.9.5]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.6 | v1.9.6]] (SC8)&lt;br /&gt;
* [[ Euclid_mock_production_v1.9.7 | v1.9.7]] (SC8)&lt;br /&gt;
&lt;br /&gt;
====  Zurich Dark Matter Halo catalogs ====&lt;br /&gt;
&lt;br /&gt;
* [[ v1.0 | v1.0 ]]&lt;br /&gt;
&lt;br /&gt;
* [[ v1.1 | v1.1 Corrected Velocities ]]&lt;br /&gt;
&lt;br /&gt;
====  Primeval Universe Catalogs ====&lt;br /&gt;
* [[ QSOs | QSOs]]&lt;br /&gt;
* [[ High_redshift_galaxies | High-z galaxies]]&lt;br /&gt;
&lt;br /&gt;
== MICE productions ==&lt;br /&gt;
&lt;br /&gt;
* [[ MIDES Wide Field v5.0 | MIDES Wide Field v5.0 ]]&lt;br /&gt;
* [[ MIDES Wide Field v6.0 | MIDES Wide Field v6.0 ]]&lt;br /&gt;
* [[ MICE Redmagic v5.1 ]]&lt;br /&gt;
* [[ DESY3 MICE2 source catalog | DESY3 MICE2 source catalog ]]&lt;br /&gt;
&lt;br /&gt;
== PAUS productions ==&lt;br /&gt;
&lt;br /&gt;
=== Observations ===&lt;br /&gt;
&lt;br /&gt;
* [[ PAUdm_forced_aperture_coadd | PAUdm forced aperture coadd ]]&lt;br /&gt;
&lt;br /&gt;
==== Photoz productions ====&lt;br /&gt;
&lt;br /&gt;
* [[ photoz_bcnz | bcnz_v29.parquet ]]&lt;br /&gt;
&lt;br /&gt;
* [[ production_table | paudm_production_table ]]&lt;br /&gt;
&lt;br /&gt;
* [[ PAUS+COSMOS_photoz  | PAUS+COSMOS_photoz ]]&lt;br /&gt;
&lt;br /&gt;
===  Mock Galaxy catalogs ===&lt;br /&gt;
&lt;br /&gt;
* [[ Flagship-PAU | Flagship-PAU v1.8.4_v0.1 ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Flagship-PAU_v02 | Flagship-PAU v1.8.4_v0.2 ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Flagship-PAU_v03 | Flagship-PAU v1.8.4_v0.3 ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Durham-LC-PAU lc5.field1.63  | Durham LC lc5.field1.63 ]]&lt;br /&gt;
&lt;br /&gt;
== External ==&lt;br /&gt;
&lt;br /&gt;
* [[ Cosmos_2015_DR_2.1 | COSMOS 2015 DR 2.1 ]]&lt;br /&gt;
* [[ ZEST_v1.0 | Zest v1.0 ]]&lt;br /&gt;
* [[ CANDELS_2018 | CANDELS 2018 ]]&lt;br /&gt;
* [[ Legacy Survey DR8 | Legacy Survey DR8 ]]&lt;br /&gt;
* [[ Legacy Survey DR9 | Legacy Survey DR9 ]]&lt;br /&gt;
* [[ KiDS DR4 ]]&lt;br /&gt;
* [[ VIPERS ]]&lt;br /&gt;
* [[ The COSMOS ACS Catalog ]]&lt;br /&gt;
* [[ GLADE ]]&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Legacy_Survey_DR9&amp;diff=878</id>
		<title>Legacy Survey DR9</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Legacy_Survey_DR9&amp;diff=878"/>
		<updated>2020-11-30T21:04:59Z</updated>

		<summary type="html">&lt;p&gt;Tallada: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Original DR9 ==&lt;br /&gt;
=== Raw data ===&lt;br /&gt;
&lt;br /&gt;
Downloaded from NERSC&lt;br /&gt;
 /global/cfs/cdirs/cosmo/work/legacysurvey/dr9m&lt;br /&gt;
&lt;br /&gt;
Directories:&lt;br /&gt;
 south/tractor&lt;br /&gt;
 north/tractor&lt;br /&gt;
&lt;br /&gt;
Downloaded using bbcp from services01.euclid into CephFS scratch:&lt;br /&gt;
 bbcp -s 16 -a -A -v -z -r -S &amp;quot;ssh -x -a -oFallBackToRsh=no %I -l %U %H /usr/common/usg/bin/bbcp&amp;quot; \&lt;br /&gt;
 &amp;quot;jcarrete@dtn01.nersc.gov:/global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/north/tractor&amp;quot; \&lt;br /&gt;
 /cephfs/pic.es/astro/scratch/tallada/dr9m/north/tractor&lt;br /&gt;
 bbcp -s 16 -a -A -v -z -r -S &amp;quot;ssh -x -a -oFallBackToRsh=no %I -l %U %H /usr/common/usg/bin/bbcp&amp;quot; \&lt;br /&gt;
 &amp;quot;jcarrete@dtn01.nersc.gov:/global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/south/tractor&amp;quot; \&lt;br /&gt;
 /cephfs/pic.es/astro/scratch/tallada/dr9m/south/tractor&lt;br /&gt;
&lt;br /&gt;
Checksums provided through sha256sum files, and checked using command:&lt;br /&gt;
 find * -type d | xargs -t -L1 -P24 sh -c 'cd $1; sha256sum --quiet -c *.sha256sum' cksum&lt;br /&gt;
&lt;br /&gt;
=== Parquet ===&lt;br /&gt;
&lt;br /&gt;
The following code snippet was used in spark to convert fits files to parquet:&lt;br /&gt;
&lt;br /&gt;
 path_base = '/cephfs/pic.es/astro/scratch/tallada/dr9m'&lt;br /&gt;
 hdfs_base = '/user/tallada/data/legacysurvey_dr9'&lt;br /&gt;
 &lt;br /&gt;
 hs = ['h=north', 'h=south']&lt;br /&gt;
 rs = ['r={0:03d}'.format(x) for x in range(360)]&lt;br /&gt;
 &lt;br /&gt;
 for h in hs:&lt;br /&gt;
     for r in rs:&lt;br /&gt;
         p = os.path.join(path_base, h, r)&lt;br /&gt;
         if not os.path.exists(p):&lt;br /&gt;
             continue&lt;br /&gt;
         &lt;br /&gt;
         size = sum(os.path.getsize(os.path.join(p,f)) for f in os.listdir(p) if os.path.isfile(os.path.join(p,f)))&lt;br /&gt;
        &lt;br /&gt;
         print h, r, size        &lt;br /&gt;
         &lt;br /&gt;
         df = spark.read.format(&amp;quot;fits&amp;quot;).option(&amp;quot;hdu&amp;quot;, 1).load(&lt;br /&gt;
             &amp;quot;file://&amp;quot; + p&lt;br /&gt;
         )&lt;br /&gt;
         &lt;br /&gt;
         df = df.repartition(int(math.ceil(size / (256*1024*1024.0))))&lt;br /&gt;
                 &lt;br /&gt;
         df.write.parquet(os.path.join(hdfs_base, h, r))&lt;br /&gt;
&lt;br /&gt;
=== External table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE `tallada`.`legacysurvey_dr9`(&lt;br /&gt;
  `release` smallint, &lt;br /&gt;
  `brickid` int, &lt;br /&gt;
  `brickname` string, &lt;br /&gt;
  `objid` int, &lt;br /&gt;
  `brick_primary` boolean, &lt;br /&gt;
  `maskbits` smallint, &lt;br /&gt;
  `fitbits` smallint, &lt;br /&gt;
  `type` string, &lt;br /&gt;
  `ra` double, &lt;br /&gt;
  `dec` double, &lt;br /&gt;
  `ra_ivar` float, &lt;br /&gt;
  `dec_ivar` float, &lt;br /&gt;
  `bx` float, &lt;br /&gt;
  `by` float, &lt;br /&gt;
  `dchisq` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `ebv` float, &lt;br /&gt;
  `mjd_min` double, &lt;br /&gt;
  `mjd_max` double, &lt;br /&gt;
  `ref_cat` string, &lt;br /&gt;
  `ref_id` bigint, &lt;br /&gt;
  `pmra` float, &lt;br /&gt;
  `pmdec` float, &lt;br /&gt;
  `parallax` float, &lt;br /&gt;
  `pmra_ivar` float, &lt;br /&gt;
  `pmdec_ivar` float, &lt;br /&gt;
  `parallax_ivar` float, &lt;br /&gt;
  `ref_epoch` float, &lt;br /&gt;
  `gaia_phot_g_mean_mag` float, &lt;br /&gt;
  `gaia_phot_g_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_g_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_bp_mean_mag` float, &lt;br /&gt;
  `gaia_phot_bp_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_bp_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_rp_mean_mag` float, &lt;br /&gt;
  `gaia_phot_rp_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_rp_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_variable_flag` boolean, &lt;br /&gt;
  `gaia_astrometric_excess_noise` float, &lt;br /&gt;
  `gaia_astrometric_excess_noise_sig` float, &lt;br /&gt;
  `gaia_astrometric_n_obs_al` smallint, &lt;br /&gt;
  `gaia_astrometric_n_good_obs_al` smallint, &lt;br /&gt;
  `gaia_astrometric_weight_al` float, &lt;br /&gt;
  `gaia_duplicated_source` boolean, &lt;br /&gt;
  `gaia_a_g_val` float, &lt;br /&gt;
  `gaia_e_bp_min_rp_val` float, &lt;br /&gt;
  `gaia_phot_bp_rp_excess_factor` float, &lt;br /&gt;
  `gaia_astrometric_sigma5d_max` float, &lt;br /&gt;
  `gaia_astrometric_params_solved` tinyint, &lt;br /&gt;
  `flux_g` float, &lt;br /&gt;
  `flux_r` float, &lt;br /&gt;
  `flux_z` float, &lt;br /&gt;
  `flux_w1` float, &lt;br /&gt;
  `flux_w2` float, &lt;br /&gt;
  `flux_w3` float, &lt;br /&gt;
  `flux_w4` float, &lt;br /&gt;
  `flux_ivar_g` float, &lt;br /&gt;
  `flux_ivar_r` float, &lt;br /&gt;
  `flux_ivar_z` float, &lt;br /&gt;
  `flux_ivar_w1` float, &lt;br /&gt;
  `flux_ivar_w2` float, &lt;br /&gt;
  `flux_ivar_w3` float, &lt;br /&gt;
  `flux_ivar_w4` float, &lt;br /&gt;
  `fiberflux_g` float, &lt;br /&gt;
  `fiberflux_r` float, &lt;br /&gt;
  `fiberflux_z` float, &lt;br /&gt;
  `fibertotflux_g` float, &lt;br /&gt;
  `fibertotflux_r` float, &lt;br /&gt;
  `fibertotflux_z` float, &lt;br /&gt;
  `apflux_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `mw_transmission_g` float, &lt;br /&gt;
  `mw_transmission_r` float, &lt;br /&gt;
  `mw_transmission_z` float, &lt;br /&gt;
  `mw_transmission_w1` float, &lt;br /&gt;
  `mw_transmission_w2` float, &lt;br /&gt;
  `mw_transmission_w3` float, &lt;br /&gt;
  `mw_transmission_w4` float, &lt;br /&gt;
  `nobs_g` smallint, &lt;br /&gt;
  `nobs_r` smallint, &lt;br /&gt;
  `nobs_z` smallint, &lt;br /&gt;
  `nobs_w1` smallint, &lt;br /&gt;
  `nobs_w2` smallint, &lt;br /&gt;
  `nobs_w3` smallint, &lt;br /&gt;
  `nobs_w4` smallint, &lt;br /&gt;
  `rchisq_g` float, &lt;br /&gt;
  `rchisq_r` float, &lt;br /&gt;
  `rchisq_z` float, &lt;br /&gt;
  `rchisq_w1` float, &lt;br /&gt;
  `rchisq_w2` float, &lt;br /&gt;
  `rchisq_w3` float, &lt;br /&gt;
  `rchisq_w4` float, &lt;br /&gt;
  `fracflux_g` float, &lt;br /&gt;
  `fracflux_r` float, &lt;br /&gt;
  `fracflux_z` float, &lt;br /&gt;
  `fracflux_w1` float, &lt;br /&gt;
  `fracflux_w2` float, &lt;br /&gt;
  `fracflux_w3` float, &lt;br /&gt;
  `fracflux_w4` float, &lt;br /&gt;
  `fracmasked_g` float, &lt;br /&gt;
  `fracmasked_r` float, &lt;br /&gt;
  `fracmasked_z` float, &lt;br /&gt;
  `fracin_g` float, &lt;br /&gt;
  `fracin_r` float, &lt;br /&gt;
  `fracin_z` float, &lt;br /&gt;
  `anymask_g` smallint, &lt;br /&gt;
  `anymask_r` smallint, &lt;br /&gt;
  `anymask_z` smallint, &lt;br /&gt;
  `allmask_g` smallint, &lt;br /&gt;
  `allmask_r` smallint, &lt;br /&gt;
  `allmask_z` smallint, &lt;br /&gt;
  `wisemask_w1` tinyint, &lt;br /&gt;
  `wisemask_w2` tinyint, &lt;br /&gt;
  `psfsize_g` float, &lt;br /&gt;
  `psfsize_r` float, &lt;br /&gt;
  `psfsize_z` float, &lt;br /&gt;
  `psfdepth_g` float, &lt;br /&gt;
  `psfdepth_r` float, &lt;br /&gt;
  `psfdepth_z` float, &lt;br /&gt;
  `galdepth_g` float, &lt;br /&gt;
  `galdepth_r` float, &lt;br /&gt;
  `galdepth_z` float, &lt;br /&gt;
  `nea_g` float, &lt;br /&gt;
  `nea_r` float, &lt;br /&gt;
  `nea_z` float, &lt;br /&gt;
  `blob_nea_g` float, &lt;br /&gt;
  `blob_nea_r` float, &lt;br /&gt;
  `blob_nea_z` float, &lt;br /&gt;
  `psfdepth_w1` float, &lt;br /&gt;
  `psfdepth_w2` float, &lt;br /&gt;
  `psfdepth_w3` float, &lt;br /&gt;
  `psfdepth_w4` float, &lt;br /&gt;
  `wise_coadd_id` string, &lt;br /&gt;
  `wise_x` float, &lt;br /&gt;
  `wise_y` float, &lt;br /&gt;
  `lc_flux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_ivar_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_ivar_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_nobs_w1` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_nobs_w2` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_fracflux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_fracflux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_rchisq_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_rchisq_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_mjd_w1` array&amp;lt;double&amp;gt;, &lt;br /&gt;
  `lc_mjd_w2` array&amp;lt;double&amp;gt;, &lt;br /&gt;
  `lc_epoch_index_w1` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_epoch_index_w2` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `sersic` float, &lt;br /&gt;
  `sersic_ivar` float, &lt;br /&gt;
  `shape_r` float, &lt;br /&gt;
  `shape_r_ivar` float, &lt;br /&gt;
  `shape_e1` float, &lt;br /&gt;
  `shape_e1_ivar` float, &lt;br /&gt;
  `shape_e2` float, &lt;br /&gt;
  `shape_e2_ivar` float)&lt;br /&gt;
 PARTITIONED BY (&lt;br /&gt;
   h STRING,&lt;br /&gt;
   r STRING&lt;br /&gt;
 )&lt;br /&gt;
 STORED AS PARQUET&lt;br /&gt;
 LOCATION '/user/tallada/data/legacysurvey_dr9'&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Internal Table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE `cosmohub`.`legacy_survey_dr9`(&lt;br /&gt;
  `release` smallint,&lt;br /&gt;
  `brickid` int,&lt;br /&gt;
  `brickname` string,&lt;br /&gt;
  `objid` int,&lt;br /&gt;
  `brick_primary` boolean,&lt;br /&gt;
  `maskbits` smallint,&lt;br /&gt;
  `fitbits` smallint,&lt;br /&gt;
  `type` string,&lt;br /&gt;
  `ra` double,&lt;br /&gt;
  `dec` double,&lt;br /&gt;
  `ra_ivar` float,&lt;br /&gt;
  `dec_ivar` float,&lt;br /&gt;
  `bx` float,&lt;br /&gt;
  `by` float,&lt;br /&gt;
  `dchisq` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `ebv` float,&lt;br /&gt;
  `mjd_min` double,&lt;br /&gt;
  `mjd_max` double,&lt;br /&gt;
  `ref_cat` string,&lt;br /&gt;
  `ref_id` bigint,&lt;br /&gt;
  `pmra` float,&lt;br /&gt;
  `pmdec` float,&lt;br /&gt;
  `parallax` float,&lt;br /&gt;
  `pmra_ivar` float,&lt;br /&gt;
  `pmdec_ivar` float,&lt;br /&gt;
  `parallax_ivar` float,&lt;br /&gt;
  `ref_epoch` float,&lt;br /&gt;
  `gaia_phot_g_mean_mag` float,&lt;br /&gt;
  `gaia_phot_g_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_g_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_bp_mean_mag` float,&lt;br /&gt;
  `gaia_phot_bp_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_bp_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_rp_mean_mag` float,&lt;br /&gt;
  `gaia_phot_rp_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_rp_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_variable_flag` boolean,&lt;br /&gt;
  `gaia_astrometric_excess_noise` float,&lt;br /&gt;
  `gaia_astrometric_excess_noise_sig` float,&lt;br /&gt;
  `gaia_astrometric_n_obs_al` smallint,&lt;br /&gt;
  `gaia_astrometric_n_good_obs_al` smallint,&lt;br /&gt;
  `gaia_astrometric_weight_al` float,&lt;br /&gt;
  `gaia_duplicated_source` boolean,&lt;br /&gt;
  `gaia_a_g_val` float,&lt;br /&gt;
  `gaia_e_bp_min_rp_val` float,&lt;br /&gt;
  `gaia_phot_bp_rp_excess_factor` float,&lt;br /&gt;
  `gaia_astrometric_sigma5d_max` float,&lt;br /&gt;
  `gaia_astrometric_params_solved` tinyint,&lt;br /&gt;
  `flux_g` float,&lt;br /&gt;
  `flux_r` float,&lt;br /&gt;
  `flux_z` float,&lt;br /&gt;
  `flux_w1` float,&lt;br /&gt;
  `flux_w2` float,&lt;br /&gt;
  `flux_w3` float,&lt;br /&gt;
  `flux_w4` float,&lt;br /&gt;
  `flux_ivar_g` float,&lt;br /&gt;
  `flux_ivar_r` float,&lt;br /&gt;
  `flux_ivar_z` float,&lt;br /&gt;
  `flux_ivar_w1` float,&lt;br /&gt;
  `flux_ivar_w2` float,&lt;br /&gt;
  `flux_ivar_w3` float,&lt;br /&gt;
  `flux_ivar_w4` float,&lt;br /&gt;
  `fiberflux_g` float,&lt;br /&gt;
  `fiberflux_r` float,&lt;br /&gt;
  `fiberflux_z` float,&lt;br /&gt;
  `fibertotflux_g` float,&lt;br /&gt;
  `fibertotflux_r` float,&lt;br /&gt;
  `fibertotflux_z` float,&lt;br /&gt;
  `apflux_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `mw_transmission_g` float,&lt;br /&gt;
  `mw_transmission_r` float,&lt;br /&gt;
  `mw_transmission_z` float,&lt;br /&gt;
  `mw_transmission_w1` float,&lt;br /&gt;
  `mw_transmission_w2` float,&lt;br /&gt;
  `mw_transmission_w3` float,&lt;br /&gt;
  `mw_transmission_w4` float,&lt;br /&gt;
  `nobs_g` smallint,&lt;br /&gt;
  `nobs_r` smallint,&lt;br /&gt;
  `nobs_z` smallint,&lt;br /&gt;
  `nobs_w1` smallint,&lt;br /&gt;
  `nobs_w2` smallint,&lt;br /&gt;
  `nobs_w3` smallint,&lt;br /&gt;
  `nobs_w4` smallint,&lt;br /&gt;
  `rchisq_g` float,&lt;br /&gt;
  `rchisq_r` float,&lt;br /&gt;
  `rchisq_z` float,&lt;br /&gt;
  `rchisq_w1` float,&lt;br /&gt;
  `rchisq_w2` float,&lt;br /&gt;
  `rchisq_w3` float,&lt;br /&gt;
  `rchisq_w4` float,&lt;br /&gt;
  `fracflux_g` float,&lt;br /&gt;
  `fracflux_r` float,&lt;br /&gt;
  `fracflux_z` float,&lt;br /&gt;
  `fracflux_w1` float,&lt;br /&gt;
  `fracflux_w2` float,&lt;br /&gt;
  `fracflux_w3` float,&lt;br /&gt;
  `fracflux_w4` float,&lt;br /&gt;
  `fracmasked_g` float,&lt;br /&gt;
  `fracmasked_r` float,&lt;br /&gt;
  `fracmasked_z` float,&lt;br /&gt;
  `fracin_g` float,&lt;br /&gt;
  `fracin_r` float,&lt;br /&gt;
  `fracin_z` float,&lt;br /&gt;
  `anymask_g` smallint,&lt;br /&gt;
  `anymask_r` smallint,&lt;br /&gt;
  `anymask_z` smallint,&lt;br /&gt;
  `allmask_g` smallint,&lt;br /&gt;
  `allmask_r` smallint,&lt;br /&gt;
  `allmask_z` smallint,&lt;br /&gt;
  `wisemask_w1` tinyint,&lt;br /&gt;
  `wisemask_w2` tinyint,&lt;br /&gt;
  `psfsize_g` float,&lt;br /&gt;
  `psfsize_r` float,&lt;br /&gt;
  `psfsize_z` float,&lt;br /&gt;
  `psfdepth_g` float,&lt;br /&gt;
  `psfdepth_r` float,&lt;br /&gt;
  `psfdepth_z` float,&lt;br /&gt;
  `galdepth_g` float,&lt;br /&gt;
  `galdepth_r` float,&lt;br /&gt;
  `galdepth_z` float,&lt;br /&gt;
  `nea_g` float,&lt;br /&gt;
  `nea_r` float,&lt;br /&gt;
  `nea_z` float,&lt;br /&gt;
  `blob_nea_g` float,&lt;br /&gt;
  `blob_nea_r` float,&lt;br /&gt;
  `blob_nea_z` float,&lt;br /&gt;
  `psfdepth_w1` float,&lt;br /&gt;
  `psfdepth_w2` float,&lt;br /&gt;
  `psfdepth_w3` float,&lt;br /&gt;
  `psfdepth_w4` float,&lt;br /&gt;
  `wise_coadd_id` string,&lt;br /&gt;
  `wise_x` float,&lt;br /&gt;
  `wise_y` float,&lt;br /&gt;
  `lc_flux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_ivar_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_ivar_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_nobs_w1` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_nobs_w2` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_fracflux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_fracflux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_rchisq_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_rchisq_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_mjd_w1` array&amp;lt;double&amp;gt;,&lt;br /&gt;
  `lc_mjd_w2` array&amp;lt;double&amp;gt;,&lt;br /&gt;
  `lc_epoch_index_w1` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_epoch_index_w2` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `sersic` float,&lt;br /&gt;
  `sersic_ivar` float,&lt;br /&gt;
  `shape_r` float,&lt;br /&gt;
  `shape_r_ivar` float,&lt;br /&gt;
  `shape_e1` float,&lt;br /&gt;
  `shape_e1_ivar` float,&lt;br /&gt;
  `shape_e2` float,&lt;br /&gt;
  `shape_e2_ivar` float)&lt;br /&gt;
 CLUSTERED BY (&lt;br /&gt;
  release, brickid, objid&lt;br /&gt;
 )&lt;br /&gt;
 SORTED BY (&lt;br /&gt;
  release, brickid, objid&lt;br /&gt;
 )&lt;br /&gt;
 INTO 4096 BUCKETS&lt;br /&gt;
 STORED AS ORC&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INSERT INTO TABLE cosmohub.legacy_survey_dr9&lt;br /&gt;
 SELECT  release, brickid, brickname, objid, brick_primary, maskbits, fitbits, type, ra, `dec`, ra_ivar, dec_ivar,&lt;br /&gt;
 bx, `by`, dchisq, ebv, mjd_min, mjd_max, ref_cat, ref_id, pmra, pmdec, parallax, pmra_ivar, pmdec_ivar,&lt;br /&gt;
 parallax_ivar, ref_epoch, gaia_phot_g_mean_mag, gaia_phot_g_mean_flux_over_error, gaia_phot_g_n_obs,&lt;br /&gt;
 gaia_phot_bp_mean_mag, gaia_phot_bp_mean_flux_over_error, gaia_phot_bp_n_obs, gaia_phot_rp_mean_mag,&lt;br /&gt;
 gaia_phot_rp_mean_flux_over_error, gaia_phot_rp_n_obs, gaia_phot_variable_flag, gaia_astrometric_excess_noise,&lt;br /&gt;
 gaia_astrometric_excess_noise_sig, gaia_astrometric_n_obs_al, gaia_astrometric_n_good_obs_al,&lt;br /&gt;
 gaia_astrometric_weight_al, gaia_duplicated_source, gaia_a_g_val, gaia_e_bp_min_rp_val,&lt;br /&gt;
 gaia_phot_bp_rp_excess_factor, gaia_astrometric_sigma5d_max, gaia_astrometric_params_solved, flux_g, flux_r,&lt;br /&gt;
 flux_z, flux_w1, flux_w2, flux_w3, flux_w4, flux_ivar_g, flux_ivar_r, flux_ivar_z, flux_ivar_w1, flux_ivar_w2,&lt;br /&gt;
 flux_ivar_w3, flux_ivar_w4, fiberflux_g, fiberflux_r, fiberflux_z, fibertotflux_g, fibertotflux_r, fibertotflux_z,&lt;br /&gt;
 apflux_g, apflux_r, apflux_z, apflux_resid_g, apflux_resid_r, apflux_resid_z, apflux_blobresid_g,&lt;br /&gt;
 apflux_blobresid_r, apflux_blobresid_z, apflux_ivar_g, apflux_ivar_r, apflux_ivar_z, apflux_masked_g,&lt;br /&gt;
 apflux_masked_r, apflux_masked_z, apflux_w1, apflux_w2, apflux_w3, apflux_w4, apflux_resid_w1, apflux_resid_w2,&lt;br /&gt;
 apflux_resid_w3, apflux_resid_w4, apflux_ivar_w1, apflux_ivar_w2, apflux_ivar_w3, apflux_ivar_w4,&lt;br /&gt;
 mw_transmission_g, mw_transmission_r, mw_transmission_z, mw_transmission_w1, mw_transmission_w2,&lt;br /&gt;
 mw_transmission_w3, mw_transmission_w4, nobs_g, nobs_r, nobs_z, nobs_w1, nobs_w2, nobs_w3, nobs_w4, rchisq_g,&lt;br /&gt;
 rchisq_r, rchisq_z, rchisq_w1, rchisq_w2, rchisq_w3, rchisq_w4, fracflux_g, fracflux_r, fracflux_z, fracflux_w1,&lt;br /&gt;
 fracflux_w2, fracflux_w3, fracflux_w4, fracmasked_g, fracmasked_r, fracmasked_z, fracin_g, fracin_r, fracin_z,&lt;br /&gt;
 anymask_g, anymask_r, anymask_z, allmask_g, allmask_r, allmask_z, wisemask_w1, wisemask_w2, psfsize_g, psfsize_r,&lt;br /&gt;
 psfsize_z, psfdepth_g, psfdepth_r, psfdepth_z, galdepth_g, galdepth_r, galdepth_z, nea_g, nea_r, nea_z,&lt;br /&gt;
 blob_nea_g, blob_nea_r, blob_nea_z, psfdepth_w1, psfdepth_w2, psfdepth_w3, psfdepth_w4, wise_coadd_id, wise_x,&lt;br /&gt;
 wise_y, lc_flux_w1, lc_flux_w2, lc_flux_ivar_w1, lc_flux_ivar_w2, lc_nobs_w1, lc_nobs_w2, lc_fracflux_w1,&lt;br /&gt;
 lc_fracflux_w2, lc_rchisq_w1, lc_rchisq_w2, lc_mjd_w1, lc_mjd_w2, lc_epoch_index_w1, lc_epoch_index_w2, sersic,&lt;br /&gt;
 sersic_ivar, shape_r, shape_r_ivar, shape_e1, shape_e1_ivar, shape_e2, shape_e2_ivar&lt;br /&gt;
 FROM cosmohub.legacy_survey_dr9_p&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE release release smallint COMMENT &amp;quot;Unique integer denoting the camera and filter set used&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE brickid brickid int COMMENT &amp;quot;Brick ID [1,662174]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE brickname brickname string COMMENT &amp;quot;Name of brick, encoding the brick sky position, eg \u00221126p222\u0022 near RA=112.6, Dec=+22.2&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE objid objid int COMMENT &amp;quot;Catalog object number within this brick\u003b a unique identifier hash is release,brickid,objid\u003b objid spans [0,N-1] and is contiguously enumerated within each brick&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE brick_primary brick_primary boolean COMMENT &amp;quot;True if the object is within the brick boundary&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE maskbits maskbits smallint COMMENT &amp;quot;Bitwise mask indicating that an object touches a pixel in the coadd/*/*/*maskbits* maps, as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fitbits fitbits smallint COMMENT &amp;quot;Bitwise mask detailing pecularities of how an object was fit, as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE type type string COMMENT &amp;quot;Morphological model: \u0022PSF\u0022=stellar, \u0022REX\u0022=\u0022round exponential galaxy\u0022, \u0022DEV\u0022=deVauc, \u0022EXP\u0022=exponential, \u0022SER\u0022=Sersic, \u0022DUP\u0022=Gaia source fit by different model.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ra ra double COMMENT &amp;quot;Right ascension at equinox J2000&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE `dec` `dec` double COMMENT &amp;quot;Declination at equinox J2000&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ra_ivar ra_ivar float COMMENT &amp;quot;Inverse variance of RA (no cosine term!), excluding astrometric calibration errors&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE dec_ivar dec_ivar float COMMENT &amp;quot;Inverse variance of DEC, excluding astrometric calibration errors&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE bx bx float COMMENT &amp;quot;X position (0-indexed) of coordinates in the brick image stack (i.e. in the e.g. legacysurvey-&amp;lt;brick&amp;gt;-image-g.fits.fz coadd file)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE `by` `by` float COMMENT &amp;quot;Y position (0-indexed) of coordinates in brick image stack&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE dchisq dchisq array&amp;lt;float&amp;gt; COMMENT &amp;quot;Difference in χ² between successively more-complex model fits: PSF, REX, DEV, EXP, SER. The difference is versus no source.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ebv ebv float COMMENT &amp;quot;Galactic extinction E(B-V) reddening from SFD98, used to compute the mw_transmission_ columns&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mjd_min mjd_min double COMMENT &amp;quot;Minimum Modified Julian Date of observations used to construct the model of this object&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mjd_max mjd_max double COMMENT &amp;quot;Maximum Modified Julian Date of observations used to construct the model of this object&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ref_cat ref_cat string COMMENT &amp;quot;Reference catalog source for this star: \u0022T2\u0022 for Tycho-2, \u0022G2\u0022 for Gaia DR2, \u0022L3\u0022 for the SGA, empty otherwise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ref_id ref_id bigint COMMENT &amp;quot;Reference catalog identifier for this star\u003b Tyc1*1,000,000+Tyc2*10+Tyc3 for Tycho2\u003b \u0022sourceid\u0022 for Gaia DR2 and SGA&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE pmra pmra float COMMENT &amp;quot;Reference catalog proper motion in the RA direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE pmdec pmdec float COMMENT &amp;quot;Reference catalog proper motion in the Dec direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE parallax parallax float COMMENT &amp;quot;Reference catalog parallax&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE pmra_ivar pmra_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on pmra&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE pmdec_ivar pmdec_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on pmdec&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE parallax_ivar parallax_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on parallax&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ref_epoch ref_epoch float COMMENT &amp;quot;Reference catalog reference epoch (eg, 2015.5 for Gaia DR2)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_g_mean_mag gaia_phot_g_mean_mag float COMMENT &amp;quot;Gaia G band mag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_g_mean_flux_over_error gaia_phot_g_mean_flux_over_error float COMMENT &amp;quot;Gaia G band signal-to-noise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_g_n_obs gaia_phot_g_n_obs smallint COMMENT &amp;quot;Gaia G band number of observations&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_bp_mean_mag gaia_phot_bp_mean_mag float COMMENT &amp;quot;Gaia BP mag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_bp_mean_flux_over_error gaia_phot_bp_mean_flux_over_error float COMMENT &amp;quot;Gaia BP signal-to-noise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_bp_n_obs gaia_phot_bp_n_obs smallint COMMENT &amp;quot;Gaia BP number of observations&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_rp_mean_mag gaia_phot_rp_mean_mag float COMMENT &amp;quot;Gaia RP mag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_rp_mean_flux_over_error gaia_phot_rp_mean_flux_over_error float COMMENT &amp;quot;Gaia RP signal-to-noise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_rp_n_obs gaia_phot_rp_n_obs smallint COMMENT &amp;quot;Gaia RP number of observations&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_variable_flag gaia_phot_variable_flag boolean COMMENT &amp;quot;Gaia photometric variable flag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_excess_noise gaia_astrometric_excess_noise float COMMENT &amp;quot;Gaia astrometric excess noise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_excess_noise_sig gaia_astrometric_excess_noise_sig float COMMENT &amp;quot;Gaia astrometric excess noise uncertainty&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_n_obs_al gaia_astrometric_n_obs_al smallint COMMENT &amp;quot;Gaia number of astrometric observations along scan direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_n_good_obs_al gaia_astrometric_n_good_obs_al smallint COMMENT &amp;quot;Gaia number of good astrometric observations along scan direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_weight_al gaia_astrometric_weight_al float COMMENT &amp;quot;Gaia astrometric weight along scan direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_duplicated_source gaia_duplicated_source boolean COMMENT &amp;quot;Gaia duplicated source flag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_a_g_val gaia_a_g_val float COMMENT &amp;quot;Gaia line-of-sight extinction in the G band&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_e_bp_min_rp_val gaia_e_bp_min_rp_val float COMMENT &amp;quot;Gaia line-of-sight reddening E(BP-RP)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_bp_rp_excess_factor gaia_phot_bp_rp_excess_factor float COMMENT &amp;quot;Gaia BP/RP excess factor&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_sigma5d_max gaia_astrometric_sigma5d_max float COMMENT &amp;quot;Gaia longest semi-major axis of the 5-d error ellipsoid&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_params_solved gaia_astrometric_params_solved tinyint COMMENT &amp;quot;which astrometric parameters were estimated for a Gaia source&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_g flux_g float COMMENT &amp;quot;model flux in gg&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_r flux_r float COMMENT &amp;quot;model flux in rr&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_z flux_z float COMMENT &amp;quot;model flux in zz&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_w1 flux_w1 float COMMENT &amp;quot;WISE model flux in W1W1 (AB system)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_w2 flux_w2 float COMMENT &amp;quot;WISE model flux in W2W2 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_w3 flux_w3 float COMMENT &amp;quot;WISE model flux in W3W3 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_w4 flux_w4 float COMMENT &amp;quot;WISE model flux in W4W4 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_g flux_ivar_g float COMMENT &amp;quot;Inverse variance of flux_g&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_r flux_ivar_r float COMMENT &amp;quot;Inverse variance of flux_r&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_z flux_ivar_z float COMMENT &amp;quot;Inverse variance of flux_z&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_w1 flux_ivar_w1 float COMMENT &amp;quot;Inverse variance of flux_w1 (AB system)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_w2 flux_ivar_w2 float COMMENT &amp;quot;Inverse variance of flux_w2 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_w3 flux_ivar_w3 float COMMENT &amp;quot;Inverse variance of flux_w3 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_w4 flux_ivar_w4 float COMMENT &amp;quot;Inverse variance of flux_w4 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fiberflux_g fiberflux_g float COMMENT &amp;quot;Predicted gg-band flux within a fiber of diameter 1.5 arcsec from this object in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fiberflux_r fiberflux_r float COMMENT &amp;quot;Predicted rr-band flux within a fiber of diameter 1.5 arcsec from this object in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fiberflux_z fiberflux_z float COMMENT &amp;quot;Predicted zz-band flux within a fiber of diameter 1.5 arcsec from this object in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fibertotflux_g fibertotflux_g float COMMENT &amp;quot;Predicted gg-band flux within a fiber of diameter 1.5 arcsec from all sources at this location in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fibertotflux_r fibertotflux_r float COMMENT &amp;quot;Predicted rr-band flux within a fiber of diameter 1.5 arcsec from all sources at this location in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fibertotflux_z fibertotflux_z float COMMENT &amp;quot;Predicted zz-band flux within a fiber of diameter 1.5 arcsec from all sources at this location in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_g apflux_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in gg, masked by invvar=0invvar=0 (inverse variance of zero [1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_r apflux_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in rr, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_z apflux_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in zz, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_g apflux_resid_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in gg, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_r apflux_resid_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in rr, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_z apflux_resid_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in zz, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_blobresid_g apflux_blobresid_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on image−blobmodelimage−blobmodel residual maps in gg [2], masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_blobresid_r apflux_blobresid_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on image−blobmodelimage−blobmodel residual maps in rr, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_blobresid_z apflux_blobresid_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on image−blobmodelimage−blobmodel residual maps in zz, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_g apflux_ivar_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_g, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_r apflux_ivar_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_r, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_z apflux_ivar_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_z, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_masked_g apflux_masked_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Fraction of pixels masked in gg-band aperture flux measurements\u003b 1 means fully masked (ie, fully ignored\u003b contributing zero to the measurement)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_masked_r apflux_masked_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Fraction of pixels masked in rr-band aperture flux measurements\u003b 1 means fully masked (ie, fully ignored\u003b contributing zero to the measurement)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_masked_z apflux_masked_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Fraction of pixels masked in zz-band aperture flux measurements\u003b 1 means fully masked (ie, fully ignored\u003b contributing zero to the measurement)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_w1 apflux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [3, 5, 7, 9, 11] [3] arcsec in W1W1, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_w2 apflux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [3, 5, 7, 9, 11] arcsec in W2W2, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_w3 apflux_w3 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [3, 5, 7, 9, 11] arcsec in W3W3, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_w4 apflux_w4 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [3, 5, 7, 9, 11] arcsec in W4W4, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_w1 apflux_resid_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in W1W1, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_w2 apflux_resid_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in W2W2, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_w3 apflux_resid_w3 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in W3W3, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_w4 apflux_resid_w4 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in W4W4, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_w1 apflux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_w1, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_w2 apflux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_w2, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_w3 apflux_ivar_w3 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_w3, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_w4 apflux_ivar_w4 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_w4, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_g mw_transmission_g float COMMENT &amp;quot;Galactic transmission in gg filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_r mw_transmission_r float COMMENT &amp;quot;Galactic transmission in rr filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_z mw_transmission_z float COMMENT &amp;quot;Galactic transmission in zz filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_w1 mw_transmission_w1 float COMMENT &amp;quot;Galactic transmission in W1W1 filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_w2 mw_transmission_w2 float COMMENT &amp;quot;Galactic transmission in W2W2 filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_w3 mw_transmission_w3 float COMMENT &amp;quot;Galactic transmission in W3W3 filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_w4 mw_transmission_w4 float COMMENT &amp;quot;Galactic transmission in W4W4 filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_g nobs_g smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in gg: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_r nobs_r smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in rr: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_z nobs_z smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in zz: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_w1 nobs_w1 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W1W1: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_w2 nobs_w2 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W2W2: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_w3 nobs_w3 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W3W3: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_w4 nobs_w4 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W4W4: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_g rchisq_g float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in gg&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_r rchisq_r float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in rr&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_z rchisq_z float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in zz&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_w1 rchisq_w1 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W1W1&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_w2 rchisq_w2 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W2W2&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_w3 rchisq_w3 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W3W3&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_w4 rchisq_w4 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W4W4&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_g fracflux_g float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in gg (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_r fracflux_r float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in rr (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_z fracflux_z float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in zz (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_w1 fracflux_w1 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W1W1 (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_w2 fracflux_w2 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W2W2 (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_w3 fracflux_w3 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W3W3 (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_w4 fracflux_w4 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W4W4 (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracmasked_g fracmasked_g float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in gg, strictly between [0,1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracmasked_r fracmasked_r float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in rr, strictly between [0,1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracmasked_z fracmasked_z float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in zz, strictly between [0,1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracin_g fracin_g float COMMENT &amp;quot;Fraction of a source's flux within the blob in gg, near unity for real sources&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracin_r fracin_r float COMMENT &amp;quot;Fraction of a source's flux within the blob in rr, near unity for real sources&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracin_z fracin_z float COMMENT &amp;quot;Fraction of a source's flux within the blob in zz, near unity for real sources&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE anymask_g anymask_g smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in gg as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE anymask_r anymask_r smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in rr as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE anymask_z anymask_z smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in zz as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE allmask_g allmask_g smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in gg as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE allmask_r allmask_r smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in rr as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE allmask_z allmask_z smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in zz as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wisemask_w1 wisemask_w1 tinyint COMMENT &amp;quot;W1 bitmask as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wisemask_w2 wisemask_w2 tinyint COMMENT &amp;quot;W2 bitmask as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfsize_g psfsize_g float COMMENT &amp;quot;Weighted average PSF FWHM in the gg band&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfsize_r psfsize_r float COMMENT &amp;quot;Weighted average PSF FWHM in the rr band&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfsize_z psfsize_z float COMMENT &amp;quot;Weighted average PSF FWHM in the zz band&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_g psfdepth_g float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_g)5/(psfdepth_g) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_g))−9]−2.5[log10⁡(5/(psfdepth_g))−9] gives corresponding AB magnitude&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_r psfdepth_r float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_r)5/(psfdepth_r) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_r))−9]−2.5[log10⁡(5/(psfdepth_r))−9] gives corresponding AB magnitude&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_z psfdepth_z float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_z)5/(psfdepth_z) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_z))−9]−2.5[log10⁡(5/(psfdepth_z))−9] gives corresponding AB magnitude&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE galdepth_g galdepth_g float COMMENT &amp;quot;As for psfdepth_g but for a galaxy (0.45\u0022 exp, round) detection sensitivity&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE galdepth_r galdepth_r float COMMENT &amp;quot;As for psfdepth_r but for a galaxy (0.45\u0022 exp, round) detection sensitivity&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE galdepth_z galdepth_z float COMMENT &amp;quot;As for psfdepth_z but for a galaxy (0.45\u0022 exp, round) detection sensitivity&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nea_g nea_g float COMMENT &amp;quot;Noise equivalent area in gg.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nea_r nea_r float COMMENT &amp;quot;Noise equivalent area in rr.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nea_z nea_z float COMMENT &amp;quot;Noise equivalent area in zz.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE blob_nea_g blob_nea_g float COMMENT &amp;quot;Blob-masked noise equivalent area in gg.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE blob_nea_r blob_nea_r float COMMENT &amp;quot;Blob-masked noise equivalent area in rr.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE blob_nea_z blob_nea_z float COMMENT &amp;quot;Blob-masked noise equivalent area in zz.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_w1 psfdepth_w1 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W1&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_w2 psfdepth_w2 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W2&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_w3 psfdepth_w3 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W3&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_w4 psfdepth_w4 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W4&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wise_coadd_id wise_coadd_id string COMMENT &amp;quot;unWISE coadd brick name (corresponding to the, e.g., legacysurvey-&amp;lt;brick&amp;gt;-image-W1.fits.fz coadd file) for the center of each object&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wise_x wise_x float COMMENT &amp;quot;X position of coordinates in the brick image stack that corresponds to wise_coadd_id (see the DR9 updates page for transformations between wise_x and bx)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wise_y wise_y float COMMENT &amp;quot;Y position of coordinates in the brick image stack that corresponds to wise_coadd_id (see the DR9 updates page for transformations between wise_y and by)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_flux_w1 lc_flux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;flux_w1 in each of up to fifteen unWISE coadd epochs (AB system\u003b defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_flux_w2 lc_flux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;flux_w2 in each of up to fifteen unWISE coadd epochs (AB\u003b defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_flux_ivar_w1 lc_flux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of lc_flux_w1 (AB system\u003b defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_flux_ivar_w2 lc_flux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of lc_flux_w2 (AB\u003b defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_nobs_w1 lc_nobs_w1 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;nobs_w1 in each of up to fifteen unWISE coadd epochs&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_nobs_w2 lc_nobs_w2 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;nobs_w2 in each of up to fifteen unWISE coadd epochs&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_fracflux_w1 lc_fracflux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;fracflux_w1 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_fracflux_w2 lc_fracflux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;fracflux_w2 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_rchisq_w1 lc_rchisq_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;rchisq_w1 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_rchisq_w2 lc_rchisq_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;rchisq_w2 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_mjd_w1 lc_mjd_w1 array&amp;lt;double&amp;gt; COMMENT &amp;quot;mjd_w1 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_mjd_w2 lc_mjd_w2 array&amp;lt;double&amp;gt; COMMENT &amp;quot;mjd_w2 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_epoch_index_w1 lc_epoch_index_w1 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;Index number of unWISE epoch for W1 (defaults to -1 for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_epoch_index_w2 lc_epoch_index_w2 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;Index number of unWISE epoch for W2 (defaults to -1 for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE sersic sersic float COMMENT &amp;quot;Power-law index for the Sersic profile model (type=\u0022SER\u0022)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE sersic_ivar sersic_ivar float COMMENT &amp;quot;Inverse variance of sersic&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_r shape_r float COMMENT &amp;quot;Half-light radius of galaxy model for galaxy type type (&amp;gt;0)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_r_ivar shape_r_ivar float COMMENT &amp;quot;Inverse variance of shape_r&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_e1 shape_e1 float COMMENT &amp;quot;Ellipticity component 1 of galaxy model for galaxy type type&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_e1_ivar shape_e1_ivar float COMMENT &amp;quot;Inverse variance of shape_e1&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_e2 shape_e2 float COMMENT &amp;quot;Ellipticity component 2 of galaxy model for galaxy type type&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_e2_ivar shape_e2_ivar float COMMENT &amp;quot;Inverse variance of shape_e2&amp;quot; ;&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Legacy_Survey_DR9&amp;diff=877</id>
		<title>Legacy Survey DR9</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Legacy_Survey_DR9&amp;diff=877"/>
		<updated>2020-11-30T21:04:31Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Comments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Original DR9 ==&lt;br /&gt;
=== Raw data ===&lt;br /&gt;
&lt;br /&gt;
Downloaded from NERSC&lt;br /&gt;
 /global/cfs/cdirs/cosmo/work/legacysurvey/dr9m&lt;br /&gt;
&lt;br /&gt;
Directories:&lt;br /&gt;
 south/tractor&lt;br /&gt;
 north/tractor&lt;br /&gt;
&lt;br /&gt;
Downloaded using bbcp from services01.euclid into CephFS scratch:&lt;br /&gt;
 bbcp -s 16 -a -A -v -z -r -S &amp;quot;ssh -x -a -oFallBackToRsh=no %I -l %U %H /usr/common/usg/bin/bbcp&amp;quot; \&lt;br /&gt;
 &amp;quot;jcarrete@dtn01.nersc.gov:/global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/north/tractor&amp;quot; \&lt;br /&gt;
 /cephfs/pic.es/astro/scratch/tallada/dr9m/north/tractor&lt;br /&gt;
 bbcp -s 16 -a -A -v -z -r -S &amp;quot;ssh -x -a -oFallBackToRsh=no %I -l %U %H /usr/common/usg/bin/bbcp&amp;quot; \&lt;br /&gt;
 &amp;quot;jcarrete@dtn01.nersc.gov:/global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/south/tractor&amp;quot; \&lt;br /&gt;
 /cephfs/pic.es/astro/scratch/tallada/dr9m/south/tractor&lt;br /&gt;
&lt;br /&gt;
Checksums provided through sha256sum files, and checked using command:&lt;br /&gt;
 find * -type d | xargs -t -L1 -P24 sh -c 'cd $1; sha256sum --quiet -c *.sha256sum' cksum&lt;br /&gt;
&lt;br /&gt;
=== Parquet ===&lt;br /&gt;
&lt;br /&gt;
The following code snippet was used in spark to convert fits files to parquet:&lt;br /&gt;
&lt;br /&gt;
 path_base = '/cephfs/pic.es/astro/scratch/tallada/dr9m'&lt;br /&gt;
 hdfs_base = '/user/tallada/data/legacysurvey_dr9'&lt;br /&gt;
 &lt;br /&gt;
 hs = ['h=north', 'h=south']&lt;br /&gt;
 rs = ['r={0:03d}'.format(x) for x in range(360)]&lt;br /&gt;
 &lt;br /&gt;
 for h in hs:&lt;br /&gt;
     for r in rs:&lt;br /&gt;
         p = os.path.join(path_base, h, r)&lt;br /&gt;
         if not os.path.exists(p):&lt;br /&gt;
             continue&lt;br /&gt;
         &lt;br /&gt;
         size = sum(os.path.getsize(os.path.join(p,f)) for f in os.listdir(p) if os.path.isfile(os.path.join(p,f)))&lt;br /&gt;
        &lt;br /&gt;
         print h, r, size        &lt;br /&gt;
         &lt;br /&gt;
         df = spark.read.format(&amp;quot;fits&amp;quot;).option(&amp;quot;hdu&amp;quot;, 1).load(&lt;br /&gt;
             &amp;quot;file://&amp;quot; + p&lt;br /&gt;
         )&lt;br /&gt;
         &lt;br /&gt;
         df = df.repartition(int(math.ceil(size / (256*1024*1024.0))))&lt;br /&gt;
                 &lt;br /&gt;
         df.write.parquet(os.path.join(hdfs_base, h, r))&lt;br /&gt;
&lt;br /&gt;
=== External table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE `tallada`.`legacysurvey_dr9`(&lt;br /&gt;
  `release` smallint, &lt;br /&gt;
  `brickid` int, &lt;br /&gt;
  `brickname` string, &lt;br /&gt;
  `objid` int, &lt;br /&gt;
  `brick_primary` boolean, &lt;br /&gt;
  `maskbits` smallint, &lt;br /&gt;
  `fitbits` smallint, &lt;br /&gt;
  `type` string, &lt;br /&gt;
  `ra` double, &lt;br /&gt;
  `dec` double, &lt;br /&gt;
  `ra_ivar` float, &lt;br /&gt;
  `dec_ivar` float, &lt;br /&gt;
  `bx` float, &lt;br /&gt;
  `by` float, &lt;br /&gt;
  `dchisq` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `ebv` float, &lt;br /&gt;
  `mjd_min` double, &lt;br /&gt;
  `mjd_max` double, &lt;br /&gt;
  `ref_cat` string, &lt;br /&gt;
  `ref_id` bigint, &lt;br /&gt;
  `pmra` float, &lt;br /&gt;
  `pmdec` float, &lt;br /&gt;
  `parallax` float, &lt;br /&gt;
  `pmra_ivar` float, &lt;br /&gt;
  `pmdec_ivar` float, &lt;br /&gt;
  `parallax_ivar` float, &lt;br /&gt;
  `ref_epoch` float, &lt;br /&gt;
  `gaia_phot_g_mean_mag` float, &lt;br /&gt;
  `gaia_phot_g_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_g_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_bp_mean_mag` float, &lt;br /&gt;
  `gaia_phot_bp_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_bp_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_rp_mean_mag` float, &lt;br /&gt;
  `gaia_phot_rp_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_rp_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_variable_flag` boolean, &lt;br /&gt;
  `gaia_astrometric_excess_noise` float, &lt;br /&gt;
  `gaia_astrometric_excess_noise_sig` float, &lt;br /&gt;
  `gaia_astrometric_n_obs_al` smallint, &lt;br /&gt;
  `gaia_astrometric_n_good_obs_al` smallint, &lt;br /&gt;
  `gaia_astrometric_weight_al` float, &lt;br /&gt;
  `gaia_duplicated_source` boolean, &lt;br /&gt;
  `gaia_a_g_val` float, &lt;br /&gt;
  `gaia_e_bp_min_rp_val` float, &lt;br /&gt;
  `gaia_phot_bp_rp_excess_factor` float, &lt;br /&gt;
  `gaia_astrometric_sigma5d_max` float, &lt;br /&gt;
  `gaia_astrometric_params_solved` tinyint, &lt;br /&gt;
  `flux_g` float, &lt;br /&gt;
  `flux_r` float, &lt;br /&gt;
  `flux_z` float, &lt;br /&gt;
  `flux_w1` float, &lt;br /&gt;
  `flux_w2` float, &lt;br /&gt;
  `flux_w3` float, &lt;br /&gt;
  `flux_w4` float, &lt;br /&gt;
  `flux_ivar_g` float, &lt;br /&gt;
  `flux_ivar_r` float, &lt;br /&gt;
  `flux_ivar_z` float, &lt;br /&gt;
  `flux_ivar_w1` float, &lt;br /&gt;
  `flux_ivar_w2` float, &lt;br /&gt;
  `flux_ivar_w3` float, &lt;br /&gt;
  `flux_ivar_w4` float, &lt;br /&gt;
  `fiberflux_g` float, &lt;br /&gt;
  `fiberflux_r` float, &lt;br /&gt;
  `fiberflux_z` float, &lt;br /&gt;
  `fibertotflux_g` float, &lt;br /&gt;
  `fibertotflux_r` float, &lt;br /&gt;
  `fibertotflux_z` float, &lt;br /&gt;
  `apflux_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `mw_transmission_g` float, &lt;br /&gt;
  `mw_transmission_r` float, &lt;br /&gt;
  `mw_transmission_z` float, &lt;br /&gt;
  `mw_transmission_w1` float, &lt;br /&gt;
  `mw_transmission_w2` float, &lt;br /&gt;
  `mw_transmission_w3` float, &lt;br /&gt;
  `mw_transmission_w4` float, &lt;br /&gt;
  `nobs_g` smallint, &lt;br /&gt;
  `nobs_r` smallint, &lt;br /&gt;
  `nobs_z` smallint, &lt;br /&gt;
  `nobs_w1` smallint, &lt;br /&gt;
  `nobs_w2` smallint, &lt;br /&gt;
  `nobs_w3` smallint, &lt;br /&gt;
  `nobs_w4` smallint, &lt;br /&gt;
  `rchisq_g` float, &lt;br /&gt;
  `rchisq_r` float, &lt;br /&gt;
  `rchisq_z` float, &lt;br /&gt;
  `rchisq_w1` float, &lt;br /&gt;
  `rchisq_w2` float, &lt;br /&gt;
  `rchisq_w3` float, &lt;br /&gt;
  `rchisq_w4` float, &lt;br /&gt;
  `fracflux_g` float, &lt;br /&gt;
  `fracflux_r` float, &lt;br /&gt;
  `fracflux_z` float, &lt;br /&gt;
  `fracflux_w1` float, &lt;br /&gt;
  `fracflux_w2` float, &lt;br /&gt;
  `fracflux_w3` float, &lt;br /&gt;
  `fracflux_w4` float, &lt;br /&gt;
  `fracmasked_g` float, &lt;br /&gt;
  `fracmasked_r` float, &lt;br /&gt;
  `fracmasked_z` float, &lt;br /&gt;
  `fracin_g` float, &lt;br /&gt;
  `fracin_r` float, &lt;br /&gt;
  `fracin_z` float, &lt;br /&gt;
  `anymask_g` smallint, &lt;br /&gt;
  `anymask_r` smallint, &lt;br /&gt;
  `anymask_z` smallint, &lt;br /&gt;
  `allmask_g` smallint, &lt;br /&gt;
  `allmask_r` smallint, &lt;br /&gt;
  `allmask_z` smallint, &lt;br /&gt;
  `wisemask_w1` tinyint, &lt;br /&gt;
  `wisemask_w2` tinyint, &lt;br /&gt;
  `psfsize_g` float, &lt;br /&gt;
  `psfsize_r` float, &lt;br /&gt;
  `psfsize_z` float, &lt;br /&gt;
  `psfdepth_g` float, &lt;br /&gt;
  `psfdepth_r` float, &lt;br /&gt;
  `psfdepth_z` float, &lt;br /&gt;
  `galdepth_g` float, &lt;br /&gt;
  `galdepth_r` float, &lt;br /&gt;
  `galdepth_z` float, &lt;br /&gt;
  `nea_g` float, &lt;br /&gt;
  `nea_r` float, &lt;br /&gt;
  `nea_z` float, &lt;br /&gt;
  `blob_nea_g` float, &lt;br /&gt;
  `blob_nea_r` float, &lt;br /&gt;
  `blob_nea_z` float, &lt;br /&gt;
  `psfdepth_w1` float, &lt;br /&gt;
  `psfdepth_w2` float, &lt;br /&gt;
  `psfdepth_w3` float, &lt;br /&gt;
  `psfdepth_w4` float, &lt;br /&gt;
  `wise_coadd_id` string, &lt;br /&gt;
  `wise_x` float, &lt;br /&gt;
  `wise_y` float, &lt;br /&gt;
  `lc_flux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_ivar_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_ivar_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_nobs_w1` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_nobs_w2` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_fracflux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_fracflux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_rchisq_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_rchisq_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_mjd_w1` array&amp;lt;double&amp;gt;, &lt;br /&gt;
  `lc_mjd_w2` array&amp;lt;double&amp;gt;, &lt;br /&gt;
  `lc_epoch_index_w1` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_epoch_index_w2` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `sersic` float, &lt;br /&gt;
  `sersic_ivar` float, &lt;br /&gt;
  `shape_r` float, &lt;br /&gt;
  `shape_r_ivar` float, &lt;br /&gt;
  `shape_e1` float, &lt;br /&gt;
  `shape_e1_ivar` float, &lt;br /&gt;
  `shape_e2` float, &lt;br /&gt;
  `shape_e2_ivar` float)&lt;br /&gt;
 PARTITIONED BY (&lt;br /&gt;
   h STRING,&lt;br /&gt;
   r STRING&lt;br /&gt;
 )&lt;br /&gt;
 STORED AS PARQUET&lt;br /&gt;
 LOCATION '/user/tallada/data/legacysurvey_dr9'&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Internal Table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE `cosmohub`.`legacy_survey_dr9`(&lt;br /&gt;
  `release` smallint,&lt;br /&gt;
  `brickid` int,&lt;br /&gt;
  `brickname` string,&lt;br /&gt;
  `objid` int,&lt;br /&gt;
  `brick_primary` boolean,&lt;br /&gt;
  `maskbits` smallint,&lt;br /&gt;
  `fitbits` smallint,&lt;br /&gt;
  `type` string,&lt;br /&gt;
  `ra` double,&lt;br /&gt;
  `dec` double,&lt;br /&gt;
  `ra_ivar` float,&lt;br /&gt;
  `dec_ivar` float,&lt;br /&gt;
  `bx` float,&lt;br /&gt;
  `by` float,&lt;br /&gt;
  `dchisq` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `ebv` float,&lt;br /&gt;
  `mjd_min` double,&lt;br /&gt;
  `mjd_max` double,&lt;br /&gt;
  `ref_cat` string,&lt;br /&gt;
  `ref_id` bigint,&lt;br /&gt;
  `pmra` float,&lt;br /&gt;
  `pmdec` float,&lt;br /&gt;
  `parallax` float,&lt;br /&gt;
  `pmra_ivar` float,&lt;br /&gt;
  `pmdec_ivar` float,&lt;br /&gt;
  `parallax_ivar` float,&lt;br /&gt;
  `ref_epoch` float,&lt;br /&gt;
  `gaia_phot_g_mean_mag` float,&lt;br /&gt;
  `gaia_phot_g_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_g_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_bp_mean_mag` float,&lt;br /&gt;
  `gaia_phot_bp_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_bp_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_rp_mean_mag` float,&lt;br /&gt;
  `gaia_phot_rp_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_rp_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_variable_flag` boolean,&lt;br /&gt;
  `gaia_astrometric_excess_noise` float,&lt;br /&gt;
  `gaia_astrometric_excess_noise_sig` float,&lt;br /&gt;
  `gaia_astrometric_n_obs_al` smallint,&lt;br /&gt;
  `gaia_astrometric_n_good_obs_al` smallint,&lt;br /&gt;
  `gaia_astrometric_weight_al` float,&lt;br /&gt;
  `gaia_duplicated_source` boolean,&lt;br /&gt;
  `gaia_a_g_val` float,&lt;br /&gt;
  `gaia_e_bp_min_rp_val` float,&lt;br /&gt;
  `gaia_phot_bp_rp_excess_factor` float,&lt;br /&gt;
  `gaia_astrometric_sigma5d_max` float,&lt;br /&gt;
  `gaia_astrometric_params_solved` tinyint,&lt;br /&gt;
  `flux_g` float,&lt;br /&gt;
  `flux_r` float,&lt;br /&gt;
  `flux_z` float,&lt;br /&gt;
  `flux_w1` float,&lt;br /&gt;
  `flux_w2` float,&lt;br /&gt;
  `flux_w3` float,&lt;br /&gt;
  `flux_w4` float,&lt;br /&gt;
  `flux_ivar_g` float,&lt;br /&gt;
  `flux_ivar_r` float,&lt;br /&gt;
  `flux_ivar_z` float,&lt;br /&gt;
  `flux_ivar_w1` float,&lt;br /&gt;
  `flux_ivar_w2` float,&lt;br /&gt;
  `flux_ivar_w3` float,&lt;br /&gt;
  `flux_ivar_w4` float,&lt;br /&gt;
  `fiberflux_g` float,&lt;br /&gt;
  `fiberflux_r` float,&lt;br /&gt;
  `fiberflux_z` float,&lt;br /&gt;
  `fibertotflux_g` float,&lt;br /&gt;
  `fibertotflux_r` float,&lt;br /&gt;
  `fibertotflux_z` float,&lt;br /&gt;
  `apflux_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `mw_transmission_g` float,&lt;br /&gt;
  `mw_transmission_r` float,&lt;br /&gt;
  `mw_transmission_z` float,&lt;br /&gt;
  `mw_transmission_w1` float,&lt;br /&gt;
  `mw_transmission_w2` float,&lt;br /&gt;
  `mw_transmission_w3` float,&lt;br /&gt;
  `mw_transmission_w4` float,&lt;br /&gt;
  `nobs_g` smallint,&lt;br /&gt;
  `nobs_r` smallint,&lt;br /&gt;
  `nobs_z` smallint,&lt;br /&gt;
  `nobs_w1` smallint,&lt;br /&gt;
  `nobs_w2` smallint,&lt;br /&gt;
  `nobs_w3` smallint,&lt;br /&gt;
  `nobs_w4` smallint,&lt;br /&gt;
  `rchisq_g` float,&lt;br /&gt;
  `rchisq_r` float,&lt;br /&gt;
  `rchisq_z` float,&lt;br /&gt;
  `rchisq_w1` float,&lt;br /&gt;
  `rchisq_w2` float,&lt;br /&gt;
  `rchisq_w3` float,&lt;br /&gt;
  `rchisq_w4` float,&lt;br /&gt;
  `fracflux_g` float,&lt;br /&gt;
  `fracflux_r` float,&lt;br /&gt;
  `fracflux_z` float,&lt;br /&gt;
  `fracflux_w1` float,&lt;br /&gt;
  `fracflux_w2` float,&lt;br /&gt;
  `fracflux_w3` float,&lt;br /&gt;
  `fracflux_w4` float,&lt;br /&gt;
  `fracmasked_g` float,&lt;br /&gt;
  `fracmasked_r` float,&lt;br /&gt;
  `fracmasked_z` float,&lt;br /&gt;
  `fracin_g` float,&lt;br /&gt;
  `fracin_r` float,&lt;br /&gt;
  `fracin_z` float,&lt;br /&gt;
  `anymask_g` smallint,&lt;br /&gt;
  `anymask_r` smallint,&lt;br /&gt;
  `anymask_z` smallint,&lt;br /&gt;
  `allmask_g` smallint,&lt;br /&gt;
  `allmask_r` smallint,&lt;br /&gt;
  `allmask_z` smallint,&lt;br /&gt;
  `wisemask_w1` tinyint,&lt;br /&gt;
  `wisemask_w2` tinyint,&lt;br /&gt;
  `psfsize_g` float,&lt;br /&gt;
  `psfsize_r` float,&lt;br /&gt;
  `psfsize_z` float,&lt;br /&gt;
  `psfdepth_g` float,&lt;br /&gt;
  `psfdepth_r` float,&lt;br /&gt;
  `psfdepth_z` float,&lt;br /&gt;
  `galdepth_g` float,&lt;br /&gt;
  `galdepth_r` float,&lt;br /&gt;
  `galdepth_z` float,&lt;br /&gt;
  `nea_g` float,&lt;br /&gt;
  `nea_r` float,&lt;br /&gt;
  `nea_z` float,&lt;br /&gt;
  `blob_nea_g` float,&lt;br /&gt;
  `blob_nea_r` float,&lt;br /&gt;
  `blob_nea_z` float,&lt;br /&gt;
  `psfdepth_w1` float,&lt;br /&gt;
  `psfdepth_w2` float,&lt;br /&gt;
  `psfdepth_w3` float,&lt;br /&gt;
  `psfdepth_w4` float,&lt;br /&gt;
  `wise_coadd_id` string,&lt;br /&gt;
  `wise_x` float,&lt;br /&gt;
  `wise_y` float,&lt;br /&gt;
  `lc_flux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_ivar_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_ivar_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_nobs_w1` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_nobs_w2` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_fracflux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_fracflux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_rchisq_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_rchisq_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_mjd_w1` array&amp;lt;double&amp;gt;,&lt;br /&gt;
  `lc_mjd_w2` array&amp;lt;double&amp;gt;,&lt;br /&gt;
  `lc_epoch_index_w1` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_epoch_index_w2` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `sersic` float,&lt;br /&gt;
  `sersic_ivar` float,&lt;br /&gt;
  `shape_r` float,&lt;br /&gt;
  `shape_r_ivar` float,&lt;br /&gt;
  `shape_e1` float,&lt;br /&gt;
  `shape_e1_ivar` float,&lt;br /&gt;
  `shape_e2` float,&lt;br /&gt;
  `shape_e2_ivar` float)&lt;br /&gt;
 CLUSTERED BY (&lt;br /&gt;
  release, brickid, objid&lt;br /&gt;
 )&lt;br /&gt;
 SORTED BY (&lt;br /&gt;
  release, brickid, objid&lt;br /&gt;
 )&lt;br /&gt;
 INTO 4096 BUCKETS&lt;br /&gt;
 STORED AS ORC&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INSERT INTO TABLE cosmohub.legacy_survey_dr9&lt;br /&gt;
 SELECT  release, brickid, brickname, objid, brick_primary, maskbits, fitbits, type, ra, `dec`, ra_ivar, dec_ivar,&lt;br /&gt;
 bx, `by`, dchisq, ebv, mjd_min, mjd_max, ref_cat, ref_id, pmra, pmdec, parallax, pmra_ivar, pmdec_ivar,&lt;br /&gt;
 parallax_ivar, ref_epoch, gaia_phot_g_mean_mag, gaia_phot_g_mean_flux_over_error, gaia_phot_g_n_obs,&lt;br /&gt;
 gaia_phot_bp_mean_mag, gaia_phot_bp_mean_flux_over_error, gaia_phot_bp_n_obs, gaia_phot_rp_mean_mag,&lt;br /&gt;
 gaia_phot_rp_mean_flux_over_error, gaia_phot_rp_n_obs, gaia_phot_variable_flag, gaia_astrometric_excess_noise,&lt;br /&gt;
 gaia_astrometric_excess_noise_sig, gaia_astrometric_n_obs_al, gaia_astrometric_n_good_obs_al,&lt;br /&gt;
 gaia_astrometric_weight_al, gaia_duplicated_source, gaia_a_g_val, gaia_e_bp_min_rp_val,&lt;br /&gt;
 gaia_phot_bp_rp_excess_factor, gaia_astrometric_sigma5d_max, gaia_astrometric_params_solved, flux_g, flux_r,&lt;br /&gt;
 flux_z, flux_w1, flux_w2, flux_w3, flux_w4, flux_ivar_g, flux_ivar_r, flux_ivar_z, flux_ivar_w1, flux_ivar_w2,&lt;br /&gt;
 flux_ivar_w3, flux_ivar_w4, fiberflux_g, fiberflux_r, fiberflux_z, fibertotflux_g, fibertotflux_r, fibertotflux_z,&lt;br /&gt;
 apflux_g, apflux_r, apflux_z, apflux_resid_g, apflux_resid_r, apflux_resid_z, apflux_blobresid_g,&lt;br /&gt;
 apflux_blobresid_r, apflux_blobresid_z, apflux_ivar_g, apflux_ivar_r, apflux_ivar_z, apflux_masked_g,&lt;br /&gt;
 apflux_masked_r, apflux_masked_z, apflux_w1, apflux_w2, apflux_w3, apflux_w4, apflux_resid_w1, apflux_resid_w2,&lt;br /&gt;
 apflux_resid_w3, apflux_resid_w4, apflux_ivar_w1, apflux_ivar_w2, apflux_ivar_w3, apflux_ivar_w4,&lt;br /&gt;
 mw_transmission_g, mw_transmission_r, mw_transmission_z, mw_transmission_w1, mw_transmission_w2,&lt;br /&gt;
 mw_transmission_w3, mw_transmission_w4, nobs_g, nobs_r, nobs_z, nobs_w1, nobs_w2, nobs_w3, nobs_w4, rchisq_g,&lt;br /&gt;
 rchisq_r, rchisq_z, rchisq_w1, rchisq_w2, rchisq_w3, rchisq_w4, fracflux_g, fracflux_r, fracflux_z, fracflux_w1,&lt;br /&gt;
 fracflux_w2, fracflux_w3, fracflux_w4, fracmasked_g, fracmasked_r, fracmasked_z, fracin_g, fracin_r, fracin_z,&lt;br /&gt;
 anymask_g, anymask_r, anymask_z, allmask_g, allmask_r, allmask_z, wisemask_w1, wisemask_w2, psfsize_g, psfsize_r,&lt;br /&gt;
 psfsize_z, psfdepth_g, psfdepth_r, psfdepth_z, galdepth_g, galdepth_r, galdepth_z, nea_g, nea_r, nea_z,&lt;br /&gt;
 blob_nea_g, blob_nea_r, blob_nea_z, psfdepth_w1, psfdepth_w2, psfdepth_w3, psfdepth_w4, wise_coadd_id, wise_x,&lt;br /&gt;
 wise_y, lc_flux_w1, lc_flux_w2, lc_flux_ivar_w1, lc_flux_ivar_w2, lc_nobs_w1, lc_nobs_w2, lc_fracflux_w1,&lt;br /&gt;
 lc_fracflux_w2, lc_rchisq_w1, lc_rchisq_w2, lc_mjd_w1, lc_mjd_w2, lc_epoch_index_w1, lc_epoch_index_w2, sersic,&lt;br /&gt;
 sersic_ivar, shape_r, shape_r_ivar, shape_e1, shape_e1_ivar, shape_e2, shape_e2_ivar&lt;br /&gt;
 FROM cosmohub.legacy_survey_dr9_p&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE release release smallint COMMENT &amp;quot;Unique integer denoting the camera and filter set used&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE brickid brickid int COMMENT &amp;quot;Brick ID [1,662174]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE brickname brickname string COMMENT &amp;quot;Name of brick, encoding the brick sky position, eg \u00221126p222\u0022 near RA=112.6, Dec=+22.2&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE objid objid int COMMENT &amp;quot;Catalog object number within this brick\u003b a unique identifier hash is release,brickid,objid\u003b objid spans [0,N-1] and is contiguously enumerated within each brick&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE brick_primary brick_primary boolean COMMENT &amp;quot;True if the object is within the brick boundary&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE maskbits maskbits smallint COMMENT &amp;quot;Bitwise mask indicating that an object touches a pixel in the coadd/*/*/*maskbits* maps, as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fitbits fitbits smallint COMMENT &amp;quot;Bitwise mask detailing pecularities of how an object was fit, as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE type type string COMMENT &amp;quot;Morphological model: \u0022PSF\u0022=stellar, \u0022REX\u0022=\u0022round exponential galaxy\u0022, \u0022DEV\u0022=deVauc, \u0022EXP\u0022=exponential, \u0022SER\u0022=Sersic, \u0022DUP\u0022=Gaia source fit by different model.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ra ra double COMMENT &amp;quot;Right ascension at equinox J2000&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE `dec` `dec` double COMMENT &amp;quot;Declination at equinox J2000&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ra_ivar ra_ivar float COMMENT &amp;quot;Inverse variance of RA (no cosine term!), excluding astrometric calibration errors&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE dec_ivar dec_ivar float COMMENT &amp;quot;Inverse variance of DEC, excluding astrometric calibration errors&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE bx bx float COMMENT &amp;quot;X position (0-indexed) of coordinates in the brick image stack (i.e. in the e.g. legacysurvey-&amp;lt;brick&amp;gt;-image-g.fits.fz coadd file)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE `by` `by` float COMMENT &amp;quot;Y position (0-indexed) of coordinates in brick image stack&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE dchisq dchisq array&amp;lt;float&amp;gt; COMMENT &amp;quot;Difference in χ² between successively more-complex model fits: PSF, REX, DEV, EXP, SER. The difference is versus no source.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ebv ebv float COMMENT &amp;quot;Galactic extinction E(B-V) reddening from SFD98, used to compute the mw_transmission_ columns&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mjd_min mjd_min double COMMENT &amp;quot;Minimum Modified Julian Date of observations used to construct the model of this object&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mjd_max mjd_max double COMMENT &amp;quot;Maximum Modified Julian Date of observations used to construct the model of this object&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ref_cat ref_cat string COMMENT &amp;quot;Reference catalog source for this star: \u0022T2\u0022 for Tycho-2, \u0022G2\u0022 for Gaia DR2, \u0022L3\u0022 for the SGA, empty otherwise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ref_id ref_id bigint COMMENT &amp;quot;Reference catalog identifier for this star\u003b Tyc1*1,000,000+Tyc2*10+Tyc3 for Tycho2\u003b \u0022sourceid\u0022 for Gaia DR2 and SGA&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE pmra pmra float COMMENT &amp;quot;Reference catalog proper motion in the RA direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE pmdec pmdec float COMMENT &amp;quot;Reference catalog proper motion in the Dec direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE parallax parallax float COMMENT &amp;quot;Reference catalog parallax&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE pmra_ivar pmra_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on pmra&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE pmdec_ivar pmdec_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on pmdec&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE parallax_ivar parallax_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on parallax&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE ref_epoch ref_epoch float COMMENT &amp;quot;Reference catalog reference epoch (eg, 2015.5 for Gaia DR2)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_g_mean_mag gaia_phot_g_mean_mag float COMMENT &amp;quot;Gaia G band mag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_g_mean_flux_over_error gaia_phot_g_mean_flux_over_error float COMMENT &amp;quot;Gaia G band signal-to-noise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_g_n_obs gaia_phot_g_n_obs smallint COMMENT &amp;quot;Gaia G band number of observations&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_bp_mean_mag gaia_phot_bp_mean_mag float COMMENT &amp;quot;Gaia BP mag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_bp_mean_flux_over_error gaia_phot_bp_mean_flux_over_error float COMMENT &amp;quot;Gaia BP signal-to-noise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_bp_n_obs gaia_phot_bp_n_obs smallint COMMENT &amp;quot;Gaia BP number of observations&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_rp_mean_mag gaia_phot_rp_mean_mag float COMMENT &amp;quot;Gaia RP mag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_rp_mean_flux_over_error gaia_phot_rp_mean_flux_over_error float COMMENT &amp;quot;Gaia RP signal-to-noise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_rp_n_obs gaia_phot_rp_n_obs smallint COMMENT &amp;quot;Gaia RP number of observations&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_variable_flag gaia_phot_variable_flag boolean COMMENT &amp;quot;Gaia photometric variable flag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_excess_noise gaia_astrometric_excess_noise float COMMENT &amp;quot;Gaia astrometric excess noise&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_excess_noise_sig gaia_astrometric_excess_noise_sig float COMMENT &amp;quot;Gaia astrometric excess noise uncertainty&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_n_obs_al gaia_astrometric_n_obs_al smallint COMMENT &amp;quot;Gaia number of astrometric observations along scan direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_n_good_obs_al gaia_astrometric_n_good_obs_al smallint COMMENT &amp;quot;Gaia number of good astrometric observations along scan direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_weight_al gaia_astrometric_weight_al float COMMENT &amp;quot;Gaia astrometric weight along scan direction&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_duplicated_source gaia_duplicated_source boolean COMMENT &amp;quot;Gaia duplicated source flag&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_a_g_val gaia_a_g_val float COMMENT &amp;quot;Gaia line-of-sight extinction in the G band&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_e_bp_min_rp_val gaia_e_bp_min_rp_val float COMMENT &amp;quot;Gaia line-of-sight reddening E(BP-RP)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_phot_bp_rp_excess_factor gaia_phot_bp_rp_excess_factor float COMMENT &amp;quot;Gaia BP/RP excess factor&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_sigma5d_max gaia_astrometric_sigma5d_max float COMMENT &amp;quot;Gaia longest semi-major axis of the 5-d error ellipsoid&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE gaia_astrometric_params_solved gaia_astrometric_params_solved tinyint COMMENT &amp;quot;which astrometric parameters were estimated for a Gaia source&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_g flux_g float COMMENT &amp;quot;model flux in gg&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_r flux_r float COMMENT &amp;quot;model flux in rr&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_z flux_z float COMMENT &amp;quot;model flux in zz&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_w1 flux_w1 float COMMENT &amp;quot;WISE model flux in W1W1 (AB system)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_w2 flux_w2 float COMMENT &amp;quot;WISE model flux in W2W2 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_w3 flux_w3 float COMMENT &amp;quot;WISE model flux in W3W3 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_w4 flux_w4 float COMMENT &amp;quot;WISE model flux in W4W4 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_g flux_ivar_g float COMMENT &amp;quot;Inverse variance of flux_g&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_r flux_ivar_r float COMMENT &amp;quot;Inverse variance of flux_r&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_z flux_ivar_z float COMMENT &amp;quot;Inverse variance of flux_z&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_w1 flux_ivar_w1 float COMMENT &amp;quot;Inverse variance of flux_w1 (AB system)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_w2 flux_ivar_w2 float COMMENT &amp;quot;Inverse variance of flux_w2 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_w3 flux_ivar_w3 float COMMENT &amp;quot;Inverse variance of flux_w3 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE flux_ivar_w4 flux_ivar_w4 float COMMENT &amp;quot;Inverse variance of flux_w4 (AB)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fiberflux_g fiberflux_g float COMMENT &amp;quot;Predicted gg-band flux within a fiber of diameter 1.5 arcsec from this object in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fiberflux_r fiberflux_r float COMMENT &amp;quot;Predicted rr-band flux within a fiber of diameter 1.5 arcsec from this object in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fiberflux_z fiberflux_z float COMMENT &amp;quot;Predicted zz-band flux within a fiber of diameter 1.5 arcsec from this object in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fibertotflux_g fibertotflux_g float COMMENT &amp;quot;Predicted gg-band flux within a fiber of diameter 1.5 arcsec from all sources at this location in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fibertotflux_r fibertotflux_r float COMMENT &amp;quot;Predicted rr-band flux within a fiber of diameter 1.5 arcsec from all sources at this location in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fibertotflux_z fibertotflux_z float COMMENT &amp;quot;Predicted zz-band flux within a fiber of diameter 1.5 arcsec from all sources at this location in 1 arcsec Gaussian seeing&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_g apflux_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in gg, masked by invvar=0invvar=0 (inverse variance of zero [1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_r apflux_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in rr, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_z apflux_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in zz, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_g apflux_resid_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in gg, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_r apflux_resid_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in rr, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_z apflux_resid_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in zz, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_blobresid_g apflux_blobresid_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on image−blobmodelimage−blobmodel residual maps in gg [2], masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_blobresid_r apflux_blobresid_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on image−blobmodelimage−blobmodel residual maps in rr, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_blobresid_z apflux_blobresid_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on image−blobmodelimage−blobmodel residual maps in zz, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_g apflux_ivar_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_g, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_r apflux_ivar_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_r, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_z apflux_ivar_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_z, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_masked_g apflux_masked_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Fraction of pixels masked in gg-band aperture flux measurements\u003b 1 means fully masked (ie, fully ignored\u003b contributing zero to the measurement)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_masked_r apflux_masked_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Fraction of pixels masked in rr-band aperture flux measurements\u003b 1 means fully masked (ie, fully ignored\u003b contributing zero to the measurement)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_masked_z apflux_masked_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Fraction of pixels masked in zz-band aperture flux measurements\u003b 1 means fully masked (ie, fully ignored\u003b contributing zero to the measurement)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_w1 apflux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [3, 5, 7, 9, 11] [3] arcsec in W1W1, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_w2 apflux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [3, 5, 7, 9, 11] arcsec in W2W2, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_w3 apflux_w3 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [3, 5, 7, 9, 11] arcsec in W3W3, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_w4 apflux_w4 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added images in apertures of radius [3, 5, 7, 9, 11] arcsec in W4W4, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_w1 apflux_resid_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in W1W1, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_w2 apflux_resid_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in W2W2, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_w3 apflux_resid_w3 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in W3W3, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_resid_w4 apflux_resid_w4 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Aperture fluxes on the co-added residual images in W4W4, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_w1 apflux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_w1, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_w2 apflux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_w2, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_w3 apflux_ivar_w3 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_w3, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE apflux_ivar_w4 apflux_ivar_w4 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_w4, masked by invvar=0invvar=0&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_g mw_transmission_g float COMMENT &amp;quot;Galactic transmission in gg filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_r mw_transmission_r float COMMENT &amp;quot;Galactic transmission in rr filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_z mw_transmission_z float COMMENT &amp;quot;Galactic transmission in zz filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_w1 mw_transmission_w1 float COMMENT &amp;quot;Galactic transmission in W1W1 filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_w2 mw_transmission_w2 float COMMENT &amp;quot;Galactic transmission in W2W2 filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_w3 mw_transmission_w3 float COMMENT &amp;quot;Galactic transmission in W3W3 filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE mw_transmission_w4 mw_transmission_w4 float COMMENT &amp;quot;Galactic transmission in W4W4 filter in linear units [0, 1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_g nobs_g smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in gg: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_r nobs_r smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in rr: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_z nobs_z smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in zz: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_w1 nobs_w1 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W1W1: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_w2 nobs_w2 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W2W2: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_w3 nobs_w3 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W3W3: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nobs_w4 nobs_w4 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W4W4: filter for this object (not profile-weighted)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_g rchisq_g float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in gg&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_r rchisq_r float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in rr&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_z rchisq_z float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in zz&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_w1 rchisq_w1 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W1W1&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_w2 rchisq_w2 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W2W2&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_w3 rchisq_w3 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W3W3&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE rchisq_w4 rchisq_w4 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W4W4&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_g fracflux_g float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in gg (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_r fracflux_r float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in rr (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_z fracflux_z float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in zz (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_w1 fracflux_w1 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W1W1 (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_w2 fracflux_w2 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W2W2 (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_w3 fracflux_w3 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W3W3 (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracflux_w4 fracflux_w4 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W4W4 (typically [0,1])&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracmasked_g fracmasked_g float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in gg, strictly between [0,1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracmasked_r fracmasked_r float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in rr, strictly between [0,1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracmasked_z fracmasked_z float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in zz, strictly between [0,1]&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracin_g fracin_g float COMMENT &amp;quot;Fraction of a source's flux within the blob in gg, near unity for real sources&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracin_r fracin_r float COMMENT &amp;quot;Fraction of a source's flux within the blob in rr, near unity for real sources&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE fracin_z fracin_z float COMMENT &amp;quot;Fraction of a source's flux within the blob in zz, near unity for real sources&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE anymask_g anymask_g smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in gg as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE anymask_r anymask_r smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in rr as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE anymask_z anymask_z smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in zz as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE allmask_g allmask_g smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in gg as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE allmask_r allmask_r smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in rr as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE allmask_z allmask_z smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in zz as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wisemask_w1 wisemask_w1 tinyint COMMENT &amp;quot;W1 bitmask as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wisemask_w2 wisemask_w2 tinyint COMMENT &amp;quot;W2 bitmask as cataloged on the DR9 bitmasks page&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfsize_g psfsize_g float COMMENT &amp;quot;Weighted average PSF FWHM in the gg band&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfsize_r psfsize_r float COMMENT &amp;quot;Weighted average PSF FWHM in the rr band&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfsize_z psfsize_z float COMMENT &amp;quot;Weighted average PSF FWHM in the zz band&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_g psfdepth_g float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_g)5/(psfdepth_g) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_g))−9]−2.5[log10⁡(5/(psfdepth_g))−9] gives corresponding AB magnitude&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_r psfdepth_r float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_r)5/(psfdepth_r) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_r))−9]−2.5[log10⁡(5/(psfdepth_r))−9] gives corresponding AB magnitude&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_z psfdepth_z float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_z)5/(psfdepth_z) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_z))−9]−2.5[log10⁡(5/(psfdepth_z))−9] gives corresponding AB magnitude&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE galdepth_g galdepth_g float COMMENT &amp;quot;As for psfdepth_g but for a galaxy (0.45\u0022 exp, round) detection sensitivity&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE galdepth_r galdepth_r float COMMENT &amp;quot;As for psfdepth_r but for a galaxy (0.45\u0022 exp, round) detection sensitivity&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE galdepth_z galdepth_z float COMMENT &amp;quot;As for psfdepth_z but for a galaxy (0.45\u0022 exp, round) detection sensitivity&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nea_g nea_g float COMMENT &amp;quot;Noise equivalent area in gg.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nea_r nea_r float COMMENT &amp;quot;Noise equivalent area in rr.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE nea_z nea_z float COMMENT &amp;quot;Noise equivalent area in zz.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE blob_nea_g blob_nea_g float COMMENT &amp;quot;Blob-masked noise equivalent area in gg.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE blob_nea_r blob_nea_r float COMMENT &amp;quot;Blob-masked noise equivalent area in rr.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE blob_nea_z blob_nea_z float COMMENT &amp;quot;Blob-masked noise equivalent area in zz.&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_w1 psfdepth_w1 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W1&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_w2 psfdepth_w2 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W2&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_w3 psfdepth_w3 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W3&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE psfdepth_w4 psfdepth_w4 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W4&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wise_coadd_id wise_coadd_id string COMMENT &amp;quot;unWISE coadd brick name (corresponding to the, e.g., legacysurvey-&amp;lt;brick&amp;gt;-image-W1.fits.fz coadd file) for the center of each object&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wise_x wise_x float COMMENT &amp;quot;X position of coordinates in the brick image stack that corresponds to wise_coadd_id (see the DR9 updates page for transformations between wise_x and bx)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE wise_y wise_y float COMMENT &amp;quot;Y position of coordinates in the brick image stack that corresponds to wise_coadd_id (see the DR9 updates page for transformations between wise_y and by)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_flux_w1 lc_flux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;flux_w1 in each of up to fifteen unWISE coadd epochs (AB system\u003b defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_flux_w2 lc_flux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;flux_w2 in each of up to fifteen unWISE coadd epochs (AB\u003b defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_flux_ivar_w1 lc_flux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of lc_flux_w1 (AB system\u003b defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_flux_ivar_w2 lc_flux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of lc_flux_w2 (AB\u003b defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_nobs_w1 lc_nobs_w1 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;nobs_w1 in each of up to fifteen unWISE coadd epochs&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_nobs_w2 lc_nobs_w2 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;nobs_w2 in each of up to fifteen unWISE coadd epochs&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_fracflux_w1 lc_fracflux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;fracflux_w1 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_fracflux_w2 lc_fracflux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;fracflux_w2 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_rchisq_w1 lc_rchisq_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;rchisq_w1 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_rchisq_w2 lc_rchisq_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;rchisq_w2 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_mjd_w1 lc_mjd_w1 array&amp;lt;double&amp;gt; COMMENT &amp;quot;mjd_w1 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_mjd_w2 lc_mjd_w2 array&amp;lt;double&amp;gt; COMMENT &amp;quot;mjd_w2 in each of up to fifteen unWISE coadd epochs (defaults to zero for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_epoch_index_w1 lc_epoch_index_w1 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;Index number of unWISE epoch for W1 (defaults to -1 for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE lc_epoch_index_w2 lc_epoch_index_w2 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;Index number of unWISE epoch for W2 (defaults to -1 for unused entries)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE sersic sersic float COMMENT &amp;quot;Power-law index for the Sersic profile model (type=\u0022SER\u0022)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE sersic_ivar sersic_ivar float COMMENT &amp;quot;Inverse variance of sersic&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_r shape_r float COMMENT &amp;quot;Half-light radius of galaxy model for galaxy type type (&amp;gt;0)&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_r_ivar shape_r_ivar float COMMENT &amp;quot;Inverse variance of shape_r&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_e1 shape_e1 float COMMENT &amp;quot;Ellipticity component 1 of galaxy model for galaxy type type&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_e1_ivar shape_e1_ivar float COMMENT &amp;quot;Inverse variance of shape_e1&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_e2 shape_e2 float COMMENT &amp;quot;Ellipticity component 2 of galaxy model for galaxy type type&amp;quot; ;&lt;br /&gt;
 ALTER TABLE legacy_survey_dr9 CHANGE shape_e2_ivar shape_e2_ivar float COMMENT &amp;quot;Inverse variance of shape_e2&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
== Sweep photo-z ==&lt;br /&gt;
&lt;br /&gt;
=== Raw data ===&lt;br /&gt;
&lt;br /&gt;
 wget -c --no-clobber --no-parent -r https://portal.nersc.gov/project/cosmo/data/legacysurvey/dr8/north/sweep/&lt;br /&gt;
 wget -c --no-clobber --no-parent -r https://portal.nersc.gov/project/cosmo/data/legacysurvey/dr8/south/sweep/&lt;br /&gt;
&lt;br /&gt;
Checksums checked:&lt;br /&gt;
&lt;br /&gt;
 $ cd north/sweep/8.0&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 287&lt;br /&gt;
 $ wc -l legacysurvey_dr8_north_sweep_8.0.sha256sum&lt;br /&gt;
 286 (+ checksum file)&lt;br /&gt;
 $ sha256sum -c legacysurvey_dr8_north_sweep_8.0.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd north/sweep/8.0-photo-z&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 287&lt;br /&gt;
 $ wc -l legacysurvey_dr8_north_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 286 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_north_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd south/sweep/8.0&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 438&lt;br /&gt;
 $ wc -l legacysurvey_dr8_south_sweep_8.0.sha256sum&lt;br /&gt;
 437 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_south_sweep_8.0.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd south/sweep/8.0-photo-z&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 438&lt;br /&gt;
 $ wc -l legacysurvey_dr8_south_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 437 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_south_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
=== Parquet ===&lt;br /&gt;
&lt;br /&gt;
The following code snippet was used in spark to merge fits files and convert to parquet:&lt;br /&gt;
&lt;br /&gt;
 path_base = '/cephfs/pic.es/astro/scratch/tallada/dr8-phz/'&lt;br /&gt;
 hdfs_base = '/user/tallada/data/legacysurvey-sweep'&lt;br /&gt;
 &lt;br /&gt;
 hs = ['south/sweep'] #, 'north/sweep']&lt;br /&gt;
 dir_src = '8.0'&lt;br /&gt;
 dir_phz = '8.0-photo-z'&lt;br /&gt;
 dir_dst = '8.0-merged'&lt;br /&gt;
 &lt;br /&gt;
 my_files = sorted(os.listdir(os.path.join(path_base, hs[0], dir_src)))&lt;br /&gt;
 &lt;br /&gt;
 def merge_phz(file_name):&lt;br /&gt;
     file_src = os.path.join(path_base, hs[0], dir_src, file_name)&lt;br /&gt;
     file_phz = os.path.join(path_base, hs[0], dir_phz, file_name[:-5]+'-pz.fits')&lt;br /&gt;
     file_dst = os.path.join(path_base, hs[0], dir_dst, file_name[:-5]+'-merged.fits')&lt;br /&gt;
 &lt;br /&gt;
     t_src = table.Table.read(file_src)&lt;br /&gt;
     t_phz = table.Table.read(file_phz)&lt;br /&gt;
     t_dst = table.hstack([t_src, t_phz], join_type='exact')&lt;br /&gt;
 &lt;br /&gt;
     os.unlink(file_dst)&lt;br /&gt;
     t_dst.write(file_dst)&lt;br /&gt;
     &lt;br /&gt;
     return file_name&lt;br /&gt;
 &lt;br /&gt;
 df = sc.parallelize(my_files, len(my_files))&lt;br /&gt;
 &lt;br /&gt;
 df.map(merge_phz).count()&lt;br /&gt;
 &lt;br /&gt;
 df = spark.read.format(&amp;quot;fits&amp;quot;).option(&amp;quot;hdu&amp;quot;, 1).load(&lt;br /&gt;
     &amp;quot;file://&amp;quot; + os.path.join(path_base, hs[0], dir_dst)&lt;br /&gt;
 ) &lt;br /&gt;
 &lt;br /&gt;
 df.write.parquet(os.path.join(hdfs_base, hs[0]))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== External table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE tallada.dr8_sweep (&lt;br /&gt;
    `RELEASE` SMALLINT,&lt;br /&gt;
    `BRICKID` INT,&lt;br /&gt;
    `BRICKNAME` STRING,&lt;br /&gt;
    `OBJID` INT,&lt;br /&gt;
    `TYPE` STRING,&lt;br /&gt;
    `RA` DOUBLE,&lt;br /&gt;
    `DEC` DOUBLE,&lt;br /&gt;
    `RA_IVAR` FLOAT,&lt;br /&gt;
    `DEC_IVAR` FLOAT,&lt;br /&gt;
    `DCHISQ` ARRAY&amp;lt;FLOAT&amp;gt;,&lt;br /&gt;
    `EBV` FLOAT,&lt;br /&gt;
    `FLUX_G` FLOAT,&lt;br /&gt;
    `FLUX_R` FLOAT,&lt;br /&gt;
    `FLUX_Z` FLOAT,&lt;br /&gt;
    `FLUX_W1` FLOAT,&lt;br /&gt;
    `FLUX_W2` FLOAT,&lt;br /&gt;
    `FLUX_W3` FLOAT,&lt;br /&gt;
    `FLUX_W4` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_G` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_R` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_Z` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W1` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W2` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W3` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W4` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_G` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_R` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_Z` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W1` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W2` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W3` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W4` FLOAT,&lt;br /&gt;
    `NOBS_G` INT,&lt;br /&gt;
    `NOBS_R` INT,&lt;br /&gt;
    `NOBS_Z` INT,&lt;br /&gt;
    `NOBS_W1` INT,&lt;br /&gt;
    `NOBS_W2` INT,&lt;br /&gt;
    `NOBS_W3` INT,&lt;br /&gt;
    `NOBS_W4` INT,&lt;br /&gt;
    `RCHISQ_G` FLOAT,&lt;br /&gt;
    `RCHISQ_R` FLOAT,&lt;br /&gt;
    `RCHISQ_Z` FLOAT,&lt;br /&gt;
    `RCHISQ_W1` FLOAT,&lt;br /&gt;
    `RCHISQ_W2` FLOAT,&lt;br /&gt;
    `RCHISQ_W3` FLOAT,&lt;br /&gt;
    `RCHISQ_W4` FLOAT,&lt;br /&gt;
    `FRACFLUX_G` FLOAT,&lt;br /&gt;
    `FRACFLUX_R` FLOAT,&lt;br /&gt;
    `FRACFLUX_Z` FLOAT,&lt;br /&gt;
    `FRACFLUX_W1` FLOAT,&lt;br /&gt;
    `FRACFLUX_W2` FLOAT,&lt;br /&gt;
    `FRACFLUX_W3` FLOAT,&lt;br /&gt;
    `FRACFLUX_W4` FLOAT,&lt;br /&gt;
    `FRACMASKED_G` FLOAT,&lt;br /&gt;
    `FRACMASKED_R` FLOAT,&lt;br /&gt;
    `FRACMASKED_Z` FLOAT,&lt;br /&gt;
    `FRACIN_G` FLOAT,&lt;br /&gt;
    `FRACIN_R` FLOAT,&lt;br /&gt;
    `FRACIN_Z` FLOAT,&lt;br /&gt;
    `ANYMASK_G` SMALLINT,&lt;br /&gt;
    `ANYMASK_R` SMALLINT,&lt;br /&gt;
    `ANYMASK_Z` SMALLINT,&lt;br /&gt;
    `ALLMASK_G` SMALLINT,&lt;br /&gt;
    `ALLMASK_R` SMALLINT,&lt;br /&gt;
    `ALLMASK_Z` SMALLINT,&lt;br /&gt;
    `WISEMASK_W1` TINYINT,&lt;br /&gt;
    `WISEMASK_W2` TINYINT,&lt;br /&gt;
    `PSFSIZE_G` FLOAT,&lt;br /&gt;
    `PSFSIZE_R` FLOAT,&lt;br /&gt;
    `PSFSIZE_Z` FLOAT,&lt;br /&gt;
    `PSFDEPTH_G` FLOAT,&lt;br /&gt;
    `PSFDEPTH_R` FLOAT,&lt;br /&gt;
    `PSFDEPTH_Z` FLOAT,&lt;br /&gt;
    `GALDEPTH_G` FLOAT,&lt;br /&gt;
    `GALDEPTH_R` FLOAT,&lt;br /&gt;
    `GALDEPTH_Z` FLOAT,&lt;br /&gt;
    `PSFDEPTH_W1` FLOAT,&lt;br /&gt;
    `PSFDEPTH_W2` FLOAT,&lt;br /&gt;
    `WISE_COADD_ID` STRING,&lt;br /&gt;
    `FRACDEV` FLOAT,&lt;br /&gt;
    `FRACDEV_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_R` FLOAT,&lt;br /&gt;
    `SHAPEDEV_R_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E1` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E1_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E2` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E2_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_R` FLOAT,&lt;br /&gt;
    `SHAPEEXP_R_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E1` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E1_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E2` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E2_IVAR` FLOAT,&lt;br /&gt;
    `FIBERFLUX_G` FLOAT,&lt;br /&gt;
    `FIBERFLUX_R` FLOAT,&lt;br /&gt;
    `FIBERFLUX_Z` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_G` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_R` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_Z` FLOAT,&lt;br /&gt;
    `REF_CAT` STRING,&lt;br /&gt;
    `REF_ID` BIGINT,&lt;br /&gt;
    `REF_EPOCH` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_G_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_G_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_BP_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_BP_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_RP_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_RP_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_EXCESS_NOISE` FLOAT,&lt;br /&gt;
    `GAIA_DUPLICATED_SOURCE` BOOLEAN,&lt;br /&gt;
    `GAIA_PHOT_BP_RP_EXCESS_FACTOR` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_SIGMA5D_MAX` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_PARAMS_SOLVED` TINYINT,&lt;br /&gt;
    `PARALLAX` FLOAT,&lt;br /&gt;
    `PARALLAX_IVAR` FLOAT,&lt;br /&gt;
    `PMRA` FLOAT,&lt;br /&gt;
    `PMRA_IVAR` FLOAT,&lt;br /&gt;
    `PMDEC` FLOAT,&lt;br /&gt;
    `PMDEC_IVAR` FLOAT,&lt;br /&gt;
    `MASKBITS` SMALLINT,&lt;br /&gt;
    `z_phot_mean` FLOAT,&lt;br /&gt;
    `z_phot_median` FLOAT,&lt;br /&gt;
    `z_phot_std` FLOAT,&lt;br /&gt;
    `z_phot_l68` FLOAT,&lt;br /&gt;
    `z_phot_u68` FLOAT,&lt;br /&gt;
    `z_phot_l95` FLOAT,&lt;br /&gt;
    `z_phot_u95` FLOAT,&lt;br /&gt;
    `z_spec` FLOAT,&lt;br /&gt;
    `survey` STRING,&lt;br /&gt;
    `training` BOOLEAN&lt;br /&gt;
 )&lt;br /&gt;
 STORED AS PARQUET&lt;br /&gt;
 LOCATION '/user/tallada/data/legacysurvey-sweep'&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Combined table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE cosmohub.legacysurvey_dr8_phz (&lt;br /&gt;
    release smallint COMMENT 'Unique integer denoting the camera and filter set used',&lt;br /&gt;
    brickid int COMMENT 'Brick ID [1,662174]',&lt;br /&gt;
    brickname string COMMENT 'Name of brick, encoding the brick sky position, eg &amp;quot;1126p222&amp;quot; near RA=112.6, Dec=+22.2',&lt;br /&gt;
    objid int COMMENT 'Catalog object number within this brick\u003b a unique identifier hash is release,brickid,objid\u003b objid spans [0,N-1] and is contiguously enumerated within each brick',&lt;br /&gt;
    brick_primary boolean COMMENT 'True if the object is within the brick boundary',&lt;br /&gt;
    brightblob smallint COMMENT 'bitwise mask indicating that an object is near a bright foreground source, as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    maskbits smallint COMMENT 'bitwise mask indicating that an object touches a pixel in the coadd/*/*/*maskbits* maps, as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    type string COMMENT 'Morphological model: &amp;quot;PSF&amp;quot;=stellar, &amp;quot;REX&amp;quot;=&amp;quot;round exponential galaxy&amp;quot;, &amp;quot;DEV&amp;quot;=deVauc, &amp;quot;EXP&amp;quot;=exponential, &amp;quot;COMP&amp;quot;=composite, &amp;quot;DUP&amp;quot;=Gaia source fit by different model. Note that in some FITS readers, a trailing space may be appended for &amp;quot;PSF &amp;quot;, &amp;quot;DEV &amp;quot; and &amp;quot;EXP &amp;quot; since the column data type is a 4-character string',&lt;br /&gt;
    ra double COMMENT 'Right ascension at equinox J2000',&lt;br /&gt;
    dec double COMMENT 'Declination at equinox J2000',&lt;br /&gt;
    ra_ivar float COMMENT 'Inverse variance of RA (no cosine term!), excluding astrometric calibration errors',&lt;br /&gt;
    dec_ivar float COMMENT 'Inverse variance of DEC, excluding astrometric calibration errors',&lt;br /&gt;
    bx float COMMENT 'X position (0-indexed) of coordinates in brick image stack',&lt;br /&gt;
    `by` float COMMENT 'Y position (0-indexed) of coordinates in brick image stack',&lt;br /&gt;
    dchisq array&amp;lt;float&amp;gt; COMMENT 'Difference in χ² between successively more-complex model fits: PSF, REX, DEV, EXP, COMP. The difference is versus no source.',&lt;br /&gt;
    ebv float COMMENT 'Galactic extinction E(B-V) reddening from SFD98, used to compute the mw_transmission_ columns',&lt;br /&gt;
    mjd_min double COMMENT 'Minimum Modified Julian Date of observations used to construct the model of this object',&lt;br /&gt;
    mjd_max double COMMENT 'Maximum Modified Julian Date of observations used to construct the model of this object',&lt;br /&gt;
    ref_cat string COMMENT 'Reference catalog source for this star: &amp;quot;T2&amp;quot; for Tycho-2, &amp;quot;G2&amp;quot; for Gaia DR2, &amp;quot;L2&amp;quot; for the LSLGA, empty otherwise',&lt;br /&gt;
    ref_id bigint COMMENT 'Reference catalog identifier for this star\u003b Tyc1*1,000,000+Tyc2*10+Tyc3 for Tycho2\u003b &amp;quot;sourceid&amp;quot; for Gaia-DR2 and LSLGA',&lt;br /&gt;
    pmra float COMMENT 'Reference catalog proper motion in the RA direction',&lt;br /&gt;
    pmdec float COMMENT 'Reference catalog proper motion in the Dec direction',&lt;br /&gt;
    parallax float COMMENT 'Reference catalog parallax',&lt;br /&gt;
    pmra_ivar float COMMENT 'Reference catalog inverse-variance on pmra',&lt;br /&gt;
    pmdec_ivar float COMMENT 'Reference catalog inverse-variance on pmdec',&lt;br /&gt;
    parallax_ivar float COMMENT 'Reference catalog inverse-variance on parallax',&lt;br /&gt;
    ref_epoch float COMMENT 'Reference catalog reference epoch (eg, 2015.5 for Gaia DR2)',&lt;br /&gt;
    gaia_pointsource boolean COMMENT 'This Gaia DR2 source is believed to be a star, not a galaxy',&lt;br /&gt;
    gaia_phot_g_mean_mag float COMMENT 'Gaia G band mag',&lt;br /&gt;
    gaia_phot_g_mean_flux_over_error float COMMENT 'Gaia G band signal-to-noise',&lt;br /&gt;
    gaia_phot_g_n_obs smallint COMMENT 'Gaia G band number of observations',&lt;br /&gt;
    gaia_phot_bp_mean_mag float COMMENT 'Gaia BP mag',&lt;br /&gt;
    gaia_phot_bp_mean_flux_over_error float COMMENT 'Gaia BP signal-to-noise',&lt;br /&gt;
    gaia_phot_bp_n_obs smallint COMMENT 'Gaia BP number of observations',&lt;br /&gt;
    gaia_phot_rp_mean_mag float COMMENT 'Gaia RP mag',&lt;br /&gt;
    gaia_phot_rp_mean_flux_over_error float COMMENT 'Gaia RP signal-to-noise',&lt;br /&gt;
    gaia_phot_rp_n_obs smallint COMMENT 'Gaia RP number of observations',&lt;br /&gt;
    gaia_phot_variable_flag boolean COMMENT 'Gaia photometric variable flag',&lt;br /&gt;
    gaia_astrometric_excess_noise float COMMENT 'Gaia astrometric excess noise',&lt;br /&gt;
    gaia_astrometric_excess_noise_sig float COMMENT 'Gaia astrometric excess noise uncertainty',&lt;br /&gt;
    gaia_astrometric_n_obs_al smallint COMMENT 'Gaia number of astrometric observations along scan direction',&lt;br /&gt;
    gaia_astrometric_n_good_obs_al smallint COMMENT 'Gaia number of good astrometric observations along scan direction',&lt;br /&gt;
    gaia_astrometric_weight_al float COMMENT 'Gaia astrometric weight along scan direction',&lt;br /&gt;
    gaia_duplicated_source boolean COMMENT 'Gaia duplicated source flag',&lt;br /&gt;
    gaia_a_g_val float COMMENT 'Gaia line-of-sight extinction in the G band',&lt;br /&gt;
    gaia_e_bp_min_rp_val float COMMENT 'Gaia line-of-sight reddening E(BP-RP)',&lt;br /&gt;
    gaia_phot_bp_rp_excess_factor float COMMENT 'Gaia BP/RP excess factor',&lt;br /&gt;
    gaia_astrometric_sigma5d_max float COMMENT 'Gaia longest semi-major axis of the 5-d error ellipsoid',&lt;br /&gt;
    gaia_astrometric_params_solved tinyint COMMENT 'which astrometric parameters were estimated for a Gaia source',&lt;br /&gt;
    flux_g float COMMENT 'model flux in gg',&lt;br /&gt;
    flux_r float COMMENT 'model flux in rr',&lt;br /&gt;
    flux_z float COMMENT 'model flux in zz',&lt;br /&gt;
    flux_w1 float COMMENT 'WISE model flux in W1W1 (AB system)',&lt;br /&gt;
    flux_w2 float COMMENT 'WISE model flux in W2W2 (AB)',&lt;br /&gt;
    flux_w3 float COMMENT 'WISE model flux in W3W3 (AB)',&lt;br /&gt;
    flux_w4 float COMMENT 'WISE model flux in W4W4 (AB)',&lt;br /&gt;
    flux_ivar_g float COMMENT 'Inverse variance of flux_g',&lt;br /&gt;
    flux_ivar_r float COMMENT 'Inverse variance of flux_r',&lt;br /&gt;
    flux_ivar_z float COMMENT 'Inverse variance of flux_z',&lt;br /&gt;
    flux_ivar_w1 float COMMENT 'Inverse variance of flux_w1 (AB system)',&lt;br /&gt;
    flux_ivar_w2 float COMMENT 'Inverse variance of flux_w2 (AB)',&lt;br /&gt;
    flux_ivar_w3 float COMMENT 'Inverse variance of flux_w3 (AB)',&lt;br /&gt;
    flux_ivar_w4 float COMMENT 'Inverse variance of flux_w4 (AB)',&lt;br /&gt;
    fiberflux_g float COMMENT 'Predicted gg-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fiberflux_r float COMMENT 'Predicted rr-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fiberflux_z float COMMENT 'Predicted zz-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_g float COMMENT 'Predicted gg-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_r float COMMENT 'Predicted rr-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_z float COMMENT 'Predicted zz-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    apflux_g array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in gg',&lt;br /&gt;
    apflux_r array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in rr',&lt;br /&gt;
    apflux_z array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in zz',&lt;br /&gt;
    apflux_resid_g array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in gg',&lt;br /&gt;
    apflux_resid_r array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in rr',&lt;br /&gt;
    apflux_resid_z array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in zz',&lt;br /&gt;
    apflux_ivar_g array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_g',&lt;br /&gt;
    apflux_ivar_r array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_r',&lt;br /&gt;
    apflux_ivar_z array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_z',&lt;br /&gt;
    mw_transmission_g float COMMENT 'Galactic transmission in gg filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_r float COMMENT 'Galactic transmission in rr filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_z float COMMENT 'Galactic transmission in zz filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w1 float COMMENT 'Galactic transmission in W1W1 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w2 float COMMENT 'Galactic transmission in W2W2 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w3 float COMMENT 'Galactic transmission in W3W3 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w4 float COMMENT 'Galactic transmission in W4W4 filter in linear units [0, 1]',&lt;br /&gt;
    nobs_g smallint COMMENT 'Number of images that contribute to the central pixel in gg: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_r smallint COMMENT 'Number of images that contribute to the central pixel in rr: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_z smallint COMMENT 'Number of images that contribute to the central pixel in zz: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w1 smallint COMMENT 'Number of images that contribute to the central pixel in W1W1: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w2 smallint COMMENT 'Number of images that contribute to the central pixel in W2W2: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w3 smallint COMMENT 'Number of images that contribute to the central pixel in W3W3: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w4 smallint COMMENT 'Number of images that contribute to the central pixel in W4W4: filter for this object (not profile-weighted)',&lt;br /&gt;
    rchisq_g float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in gg',&lt;br /&gt;
    rchisq_r float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in rr',&lt;br /&gt;
    rchisq_z float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in zz',&lt;br /&gt;
    rchisq_w1 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W1W1',&lt;br /&gt;
    rchisq_w2 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W2W2',&lt;br /&gt;
    rchisq_w3 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W3W3',&lt;br /&gt;
    rchisq_w4 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W4W4',&lt;br /&gt;
    fracflux_g float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in gg (typically [0,1])',&lt;br /&gt;
    fracflux_r float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in rr (typically [0,1])',&lt;br /&gt;
    fracflux_z float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in zz (typically [0,1])',&lt;br /&gt;
    fracflux_w1 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W1W1 (typically [0,1])',&lt;br /&gt;
    fracflux_w2 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W2W2 (typically [0,1])',&lt;br /&gt;
    fracflux_w3 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W3W3 (typically [0,1])',&lt;br /&gt;
    fracflux_w4 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W4W4 (typically [0,1])',&lt;br /&gt;
    fracmasked_g float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in gg, strictly between [0,1]',&lt;br /&gt;
    fracmasked_r float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in rr, strictly between [0,1]',&lt;br /&gt;
    fracmasked_z float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in zz, strictly between [0,1]',&lt;br /&gt;
    fracin_g float COMMENT 'Fraction of a source\'s flux within the blob in gg, near unity for real sources',&lt;br /&gt;
    fracin_r float COMMENT 'Fraction of a source\'s flux within the blob in rr, near unity for real sources',&lt;br /&gt;
    fracin_z float COMMENT 'Fraction of a source\'s flux within the blob in zz, near unity for real sources',&lt;br /&gt;
    anymask_g smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in gg as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    anymask_r smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in rr as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    anymask_z smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in zz as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_g smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in gg as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_r smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in rr as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_z smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in zz as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    wisemask_w1 tinyint COMMENT 'W1 bitmask as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    wisemask_w2 tinyint COMMENT 'W2 bitmask as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    psfsize_g float COMMENT 'Weighted average PSF FWHM in the gg band',&lt;br /&gt;
    psfsize_r float COMMENT 'Weighted average PSF FWHM in the rr band',&lt;br /&gt;
    psfsize_z float COMMENT 'Weighted average PSF FWHM in the zz band',&lt;br /&gt;
    psfdepth_g float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_g)5/(psfdepth_g) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_g))−9]−2.5[log10⁡(5/(psfdepth_g))−9] gives corresponding AB magnitude',&lt;br /&gt;
    psfdepth_r float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_r)5/(psfdepth_r) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_r))−9]−2.5[log10⁡(5/(psfdepth_r))−9] gives corresponding AB magnitude',&lt;br /&gt;
    psfdepth_z float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_z)5/(psfdepth_z) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_z))−9]−2.5[log10⁡(5/(psfdepth_z))−9] gives corresponding AB magnitude',&lt;br /&gt;
    galdepth_g float COMMENT 'As for psfdepth_g but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    galdepth_r float COMMENT 'As for psfdepth_r but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    galdepth_z float COMMENT 'As for psfdepth_z but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    psfdepth_w1 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W1',&lt;br /&gt;
    psfdepth_w2 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W2',&lt;br /&gt;
    psfdepth_w3 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W3',&lt;br /&gt;
    psfdepth_w4 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W4',&lt;br /&gt;
    wise_coadd_id string COMMENT 'unWISE coadd file name for the center of each object',&lt;br /&gt;
    lc_flux_w1 array&amp;lt;float&amp;gt; COMMENT 'flux_w1 in each of up to eleven unWISE coadd epochs (AB system)',&lt;br /&gt;
    lc_flux_w2 array&amp;lt;float&amp;gt; COMMENT 'flux_w2 in each of up to eleven unWISE coadd epochs (AB)',&lt;br /&gt;
    lc_flux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of lc_flux_w1 (AB system)',&lt;br /&gt;
    lc_flux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of lc_flux_w2 (AB)',&lt;br /&gt;
    lc_nobs_w1 array&amp;lt;smallint&amp;gt; COMMENT 'nobs_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_nobs_w2 array&amp;lt;smallint&amp;gt; COMMENT 'nobs_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_fracflux_w1 array&amp;lt;float&amp;gt; COMMENT 'fracflux_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_fracflux_w2 array&amp;lt;float&amp;gt; COMMENT 'fracflux_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_rchisq_w1 array&amp;lt;float&amp;gt; COMMENT 'rchisq_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_rchisq_w2 array&amp;lt;float&amp;gt; COMMENT 'rchisq_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_mjd_w1 array&amp;lt;double&amp;gt; COMMENT 'mjd_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_mjd_w2 array&amp;lt;double&amp;gt; COMMENT 'mjd_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    fracdev float COMMENT 'Fraction of model in deVauc [0,1]',&lt;br /&gt;
    fracdev_ivar float COMMENT 'Inverse variance of fracdev',&lt;br /&gt;
    shapeexp_r float COMMENT 'Half-light radius of exponential model (&amp;gt;0)',&lt;br /&gt;
    shapeexp_r_ivar float COMMENT 'Inverse variance of shapeexp_r',&lt;br /&gt;
    shapeexp_e1 float COMMENT 'Ellipticity component 1',&lt;br /&gt;
    shapeexp_e1_ivar float COMMENT 'Inverse variance of shapeexp_e1',&lt;br /&gt;
    shapeexp_e2 float COMMENT 'Ellipticity component 2',&lt;br /&gt;
    shapeexp_e2_ivar float COMMENT 'Inverse variance of shapeexp_e2',&lt;br /&gt;
    shapedev_r float COMMENT 'Half-light radius of deVaucouleurs model (&amp;gt;0)',&lt;br /&gt;
    shapedev_r_ivar float COMMENT 'Inverse variance of shapedev_r',&lt;br /&gt;
    shapedev_e1 float COMMENT 'Ellipticity component 1',&lt;br /&gt;
    shapedev_e1_ivar float COMMENT 'Inverse variance of shapedev_e1',&lt;br /&gt;
    shapedev_e2 float COMMENT 'Ellipticity component 2',&lt;br /&gt;
    shapedev_e2_ivar float COMMENT 'Inverse variance of shapedev_e2',&lt;br /&gt;
    z_phot_mean FLOAT COMMENT 'photo-z derived from the mean of the photo-z PDF ',&lt;br /&gt;
    z_phot_median FLOAT COMMENT 'photo-z derived from the median of the photo-z PDF',&lt;br /&gt;
    z_phot_std FLOAT COMMENT 'standard deviation of the photo-z\'s derived from the photo-z PDF',&lt;br /&gt;
    z_phot_l68 FLOAT COMMENT 'lower bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_u68 FLOAT COMMENT 'upper bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_l95 FLOAT COMMENT 'lower bound of the 95% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_u95 FLOAT COMMENT 'upper bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_spec FLOAT COMMENT 'spectroscopic redshift, if available',&lt;br /&gt;
    survey STRING COMMENT 'source of the spectroscopic redshift',&lt;br /&gt;
    training BOOLEAN COMMENT 'whether or not the spectroscopic redshift is used in photometric redshift training'&lt;br /&gt;
 )&lt;br /&gt;
 CLUSTERED BY (&lt;br /&gt;
    release,&lt;br /&gt;
    brickid,&lt;br /&gt;
    objid)&lt;br /&gt;
 SORTED BY (&lt;br /&gt;
    release ASC,&lt;br /&gt;
    brickid ASC,&lt;br /&gt;
    objid ASC)&lt;br /&gt;
 INTO 4096 BUCKETS&lt;br /&gt;
 STORED AS ORC&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Join insert ===&lt;br /&gt;
&lt;br /&gt;
 INSERT OVERWRITE TABLE cosmohub.legacy_survey_dr8_phz&lt;br /&gt;
 SELECT&lt;br /&gt;
   dr8.*,&lt;br /&gt;
   phz.z_phot_mean,&lt;br /&gt;
   phz.z_phot_median,&lt;br /&gt;
   phz.z_phot_std,&lt;br /&gt;
   phz.z_phot_l68,&lt;br /&gt;
   phz.z_phot_u68,&lt;br /&gt;
   phz.z_phot_l95,&lt;br /&gt;
   phz.z_phot_u95,&lt;br /&gt;
   phz.z_spec,&lt;br /&gt;
   phz.survey,&lt;br /&gt;
   phz.training&lt;br /&gt;
 FROM cosmohub.legacy_survey_dr8 AS dr8&lt;br /&gt;
 LEFT JOIN tallada.dr8_sweep AS phz&lt;br /&gt;
   ON dr8.release = phz.release&lt;br /&gt;
     AND dr8.brickid = phz.brickid&lt;br /&gt;
     AND dr8.objid = phz.objid&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
== Queries for checking ==&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(release) AS c&lt;br /&gt;
   FROM cosmohub.legacy_survey_dr8&lt;br /&gt;
   GROUP BY release, brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(brickid) AS c&lt;br /&gt;
   FROM cosmohub.legacy_survey_dr8&lt;br /&gt;
   GROUP BY brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(release) AS c&lt;br /&gt;
   FROM tallada.dr8_sweep&lt;br /&gt;
   GROUP BY release, brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(brickid) AS c&lt;br /&gt;
   FROM tallada.dr8_sweep&lt;br /&gt;
   GROUP BY brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT release, brickid, objid, COUNT(release)&lt;br /&gt;
 FROM tallada.dr8_sweep&lt;br /&gt;
 GROUP BY release, brickid, objid&lt;br /&gt;
 HAVING COUNT(release) &amp;gt; 1&lt;br /&gt;
&lt;br /&gt;
 DR8 release brickid objid: DISTINCT(1.694.230.368) TOTAL(1.694.230.368)&lt;br /&gt;
 DR8 brickid objid:         DISTINCT(1.654.429.115) TOTAL(1.694.230.368)&lt;br /&gt;
 &lt;br /&gt;
 PHZ release brickid objid: DISTINCT(1.646.664.729) TOTAL(1.646.664.897)&lt;br /&gt;
 PHZ brickid objid:         DISTINCT(1.608.841.582) TOTAL(1.646.664.897)&lt;br /&gt;
 &lt;br /&gt;
 DR8: 							 1.694.230.368&lt;br /&gt;
 PHZ: 							 1.646.664.897&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
       			  				   -47.565.471‬&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Legacy_Survey_DR9&amp;diff=876</id>
		<title>Legacy Survey DR9</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Legacy_Survey_DR9&amp;diff=876"/>
		<updated>2020-11-28T02:11:58Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Internal Table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Original DR9 ==&lt;br /&gt;
=== Raw data ===&lt;br /&gt;
&lt;br /&gt;
Downloaded from NERSC&lt;br /&gt;
 /global/cfs/cdirs/cosmo/work/legacysurvey/dr9m&lt;br /&gt;
&lt;br /&gt;
Directories:&lt;br /&gt;
 south/tractor&lt;br /&gt;
 north/tractor&lt;br /&gt;
&lt;br /&gt;
Downloaded using bbcp from services01.euclid into CephFS scratch:&lt;br /&gt;
 bbcp -s 16 -a -A -v -z -r -S &amp;quot;ssh -x -a -oFallBackToRsh=no %I -l %U %H /usr/common/usg/bin/bbcp&amp;quot; \&lt;br /&gt;
 &amp;quot;jcarrete@dtn01.nersc.gov:/global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/north/tractor&amp;quot; \&lt;br /&gt;
 /cephfs/pic.es/astro/scratch/tallada/dr9m/north/tractor&lt;br /&gt;
 bbcp -s 16 -a -A -v -z -r -S &amp;quot;ssh -x -a -oFallBackToRsh=no %I -l %U %H /usr/common/usg/bin/bbcp&amp;quot; \&lt;br /&gt;
 &amp;quot;jcarrete@dtn01.nersc.gov:/global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/south/tractor&amp;quot; \&lt;br /&gt;
 /cephfs/pic.es/astro/scratch/tallada/dr9m/south/tractor&lt;br /&gt;
&lt;br /&gt;
Checksums provided through sha256sum files, and checked using command:&lt;br /&gt;
 find * -type d | xargs -t -L1 -P24 sh -c 'cd $1; sha256sum --quiet -c *.sha256sum' cksum&lt;br /&gt;
&lt;br /&gt;
=== Parquet ===&lt;br /&gt;
&lt;br /&gt;
The following code snippet was used in spark to convert fits files to parquet:&lt;br /&gt;
&lt;br /&gt;
 path_base = '/cephfs/pic.es/astro/scratch/tallada/dr9m'&lt;br /&gt;
 hdfs_base = '/user/tallada/data/legacysurvey_dr9'&lt;br /&gt;
 &lt;br /&gt;
 hs = ['h=north', 'h=south']&lt;br /&gt;
 rs = ['r={0:03d}'.format(x) for x in range(360)]&lt;br /&gt;
 &lt;br /&gt;
 for h in hs:&lt;br /&gt;
     for r in rs:&lt;br /&gt;
         p = os.path.join(path_base, h, r)&lt;br /&gt;
         if not os.path.exists(p):&lt;br /&gt;
             continue&lt;br /&gt;
         &lt;br /&gt;
         size = sum(os.path.getsize(os.path.join(p,f)) for f in os.listdir(p) if os.path.isfile(os.path.join(p,f)))&lt;br /&gt;
        &lt;br /&gt;
         print h, r, size        &lt;br /&gt;
         &lt;br /&gt;
         df = spark.read.format(&amp;quot;fits&amp;quot;).option(&amp;quot;hdu&amp;quot;, 1).load(&lt;br /&gt;
             &amp;quot;file://&amp;quot; + p&lt;br /&gt;
         )&lt;br /&gt;
         &lt;br /&gt;
         df = df.repartition(int(math.ceil(size / (256*1024*1024.0))))&lt;br /&gt;
                 &lt;br /&gt;
         df.write.parquet(os.path.join(hdfs_base, h, r))&lt;br /&gt;
&lt;br /&gt;
=== External table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE `tallada`.`legacysurvey_dr9`(&lt;br /&gt;
  `release` smallint, &lt;br /&gt;
  `brickid` int, &lt;br /&gt;
  `brickname` string, &lt;br /&gt;
  `objid` int, &lt;br /&gt;
  `brick_primary` boolean, &lt;br /&gt;
  `maskbits` smallint, &lt;br /&gt;
  `fitbits` smallint, &lt;br /&gt;
  `type` string, &lt;br /&gt;
  `ra` double, &lt;br /&gt;
  `dec` double, &lt;br /&gt;
  `ra_ivar` float, &lt;br /&gt;
  `dec_ivar` float, &lt;br /&gt;
  `bx` float, &lt;br /&gt;
  `by` float, &lt;br /&gt;
  `dchisq` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `ebv` float, &lt;br /&gt;
  `mjd_min` double, &lt;br /&gt;
  `mjd_max` double, &lt;br /&gt;
  `ref_cat` string, &lt;br /&gt;
  `ref_id` bigint, &lt;br /&gt;
  `pmra` float, &lt;br /&gt;
  `pmdec` float, &lt;br /&gt;
  `parallax` float, &lt;br /&gt;
  `pmra_ivar` float, &lt;br /&gt;
  `pmdec_ivar` float, &lt;br /&gt;
  `parallax_ivar` float, &lt;br /&gt;
  `ref_epoch` float, &lt;br /&gt;
  `gaia_phot_g_mean_mag` float, &lt;br /&gt;
  `gaia_phot_g_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_g_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_bp_mean_mag` float, &lt;br /&gt;
  `gaia_phot_bp_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_bp_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_rp_mean_mag` float, &lt;br /&gt;
  `gaia_phot_rp_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_rp_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_variable_flag` boolean, &lt;br /&gt;
  `gaia_astrometric_excess_noise` float, &lt;br /&gt;
  `gaia_astrometric_excess_noise_sig` float, &lt;br /&gt;
  `gaia_astrometric_n_obs_al` smallint, &lt;br /&gt;
  `gaia_astrometric_n_good_obs_al` smallint, &lt;br /&gt;
  `gaia_astrometric_weight_al` float, &lt;br /&gt;
  `gaia_duplicated_source` boolean, &lt;br /&gt;
  `gaia_a_g_val` float, &lt;br /&gt;
  `gaia_e_bp_min_rp_val` float, &lt;br /&gt;
  `gaia_phot_bp_rp_excess_factor` float, &lt;br /&gt;
  `gaia_astrometric_sigma5d_max` float, &lt;br /&gt;
  `gaia_astrometric_params_solved` tinyint, &lt;br /&gt;
  `flux_g` float, &lt;br /&gt;
  `flux_r` float, &lt;br /&gt;
  `flux_z` float, &lt;br /&gt;
  `flux_w1` float, &lt;br /&gt;
  `flux_w2` float, &lt;br /&gt;
  `flux_w3` float, &lt;br /&gt;
  `flux_w4` float, &lt;br /&gt;
  `flux_ivar_g` float, &lt;br /&gt;
  `flux_ivar_r` float, &lt;br /&gt;
  `flux_ivar_z` float, &lt;br /&gt;
  `flux_ivar_w1` float, &lt;br /&gt;
  `flux_ivar_w2` float, &lt;br /&gt;
  `flux_ivar_w3` float, &lt;br /&gt;
  `flux_ivar_w4` float, &lt;br /&gt;
  `fiberflux_g` float, &lt;br /&gt;
  `fiberflux_r` float, &lt;br /&gt;
  `fiberflux_z` float, &lt;br /&gt;
  `fibertotflux_g` float, &lt;br /&gt;
  `fibertotflux_r` float, &lt;br /&gt;
  `fibertotflux_z` float, &lt;br /&gt;
  `apflux_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `mw_transmission_g` float, &lt;br /&gt;
  `mw_transmission_r` float, &lt;br /&gt;
  `mw_transmission_z` float, &lt;br /&gt;
  `mw_transmission_w1` float, &lt;br /&gt;
  `mw_transmission_w2` float, &lt;br /&gt;
  `mw_transmission_w3` float, &lt;br /&gt;
  `mw_transmission_w4` float, &lt;br /&gt;
  `nobs_g` smallint, &lt;br /&gt;
  `nobs_r` smallint, &lt;br /&gt;
  `nobs_z` smallint, &lt;br /&gt;
  `nobs_w1` smallint, &lt;br /&gt;
  `nobs_w2` smallint, &lt;br /&gt;
  `nobs_w3` smallint, &lt;br /&gt;
  `nobs_w4` smallint, &lt;br /&gt;
  `rchisq_g` float, &lt;br /&gt;
  `rchisq_r` float, &lt;br /&gt;
  `rchisq_z` float, &lt;br /&gt;
  `rchisq_w1` float, &lt;br /&gt;
  `rchisq_w2` float, &lt;br /&gt;
  `rchisq_w3` float, &lt;br /&gt;
  `rchisq_w4` float, &lt;br /&gt;
  `fracflux_g` float, &lt;br /&gt;
  `fracflux_r` float, &lt;br /&gt;
  `fracflux_z` float, &lt;br /&gt;
  `fracflux_w1` float, &lt;br /&gt;
  `fracflux_w2` float, &lt;br /&gt;
  `fracflux_w3` float, &lt;br /&gt;
  `fracflux_w4` float, &lt;br /&gt;
  `fracmasked_g` float, &lt;br /&gt;
  `fracmasked_r` float, &lt;br /&gt;
  `fracmasked_z` float, &lt;br /&gt;
  `fracin_g` float, &lt;br /&gt;
  `fracin_r` float, &lt;br /&gt;
  `fracin_z` float, &lt;br /&gt;
  `anymask_g` smallint, &lt;br /&gt;
  `anymask_r` smallint, &lt;br /&gt;
  `anymask_z` smallint, &lt;br /&gt;
  `allmask_g` smallint, &lt;br /&gt;
  `allmask_r` smallint, &lt;br /&gt;
  `allmask_z` smallint, &lt;br /&gt;
  `wisemask_w1` tinyint, &lt;br /&gt;
  `wisemask_w2` tinyint, &lt;br /&gt;
  `psfsize_g` float, &lt;br /&gt;
  `psfsize_r` float, &lt;br /&gt;
  `psfsize_z` float, &lt;br /&gt;
  `psfdepth_g` float, &lt;br /&gt;
  `psfdepth_r` float, &lt;br /&gt;
  `psfdepth_z` float, &lt;br /&gt;
  `galdepth_g` float, &lt;br /&gt;
  `galdepth_r` float, &lt;br /&gt;
  `galdepth_z` float, &lt;br /&gt;
  `nea_g` float, &lt;br /&gt;
  `nea_r` float, &lt;br /&gt;
  `nea_z` float, &lt;br /&gt;
  `blob_nea_g` float, &lt;br /&gt;
  `blob_nea_r` float, &lt;br /&gt;
  `blob_nea_z` float, &lt;br /&gt;
  `psfdepth_w1` float, &lt;br /&gt;
  `psfdepth_w2` float, &lt;br /&gt;
  `psfdepth_w3` float, &lt;br /&gt;
  `psfdepth_w4` float, &lt;br /&gt;
  `wise_coadd_id` string, &lt;br /&gt;
  `wise_x` float, &lt;br /&gt;
  `wise_y` float, &lt;br /&gt;
  `lc_flux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_ivar_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_ivar_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_nobs_w1` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_nobs_w2` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_fracflux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_fracflux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_rchisq_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_rchisq_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_mjd_w1` array&amp;lt;double&amp;gt;, &lt;br /&gt;
  `lc_mjd_w2` array&amp;lt;double&amp;gt;, &lt;br /&gt;
  `lc_epoch_index_w1` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_epoch_index_w2` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `sersic` float, &lt;br /&gt;
  `sersic_ivar` float, &lt;br /&gt;
  `shape_r` float, &lt;br /&gt;
  `shape_r_ivar` float, &lt;br /&gt;
  `shape_e1` float, &lt;br /&gt;
  `shape_e1_ivar` float, &lt;br /&gt;
  `shape_e2` float, &lt;br /&gt;
  `shape_e2_ivar` float)&lt;br /&gt;
 PARTITIONED BY (&lt;br /&gt;
   h STRING,&lt;br /&gt;
   r STRING&lt;br /&gt;
 )&lt;br /&gt;
 STORED AS PARQUET&lt;br /&gt;
 LOCATION '/user/tallada/data/legacysurvey_dr9'&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Internal Table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE `cosmohub`.`legacy_survey_dr9`(&lt;br /&gt;
  `release` smallint,&lt;br /&gt;
  `brickid` int,&lt;br /&gt;
  `brickname` string,&lt;br /&gt;
  `objid` int,&lt;br /&gt;
  `brick_primary` boolean,&lt;br /&gt;
  `maskbits` smallint,&lt;br /&gt;
  `fitbits` smallint,&lt;br /&gt;
  `type` string,&lt;br /&gt;
  `ra` double,&lt;br /&gt;
  `dec` double,&lt;br /&gt;
  `ra_ivar` float,&lt;br /&gt;
  `dec_ivar` float,&lt;br /&gt;
  `bx` float,&lt;br /&gt;
  `by` float,&lt;br /&gt;
  `dchisq` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `ebv` float,&lt;br /&gt;
  `mjd_min` double,&lt;br /&gt;
  `mjd_max` double,&lt;br /&gt;
  `ref_cat` string,&lt;br /&gt;
  `ref_id` bigint,&lt;br /&gt;
  `pmra` float,&lt;br /&gt;
  `pmdec` float,&lt;br /&gt;
  `parallax` float,&lt;br /&gt;
  `pmra_ivar` float,&lt;br /&gt;
  `pmdec_ivar` float,&lt;br /&gt;
  `parallax_ivar` float,&lt;br /&gt;
  `ref_epoch` float,&lt;br /&gt;
  `gaia_phot_g_mean_mag` float,&lt;br /&gt;
  `gaia_phot_g_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_g_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_bp_mean_mag` float,&lt;br /&gt;
  `gaia_phot_bp_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_bp_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_rp_mean_mag` float,&lt;br /&gt;
  `gaia_phot_rp_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_rp_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_variable_flag` boolean,&lt;br /&gt;
  `gaia_astrometric_excess_noise` float,&lt;br /&gt;
  `gaia_astrometric_excess_noise_sig` float,&lt;br /&gt;
  `gaia_astrometric_n_obs_al` smallint,&lt;br /&gt;
  `gaia_astrometric_n_good_obs_al` smallint,&lt;br /&gt;
  `gaia_astrometric_weight_al` float,&lt;br /&gt;
  `gaia_duplicated_source` boolean,&lt;br /&gt;
  `gaia_a_g_val` float,&lt;br /&gt;
  `gaia_e_bp_min_rp_val` float,&lt;br /&gt;
  `gaia_phot_bp_rp_excess_factor` float,&lt;br /&gt;
  `gaia_astrometric_sigma5d_max` float,&lt;br /&gt;
  `gaia_astrometric_params_solved` tinyint,&lt;br /&gt;
  `flux_g` float,&lt;br /&gt;
  `flux_r` float,&lt;br /&gt;
  `flux_z` float,&lt;br /&gt;
  `flux_w1` float,&lt;br /&gt;
  `flux_w2` float,&lt;br /&gt;
  `flux_w3` float,&lt;br /&gt;
  `flux_w4` float,&lt;br /&gt;
  `flux_ivar_g` float,&lt;br /&gt;
  `flux_ivar_r` float,&lt;br /&gt;
  `flux_ivar_z` float,&lt;br /&gt;
  `flux_ivar_w1` float,&lt;br /&gt;
  `flux_ivar_w2` float,&lt;br /&gt;
  `flux_ivar_w3` float,&lt;br /&gt;
  `flux_ivar_w4` float,&lt;br /&gt;
  `fiberflux_g` float,&lt;br /&gt;
  `fiberflux_r` float,&lt;br /&gt;
  `fiberflux_z` float,&lt;br /&gt;
  `fibertotflux_g` float,&lt;br /&gt;
  `fibertotflux_r` float,&lt;br /&gt;
  `fibertotflux_z` float,&lt;br /&gt;
  `apflux_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `mw_transmission_g` float,&lt;br /&gt;
  `mw_transmission_r` float,&lt;br /&gt;
  `mw_transmission_z` float,&lt;br /&gt;
  `mw_transmission_w1` float,&lt;br /&gt;
  `mw_transmission_w2` float,&lt;br /&gt;
  `mw_transmission_w3` float,&lt;br /&gt;
  `mw_transmission_w4` float,&lt;br /&gt;
  `nobs_g` smallint,&lt;br /&gt;
  `nobs_r` smallint,&lt;br /&gt;
  `nobs_z` smallint,&lt;br /&gt;
  `nobs_w1` smallint,&lt;br /&gt;
  `nobs_w2` smallint,&lt;br /&gt;
  `nobs_w3` smallint,&lt;br /&gt;
  `nobs_w4` smallint,&lt;br /&gt;
  `rchisq_g` float,&lt;br /&gt;
  `rchisq_r` float,&lt;br /&gt;
  `rchisq_z` float,&lt;br /&gt;
  `rchisq_w1` float,&lt;br /&gt;
  `rchisq_w2` float,&lt;br /&gt;
  `rchisq_w3` float,&lt;br /&gt;
  `rchisq_w4` float,&lt;br /&gt;
  `fracflux_g` float,&lt;br /&gt;
  `fracflux_r` float,&lt;br /&gt;
  `fracflux_z` float,&lt;br /&gt;
  `fracflux_w1` float,&lt;br /&gt;
  `fracflux_w2` float,&lt;br /&gt;
  `fracflux_w3` float,&lt;br /&gt;
  `fracflux_w4` float,&lt;br /&gt;
  `fracmasked_g` float,&lt;br /&gt;
  `fracmasked_r` float,&lt;br /&gt;
  `fracmasked_z` float,&lt;br /&gt;
  `fracin_g` float,&lt;br /&gt;
  `fracin_r` float,&lt;br /&gt;
  `fracin_z` float,&lt;br /&gt;
  `anymask_g` smallint,&lt;br /&gt;
  `anymask_r` smallint,&lt;br /&gt;
  `anymask_z` smallint,&lt;br /&gt;
  `allmask_g` smallint,&lt;br /&gt;
  `allmask_r` smallint,&lt;br /&gt;
  `allmask_z` smallint,&lt;br /&gt;
  `wisemask_w1` tinyint,&lt;br /&gt;
  `wisemask_w2` tinyint,&lt;br /&gt;
  `psfsize_g` float,&lt;br /&gt;
  `psfsize_r` float,&lt;br /&gt;
  `psfsize_z` float,&lt;br /&gt;
  `psfdepth_g` float,&lt;br /&gt;
  `psfdepth_r` float,&lt;br /&gt;
  `psfdepth_z` float,&lt;br /&gt;
  `galdepth_g` float,&lt;br /&gt;
  `galdepth_r` float,&lt;br /&gt;
  `galdepth_z` float,&lt;br /&gt;
  `nea_g` float,&lt;br /&gt;
  `nea_r` float,&lt;br /&gt;
  `nea_z` float,&lt;br /&gt;
  `blob_nea_g` float,&lt;br /&gt;
  `blob_nea_r` float,&lt;br /&gt;
  `blob_nea_z` float,&lt;br /&gt;
  `psfdepth_w1` float,&lt;br /&gt;
  `psfdepth_w2` float,&lt;br /&gt;
  `psfdepth_w3` float,&lt;br /&gt;
  `psfdepth_w4` float,&lt;br /&gt;
  `wise_coadd_id` string,&lt;br /&gt;
  `wise_x` float,&lt;br /&gt;
  `wise_y` float,&lt;br /&gt;
  `lc_flux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_ivar_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_ivar_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_nobs_w1` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_nobs_w2` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_fracflux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_fracflux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_rchisq_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_rchisq_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_mjd_w1` array&amp;lt;double&amp;gt;,&lt;br /&gt;
  `lc_mjd_w2` array&amp;lt;double&amp;gt;,&lt;br /&gt;
  `lc_epoch_index_w1` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_epoch_index_w2` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `sersic` float,&lt;br /&gt;
  `sersic_ivar` float,&lt;br /&gt;
  `shape_r` float,&lt;br /&gt;
  `shape_r_ivar` float,&lt;br /&gt;
  `shape_e1` float,&lt;br /&gt;
  `shape_e1_ivar` float,&lt;br /&gt;
  `shape_e2` float,&lt;br /&gt;
  `shape_e2_ivar` float)&lt;br /&gt;
 CLUSTERED BY (&lt;br /&gt;
  release, brickid, objid&lt;br /&gt;
 )&lt;br /&gt;
 SORTED BY (&lt;br /&gt;
  release, brickid, objid&lt;br /&gt;
 )&lt;br /&gt;
 INTO 4096 BUCKETS&lt;br /&gt;
 STORED AS ORC&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INSERT INTO TABLE cosmohub.legacy_survey_dr9&lt;br /&gt;
 SELECT  release, brickid, brickname, objid, brick_primary, maskbits, fitbits, type, ra, `dec`, ra_ivar, dec_ivar,&lt;br /&gt;
 bx, `by`, dchisq, ebv, mjd_min, mjd_max, ref_cat, ref_id, pmra, pmdec, parallax, pmra_ivar, pmdec_ivar,&lt;br /&gt;
 parallax_ivar, ref_epoch, gaia_phot_g_mean_mag, gaia_phot_g_mean_flux_over_error, gaia_phot_g_n_obs,&lt;br /&gt;
 gaia_phot_bp_mean_mag, gaia_phot_bp_mean_flux_over_error, gaia_phot_bp_n_obs, gaia_phot_rp_mean_mag,&lt;br /&gt;
 gaia_phot_rp_mean_flux_over_error, gaia_phot_rp_n_obs, gaia_phot_variable_flag, gaia_astrometric_excess_noise,&lt;br /&gt;
 gaia_astrometric_excess_noise_sig, gaia_astrometric_n_obs_al, gaia_astrometric_n_good_obs_al,&lt;br /&gt;
 gaia_astrometric_weight_al, gaia_duplicated_source, gaia_a_g_val, gaia_e_bp_min_rp_val,&lt;br /&gt;
 gaia_phot_bp_rp_excess_factor, gaia_astrometric_sigma5d_max, gaia_astrometric_params_solved, flux_g, flux_r,&lt;br /&gt;
 flux_z, flux_w1, flux_w2, flux_w3, flux_w4, flux_ivar_g, flux_ivar_r, flux_ivar_z, flux_ivar_w1, flux_ivar_w2,&lt;br /&gt;
 flux_ivar_w3, flux_ivar_w4, fiberflux_g, fiberflux_r, fiberflux_z, fibertotflux_g, fibertotflux_r, fibertotflux_z,&lt;br /&gt;
 apflux_g, apflux_r, apflux_z, apflux_resid_g, apflux_resid_r, apflux_resid_z, apflux_blobresid_g,&lt;br /&gt;
 apflux_blobresid_r, apflux_blobresid_z, apflux_ivar_g, apflux_ivar_r, apflux_ivar_z, apflux_masked_g,&lt;br /&gt;
 apflux_masked_r, apflux_masked_z, apflux_w1, apflux_w2, apflux_w3, apflux_w4, apflux_resid_w1, apflux_resid_w2,&lt;br /&gt;
 apflux_resid_w3, apflux_resid_w4, apflux_ivar_w1, apflux_ivar_w2, apflux_ivar_w3, apflux_ivar_w4,&lt;br /&gt;
 mw_transmission_g, mw_transmission_r, mw_transmission_z, mw_transmission_w1, mw_transmission_w2,&lt;br /&gt;
 mw_transmission_w3, mw_transmission_w4, nobs_g, nobs_r, nobs_z, nobs_w1, nobs_w2, nobs_w3, nobs_w4, rchisq_g,&lt;br /&gt;
 rchisq_r, rchisq_z, rchisq_w1, rchisq_w2, rchisq_w3, rchisq_w4, fracflux_g, fracflux_r, fracflux_z, fracflux_w1,&lt;br /&gt;
 fracflux_w2, fracflux_w3, fracflux_w4, fracmasked_g, fracmasked_r, fracmasked_z, fracin_g, fracin_r, fracin_z,&lt;br /&gt;
 anymask_g, anymask_r, anymask_z, allmask_g, allmask_r, allmask_z, wisemask_w1, wisemask_w2, psfsize_g, psfsize_r,&lt;br /&gt;
 psfsize_z, psfdepth_g, psfdepth_r, psfdepth_z, galdepth_g, galdepth_r, galdepth_z, nea_g, nea_r, nea_z,&lt;br /&gt;
 blob_nea_g, blob_nea_r, blob_nea_z, psfdepth_w1, psfdepth_w2, psfdepth_w3, psfdepth_w4, wise_coadd_id, wise_x,&lt;br /&gt;
 wise_y, lc_flux_w1, lc_flux_w2, lc_flux_ivar_w1, lc_flux_ivar_w2, lc_nobs_w1, lc_nobs_w2, lc_fracflux_w1,&lt;br /&gt;
 lc_fracflux_w2, lc_rchisq_w1, lc_rchisq_w2, lc_mjd_w1, lc_mjd_w2, lc_epoch_index_w1, lc_epoch_index_w2, sersic,&lt;br /&gt;
 sersic_ivar, shape_r, shape_r_ivar, shape_e1, shape_e1_ivar, shape_e2, shape_e2_ivar&lt;br /&gt;
 FROM cosmohub.legacy_survey_dr9_p&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE release release smallint COMMENT &amp;quot;Unique integer denoting the camera and filter set used&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE brickid brickid int COMMENT &amp;quot;Brick ID [1,662174]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE brickname brickname string COMMENT &amp;quot;Name of brick, encoding the brick sky position, eg \&amp;quot;1126p222\&amp;quot; near RA=112.6, Dec=+22.2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE objid objid int COMMENT &amp;quot;Catalog object number within this brick\u003b a unique identifier hash is release,brickid,objid\u003b objid spans [0,N-1] and is contiguously enumerated within each brick&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE brick_primary brick_primary boolean COMMENT &amp;quot;True if the object is within the brick boundary&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE brightblob brightblob smallint COMMENT &amp;quot;bitwise mask indicating that an object is near a bright foreground source, as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE maskbits maskbits smallint COMMENT &amp;quot;bitwise mask indicating that an object touches a pixel in the coadd/*/*/*maskbits*maps, as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE type type string COMMENT &amp;quot;Morphological model: PSF=stellar, REX=round exponential galaxy, DEV=deVauc, EXP=exponential, COMP=composite, DUP=Gaia source fit by different model.&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ra ra double COMMENT &amp;quot;Right ascension at equinox J2000&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE dec dec double COMMENT &amp;quot;Declination at equinox J2000&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ra_ivar ra_ivar float COMMENT &amp;quot;Inverse variance of RA (no cosine term!), excluding astrometric calibration errors&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE dec_ivar dec_ivar float COMMENT &amp;quot;Inverse variance of DEC, excluding astrometric calibration errors&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE bx bx float COMMENT &amp;quot;X position (0-indexed) of coordinates in brick image stack&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE by by float COMMENT &amp;quot;Y position (0-indexed) of coordinates in brick image stack&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE dchisq dchisq array&amp;lt;float&amp;gt; COMMENT &amp;quot;Difference in χ² between successively more-complex model fits: PSF, REX, DEV, EXP, COMP. The difference is versus no source.&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ebv ebv float COMMENT &amp;quot;Galactic extinction E(B-V) reddening from SFD98, used to compute the mw_transmission_ columns&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mjd_min mjd_min double COMMENT &amp;quot;Minimum Modified Julian Date of observations used to construct the model of this object&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mjd_max mjd_max double COMMENT &amp;quot;Maximum Modified Julian Date of observations used to construct the model of this object&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ref_cat ref_cat string COMMENT &amp;quot;Reference catalog source for this star: T2 for Tycho-2, G2 for Gaia DR2, L2 for the LSLGA, empty otherwise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ref_id ref_id bigint COMMENT &amp;quot;Reference catalog identifier for this star\u003b Tyc1*1,000,000+Tyc2*10+Tyc3 for Tycho2\u003b \&amp;quot;sourceid\&amp;quot; for Gaia-DR2 and LSLGA&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE pmra pmra float COMMENT &amp;quot;Reference catalog proper motion in the RA direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE pmdec pmdec float COMMENT &amp;quot;Reference catalog proper motion in the Dec direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE parallax parallax float COMMENT &amp;quot;Reference catalog parallax&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE pmra_ivar pmra_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on pmra&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE pmdec_ivar pmdec_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on pmdec&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE parallax_ivar parallax_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on parallax&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ref_epoch ref_epoch float COMMENT &amp;quot;Reference catalog reference epoch (eg, 2015.5 for Gaia DR2)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_pointsource gaia_pointsource boolean COMMENT &amp;quot;This Gaia DR2 source is believed to be a star, not a galaxy&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_g_mean_mag gaia_phot_g_mean_mag float COMMENT &amp;quot;Gaia G band mag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_g_mean_flux_over_error gaia_phot_g_mean_flux_over_error float COMMENT &amp;quot;Gaia G band signal-to-noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_g_n_obs gaia_phot_g_n_obs smallint COMMENT &amp;quot;Gaia G band number of observations&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_bp_mean_mag gaia_phot_bp_mean_mag float COMMENT &amp;quot;Gaia BP mag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_bp_mean_flux_over_error gaia_phot_bp_mean_flux_over_error float COMMENT &amp;quot;Gaia BP signal-to-noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_bp_n_obs gaia_phot_bp_n_obs smallint COMMENT &amp;quot;Gaia BP number of observations&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_rp_mean_mag gaia_phot_rp_mean_mag float COMMENT &amp;quot;Gaia RP mag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_rp_mean_flux_over_error gaia_phot_rp_mean_flux_over_error float COMMENT &amp;quot;Gaia RP signal-to-noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_rp_n_obs gaia_phot_rp_n_obs smallint COMMENT &amp;quot;Gaia RP number of observations&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_variable_flag gaia_phot_variable_flag boolean COMMENT &amp;quot;Gaia photometric variable flag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_excess_noise gaia_astrometric_excess_noise float COMMENT &amp;quot;Gaia astrometric excess noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_excess_noise_sig gaia_astrometric_excess_noise_sig float COMMENT &amp;quot;Gaia astrometric excess noise uncertainty&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_n_obs_al gaia_astrometric_n_obs_al smallint COMMENT &amp;quot;Gaia number of astrometric observations along scan direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_n_good_obs_al gaia_astrometric_n_good_obs_al smallint COMMENT &amp;quot;Gaia number of good astrometric observations along scan direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_weight_al gaia_astrometric_weight_al float COMMENT &amp;quot;Gaia astrometric weight along scan direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_duplicated_source gaia_duplicated_source boolean COMMENT &amp;quot;Gaia duplicated source flag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_a_g_val gaia_a_g_val float COMMENT &amp;quot;Gaia line-of-sight extinction in the G band&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_e_bp_min_rp_val gaia_e_bp_min_rp_val float COMMENT &amp;quot;Gaia line-of-sight reddening E(BP-RP)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_bp_rp_excess_factor gaia_phot_bp_rp_excess_factor float COMMENT &amp;quot;Gaia BP/RP excess factor&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_sigma5d_max gaia_astrometric_sigma5d_max float COMMENT &amp;quot;Gaia longest semi-major axis of the 5-d error ellipsoid&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_params_solved gaia_astrometric_params_solved tinyint COMMENT &amp;quot;which astrometric parameters were estimated for a Gaia source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_g flux_g float COMMENT &amp;quot;model flux in gg&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_r flux_r float COMMENT &amp;quot;model flux in rr&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_z flux_z float COMMENT &amp;quot;model flux in zz&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_w1 flux_w1 float COMMENT &amp;quot;WISE model flux in W1W1 (AB system)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_w2 flux_w2 float COMMENT &amp;quot;WISE model flux in W2W2 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_w3 flux_w3 float COMMENT &amp;quot;WISE model flux in W3W3 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_w4 flux_w4 float COMMENT &amp;quot;WISE model flux in W4W4 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_g flux_ivar_g float COMMENT &amp;quot;Inverse variance of flux_g&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_r flux_ivar_r float COMMENT &amp;quot;Inverse variance of flux_r&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_z flux_ivar_z float COMMENT &amp;quot;Inverse variance of flux_z&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_w1 flux_ivar_w1 float COMMENT &amp;quot;Inverse variance of flux_w1 (AB system)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_w2 flux_ivar_w2 float COMMENT &amp;quot;Inverse variance of flux_w2 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_w3 flux_ivar_w3 float COMMENT &amp;quot;Inverse variance of flux_w3 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_w4 flux_ivar_w4 float COMMENT &amp;quot;Inverse variance of flux_w4 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fiberflux_g fiberflux_g float COMMENT &amp;quot;Predicted gg-band flux within a fiber from this object in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fiberflux_r fiberflux_r float COMMENT &amp;quot;Predicted rr-band flux within a fiber from this object in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fiberflux_z fiberflux_z float COMMENT &amp;quot;Predicted zz-band flux within a fiber from this object in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fibertotflux_g fibertotflux_g float COMMENT &amp;quot;Predicted gg-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fibertotflux_r fibertotflux_r float COMMENT &amp;quot;Predicted rr-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fibertotflux_z fibertotflux_z float COMMENT &amp;quot;Predicted zz-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_g apflux_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in gg&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_r apflux_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in rr&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_z apflux_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in zz&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_resid_g apflux_resid_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added residual images in gg&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_resid_r apflux_resid_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added residual images in rr&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_resid_z apflux_resid_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added residual images in zz&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_ivar_g apflux_ivar_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_g&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_ivar_r apflux_ivar_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_r&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_ivar_z apflux_ivar_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_z&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_g mw_transmission_g float COMMENT &amp;quot;Galactic transmission in gg filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_r mw_transmission_r float COMMENT &amp;quot;Galactic transmission in rr filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_z mw_transmission_z float COMMENT &amp;quot;Galactic transmission in zz filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_w1 mw_transmission_w1 float COMMENT &amp;quot;Galactic transmission in W1W1 filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_w2 mw_transmission_w2 float COMMENT &amp;quot;Galactic transmission in W2W2 filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_w3 mw_transmission_w3 float COMMENT &amp;quot;Galactic transmission in W3W3 filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_w4 mw_transmission_w4 float COMMENT &amp;quot;Galactic transmission in W4W4 filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_g nobs_g smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in gg: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_r nobs_r smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in rr: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_z nobs_z smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in zz: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_w1 nobs_w1 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W1W1: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_w2 nobs_w2 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W2W2: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_w3 nobs_w3 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W3W3: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_w4 nobs_w4 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W4W4: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_g rchisq_g float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in gg&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_r rchisq_r float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in rr&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_z rchisq_z float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in zz&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_w1 rchisq_w1 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W1W1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_w2 rchisq_w2 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W2W2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_w3 rchisq_w3 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W3W3&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_w4 rchisq_w4 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W4W4&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_g fracflux_g float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in gg(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_r fracflux_r float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in rr(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_z fracflux_z float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in zz(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_w1 fracflux_w1 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W1W1(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_w2 fracflux_w2 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W2W2(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_w3 fracflux_w3 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W3W3(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_w4 fracflux_w4 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W4W4(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracmasked_g fracmasked_g float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in gg, strictly between [0,1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracmasked_r fracmasked_r float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in rr, strictly between [0,1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracmasked_z fracmasked_z float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in zz, strictly between [0,1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracin_g fracin_g float COMMENT &amp;quot;Fraction of a source's flux within the blob in gg, near unity for real sources&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracin_r fracin_r float COMMENT &amp;quot;Fraction of a source's flux within the blob in rr, near unity for real sources&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracin_z fracin_z float COMMENT &amp;quot;Fraction of a source's flux within the blob in zz, near unity for real sources&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE anymask_g anymask_g smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in gg as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE anymask_r anymask_r smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in rr as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE anymask_z anymask_z smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in zz as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE allmask_g allmask_g smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in gg as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE allmask_r allmask_r smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in rr as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE allmask_z allmask_z smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in zz as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE wisemask_w1 wisemask_w1 tinyint COMMENT &amp;quot;W1 bitmask as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE wisemask_w2 wisemask_w2 tinyint COMMENT &amp;quot;W2 bitmask as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfsize_g psfsize_g float COMMENT &amp;quot;Weighted average PSF FWHM in the gg band&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfsize_r psfsize_r float COMMENT &amp;quot;Weighted average PSF FWHM in the rr band&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfsize_z psfsize_z float COMMENT &amp;quot;Weighted average PSF FWHM in the zz band&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_g psfdepth_g float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_g)5/(psfdepth_g) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_g))−9]−2.5[log10⁡(5/(psfdepth_g))−9] gives corresponding AB magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_r psfdepth_r float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_r)5/(psfdepth_r) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_r))−9]−2.5[log10⁡(5/(psfdepth_r))−9] gives corresponding AB magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_z psfdepth_z float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_z)5/(psfdepth_z) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_z))−9]−2.5[log10⁡(5/(psfdepth_z))−9] gives corresponding AB magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE galdepth_g galdepth_g float COMMENT &amp;quot;As for psfdepth_g but for a galaxy (0.45\&amp;quot; exp, round) detection sensitivity&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE galdepth_r galdepth_r float COMMENT &amp;quot;As for psfdepth_r but for a galaxy (0.45\&amp;quot; exp, round) detection sensitivity&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE galdepth_z galdepth_z float COMMENT &amp;quot;As for psfdepth_z but for a galaxy (0.45\&amp;quot; exp, round) detection sensitivity&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_w1 psfdepth_w1 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_w2 psfdepth_w2 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_w3 psfdepth_w3 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W3&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_w4 psfdepth_w4 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W4&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE wise_coadd_id wise_coadd_id string COMMENT &amp;quot;unWISE coadd file name for the center of each object&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_flux_w1 lc_flux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;flux_w1 in each of up to eleven unWISE coadd epochs (AB system)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_flux_w2 lc_flux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;flux_w2 in each of up to eleven unWISE coadd epochs (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_flux_ivar_w1 lc_flux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of lc_flux_w1 (AB system)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_flux_ivar_w2 lc_flux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of lc_flux_w2 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_nobs_w1 lc_nobs_w1 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;nobs_w1 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_nobs_w2 lc_nobs_w2 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;nobs_w2 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_fracflux_w1 lc_fracflux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;fracflux_w1 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_fracflux_w2 lc_fracflux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;fracflux_w2 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_rchisq_w1 lc_rchisq_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;rchisq_w1 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_rchisq_w2 lc_rchisq_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;rchisq_w2 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_mjd_w1 lc_mjd_w1 array&amp;lt;double&amp;gt; COMMENT &amp;quot;mjd_w1 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_mjd_w2 lc_mjd_w2 array&amp;lt;double&amp;gt; COMMENT &amp;quot;mjd_w2 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracdev fracdev float COMMENT &amp;quot;Fraction of model in deVauc [0,1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracdev_ivar fracdev_ivar float COMMENT &amp;quot;Inverse variance of fracdev&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_r shapeexp_r float COMMENT &amp;quot;Half-light radius of exponential model (&amp;gt;0)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_r_ivar shapeexp_r_ivar float COMMENT &amp;quot;Inverse variance of shapeexp_r&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_e1 shapeexp_e1 float COMMENT &amp;quot;Ellipticity component 1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_e1_ivar shapeexp_e1_ivar float COMMENT &amp;quot;Inverse variance of shapeexp_e1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_e2 shapeexp_e2 float COMMENT &amp;quot;Ellipticity component 2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_e2_ivar shapeexp_e2_ivar float COMMENT &amp;quot;Inverse variance of shapeexp_e2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_r shapedev_r float COMMENT &amp;quot;Half-light radius of deVaucouleurs model (&amp;gt;0)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_r_ivar shapedev_r_ivar float COMMENT &amp;quot;Inverse variance of shapedev_r&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_e1 shapedev_e1 float COMMENT &amp;quot;Ellipticity component 1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_e1_ivar shapedev_e1_ivar float COMMENT &amp;quot;Inverse variance of shapedev_e1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_e2 shapedev_e2 float COMMENT &amp;quot;Ellipticity component 2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_e2_ivar shapedev_e2_ivar float COMMENT &amp;quot;Inverse variance of shapedev_e2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== Sweep photo-z ==&lt;br /&gt;
&lt;br /&gt;
=== Raw data ===&lt;br /&gt;
&lt;br /&gt;
 wget -c --no-clobber --no-parent -r https://portal.nersc.gov/project/cosmo/data/legacysurvey/dr8/north/sweep/&lt;br /&gt;
 wget -c --no-clobber --no-parent -r https://portal.nersc.gov/project/cosmo/data/legacysurvey/dr8/south/sweep/&lt;br /&gt;
&lt;br /&gt;
Checksums checked:&lt;br /&gt;
&lt;br /&gt;
 $ cd north/sweep/8.0&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 287&lt;br /&gt;
 $ wc -l legacysurvey_dr8_north_sweep_8.0.sha256sum&lt;br /&gt;
 286 (+ checksum file)&lt;br /&gt;
 $ sha256sum -c legacysurvey_dr8_north_sweep_8.0.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd north/sweep/8.0-photo-z&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 287&lt;br /&gt;
 $ wc -l legacysurvey_dr8_north_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 286 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_north_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd south/sweep/8.0&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 438&lt;br /&gt;
 $ wc -l legacysurvey_dr8_south_sweep_8.0.sha256sum&lt;br /&gt;
 437 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_south_sweep_8.0.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd south/sweep/8.0-photo-z&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 438&lt;br /&gt;
 $ wc -l legacysurvey_dr8_south_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 437 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_south_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
=== Parquet ===&lt;br /&gt;
&lt;br /&gt;
The following code snippet was used in spark to merge fits files and convert to parquet:&lt;br /&gt;
&lt;br /&gt;
 path_base = '/cephfs/pic.es/astro/scratch/tallada/dr8-phz/'&lt;br /&gt;
 hdfs_base = '/user/tallada/data/legacysurvey-sweep'&lt;br /&gt;
 &lt;br /&gt;
 hs = ['south/sweep'] #, 'north/sweep']&lt;br /&gt;
 dir_src = '8.0'&lt;br /&gt;
 dir_phz = '8.0-photo-z'&lt;br /&gt;
 dir_dst = '8.0-merged'&lt;br /&gt;
 &lt;br /&gt;
 my_files = sorted(os.listdir(os.path.join(path_base, hs[0], dir_src)))&lt;br /&gt;
 &lt;br /&gt;
 def merge_phz(file_name):&lt;br /&gt;
     file_src = os.path.join(path_base, hs[0], dir_src, file_name)&lt;br /&gt;
     file_phz = os.path.join(path_base, hs[0], dir_phz, file_name[:-5]+'-pz.fits')&lt;br /&gt;
     file_dst = os.path.join(path_base, hs[0], dir_dst, file_name[:-5]+'-merged.fits')&lt;br /&gt;
 &lt;br /&gt;
     t_src = table.Table.read(file_src)&lt;br /&gt;
     t_phz = table.Table.read(file_phz)&lt;br /&gt;
     t_dst = table.hstack([t_src, t_phz], join_type='exact')&lt;br /&gt;
 &lt;br /&gt;
     os.unlink(file_dst)&lt;br /&gt;
     t_dst.write(file_dst)&lt;br /&gt;
     &lt;br /&gt;
     return file_name&lt;br /&gt;
 &lt;br /&gt;
 df = sc.parallelize(my_files, len(my_files))&lt;br /&gt;
 &lt;br /&gt;
 df.map(merge_phz).count()&lt;br /&gt;
 &lt;br /&gt;
 df = spark.read.format(&amp;quot;fits&amp;quot;).option(&amp;quot;hdu&amp;quot;, 1).load(&lt;br /&gt;
     &amp;quot;file://&amp;quot; + os.path.join(path_base, hs[0], dir_dst)&lt;br /&gt;
 ) &lt;br /&gt;
 &lt;br /&gt;
 df.write.parquet(os.path.join(hdfs_base, hs[0]))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== External table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE tallada.dr8_sweep (&lt;br /&gt;
    `RELEASE` SMALLINT,&lt;br /&gt;
    `BRICKID` INT,&lt;br /&gt;
    `BRICKNAME` STRING,&lt;br /&gt;
    `OBJID` INT,&lt;br /&gt;
    `TYPE` STRING,&lt;br /&gt;
    `RA` DOUBLE,&lt;br /&gt;
    `DEC` DOUBLE,&lt;br /&gt;
    `RA_IVAR` FLOAT,&lt;br /&gt;
    `DEC_IVAR` FLOAT,&lt;br /&gt;
    `DCHISQ` ARRAY&amp;lt;FLOAT&amp;gt;,&lt;br /&gt;
    `EBV` FLOAT,&lt;br /&gt;
    `FLUX_G` FLOAT,&lt;br /&gt;
    `FLUX_R` FLOAT,&lt;br /&gt;
    `FLUX_Z` FLOAT,&lt;br /&gt;
    `FLUX_W1` FLOAT,&lt;br /&gt;
    `FLUX_W2` FLOAT,&lt;br /&gt;
    `FLUX_W3` FLOAT,&lt;br /&gt;
    `FLUX_W4` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_G` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_R` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_Z` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W1` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W2` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W3` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W4` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_G` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_R` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_Z` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W1` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W2` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W3` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W4` FLOAT,&lt;br /&gt;
    `NOBS_G` INT,&lt;br /&gt;
    `NOBS_R` INT,&lt;br /&gt;
    `NOBS_Z` INT,&lt;br /&gt;
    `NOBS_W1` INT,&lt;br /&gt;
    `NOBS_W2` INT,&lt;br /&gt;
    `NOBS_W3` INT,&lt;br /&gt;
    `NOBS_W4` INT,&lt;br /&gt;
    `RCHISQ_G` FLOAT,&lt;br /&gt;
    `RCHISQ_R` FLOAT,&lt;br /&gt;
    `RCHISQ_Z` FLOAT,&lt;br /&gt;
    `RCHISQ_W1` FLOAT,&lt;br /&gt;
    `RCHISQ_W2` FLOAT,&lt;br /&gt;
    `RCHISQ_W3` FLOAT,&lt;br /&gt;
    `RCHISQ_W4` FLOAT,&lt;br /&gt;
    `FRACFLUX_G` FLOAT,&lt;br /&gt;
    `FRACFLUX_R` FLOAT,&lt;br /&gt;
    `FRACFLUX_Z` FLOAT,&lt;br /&gt;
    `FRACFLUX_W1` FLOAT,&lt;br /&gt;
    `FRACFLUX_W2` FLOAT,&lt;br /&gt;
    `FRACFLUX_W3` FLOAT,&lt;br /&gt;
    `FRACFLUX_W4` FLOAT,&lt;br /&gt;
    `FRACMASKED_G` FLOAT,&lt;br /&gt;
    `FRACMASKED_R` FLOAT,&lt;br /&gt;
    `FRACMASKED_Z` FLOAT,&lt;br /&gt;
    `FRACIN_G` FLOAT,&lt;br /&gt;
    `FRACIN_R` FLOAT,&lt;br /&gt;
    `FRACIN_Z` FLOAT,&lt;br /&gt;
    `ANYMASK_G` SMALLINT,&lt;br /&gt;
    `ANYMASK_R` SMALLINT,&lt;br /&gt;
    `ANYMASK_Z` SMALLINT,&lt;br /&gt;
    `ALLMASK_G` SMALLINT,&lt;br /&gt;
    `ALLMASK_R` SMALLINT,&lt;br /&gt;
    `ALLMASK_Z` SMALLINT,&lt;br /&gt;
    `WISEMASK_W1` TINYINT,&lt;br /&gt;
    `WISEMASK_W2` TINYINT,&lt;br /&gt;
    `PSFSIZE_G` FLOAT,&lt;br /&gt;
    `PSFSIZE_R` FLOAT,&lt;br /&gt;
    `PSFSIZE_Z` FLOAT,&lt;br /&gt;
    `PSFDEPTH_G` FLOAT,&lt;br /&gt;
    `PSFDEPTH_R` FLOAT,&lt;br /&gt;
    `PSFDEPTH_Z` FLOAT,&lt;br /&gt;
    `GALDEPTH_G` FLOAT,&lt;br /&gt;
    `GALDEPTH_R` FLOAT,&lt;br /&gt;
    `GALDEPTH_Z` FLOAT,&lt;br /&gt;
    `PSFDEPTH_W1` FLOAT,&lt;br /&gt;
    `PSFDEPTH_W2` FLOAT,&lt;br /&gt;
    `WISE_COADD_ID` STRING,&lt;br /&gt;
    `FRACDEV` FLOAT,&lt;br /&gt;
    `FRACDEV_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_R` FLOAT,&lt;br /&gt;
    `SHAPEDEV_R_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E1` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E1_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E2` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E2_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_R` FLOAT,&lt;br /&gt;
    `SHAPEEXP_R_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E1` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E1_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E2` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E2_IVAR` FLOAT,&lt;br /&gt;
    `FIBERFLUX_G` FLOAT,&lt;br /&gt;
    `FIBERFLUX_R` FLOAT,&lt;br /&gt;
    `FIBERFLUX_Z` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_G` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_R` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_Z` FLOAT,&lt;br /&gt;
    `REF_CAT` STRING,&lt;br /&gt;
    `REF_ID` BIGINT,&lt;br /&gt;
    `REF_EPOCH` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_G_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_G_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_BP_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_BP_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_RP_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_RP_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_EXCESS_NOISE` FLOAT,&lt;br /&gt;
    `GAIA_DUPLICATED_SOURCE` BOOLEAN,&lt;br /&gt;
    `GAIA_PHOT_BP_RP_EXCESS_FACTOR` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_SIGMA5D_MAX` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_PARAMS_SOLVED` TINYINT,&lt;br /&gt;
    `PARALLAX` FLOAT,&lt;br /&gt;
    `PARALLAX_IVAR` FLOAT,&lt;br /&gt;
    `PMRA` FLOAT,&lt;br /&gt;
    `PMRA_IVAR` FLOAT,&lt;br /&gt;
    `PMDEC` FLOAT,&lt;br /&gt;
    `PMDEC_IVAR` FLOAT,&lt;br /&gt;
    `MASKBITS` SMALLINT,&lt;br /&gt;
    `z_phot_mean` FLOAT,&lt;br /&gt;
    `z_phot_median` FLOAT,&lt;br /&gt;
    `z_phot_std` FLOAT,&lt;br /&gt;
    `z_phot_l68` FLOAT,&lt;br /&gt;
    `z_phot_u68` FLOAT,&lt;br /&gt;
    `z_phot_l95` FLOAT,&lt;br /&gt;
    `z_phot_u95` FLOAT,&lt;br /&gt;
    `z_spec` FLOAT,&lt;br /&gt;
    `survey` STRING,&lt;br /&gt;
    `training` BOOLEAN&lt;br /&gt;
 )&lt;br /&gt;
 STORED AS PARQUET&lt;br /&gt;
 LOCATION '/user/tallada/data/legacysurvey-sweep'&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Combined table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE cosmohub.legacysurvey_dr8_phz (&lt;br /&gt;
    release smallint COMMENT 'Unique integer denoting the camera and filter set used',&lt;br /&gt;
    brickid int COMMENT 'Brick ID [1,662174]',&lt;br /&gt;
    brickname string COMMENT 'Name of brick, encoding the brick sky position, eg &amp;quot;1126p222&amp;quot; near RA=112.6, Dec=+22.2',&lt;br /&gt;
    objid int COMMENT 'Catalog object number within this brick\u003b a unique identifier hash is release,brickid,objid\u003b objid spans [0,N-1] and is contiguously enumerated within each brick',&lt;br /&gt;
    brick_primary boolean COMMENT 'True if the object is within the brick boundary',&lt;br /&gt;
    brightblob smallint COMMENT 'bitwise mask indicating that an object is near a bright foreground source, as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    maskbits smallint COMMENT 'bitwise mask indicating that an object touches a pixel in the coadd/*/*/*maskbits* maps, as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    type string COMMENT 'Morphological model: &amp;quot;PSF&amp;quot;=stellar, &amp;quot;REX&amp;quot;=&amp;quot;round exponential galaxy&amp;quot;, &amp;quot;DEV&amp;quot;=deVauc, &amp;quot;EXP&amp;quot;=exponential, &amp;quot;COMP&amp;quot;=composite, &amp;quot;DUP&amp;quot;=Gaia source fit by different model. Note that in some FITS readers, a trailing space may be appended for &amp;quot;PSF &amp;quot;, &amp;quot;DEV &amp;quot; and &amp;quot;EXP &amp;quot; since the column data type is a 4-character string',&lt;br /&gt;
    ra double COMMENT 'Right ascension at equinox J2000',&lt;br /&gt;
    dec double COMMENT 'Declination at equinox J2000',&lt;br /&gt;
    ra_ivar float COMMENT 'Inverse variance of RA (no cosine term!), excluding astrometric calibration errors',&lt;br /&gt;
    dec_ivar float COMMENT 'Inverse variance of DEC, excluding astrometric calibration errors',&lt;br /&gt;
    bx float COMMENT 'X position (0-indexed) of coordinates in brick image stack',&lt;br /&gt;
    `by` float COMMENT 'Y position (0-indexed) of coordinates in brick image stack',&lt;br /&gt;
    dchisq array&amp;lt;float&amp;gt; COMMENT 'Difference in χ² between successively more-complex model fits: PSF, REX, DEV, EXP, COMP. The difference is versus no source.',&lt;br /&gt;
    ebv float COMMENT 'Galactic extinction E(B-V) reddening from SFD98, used to compute the mw_transmission_ columns',&lt;br /&gt;
    mjd_min double COMMENT 'Minimum Modified Julian Date of observations used to construct the model of this object',&lt;br /&gt;
    mjd_max double COMMENT 'Maximum Modified Julian Date of observations used to construct the model of this object',&lt;br /&gt;
    ref_cat string COMMENT 'Reference catalog source for this star: &amp;quot;T2&amp;quot; for Tycho-2, &amp;quot;G2&amp;quot; for Gaia DR2, &amp;quot;L2&amp;quot; for the LSLGA, empty otherwise',&lt;br /&gt;
    ref_id bigint COMMENT 'Reference catalog identifier for this star\u003b Tyc1*1,000,000+Tyc2*10+Tyc3 for Tycho2\u003b &amp;quot;sourceid&amp;quot; for Gaia-DR2 and LSLGA',&lt;br /&gt;
    pmra float COMMENT 'Reference catalog proper motion in the RA direction',&lt;br /&gt;
    pmdec float COMMENT 'Reference catalog proper motion in the Dec direction',&lt;br /&gt;
    parallax float COMMENT 'Reference catalog parallax',&lt;br /&gt;
    pmra_ivar float COMMENT 'Reference catalog inverse-variance on pmra',&lt;br /&gt;
    pmdec_ivar float COMMENT 'Reference catalog inverse-variance on pmdec',&lt;br /&gt;
    parallax_ivar float COMMENT 'Reference catalog inverse-variance on parallax',&lt;br /&gt;
    ref_epoch float COMMENT 'Reference catalog reference epoch (eg, 2015.5 for Gaia DR2)',&lt;br /&gt;
    gaia_pointsource boolean COMMENT 'This Gaia DR2 source is believed to be a star, not a galaxy',&lt;br /&gt;
    gaia_phot_g_mean_mag float COMMENT 'Gaia G band mag',&lt;br /&gt;
    gaia_phot_g_mean_flux_over_error float COMMENT 'Gaia G band signal-to-noise',&lt;br /&gt;
    gaia_phot_g_n_obs smallint COMMENT 'Gaia G band number of observations',&lt;br /&gt;
    gaia_phot_bp_mean_mag float COMMENT 'Gaia BP mag',&lt;br /&gt;
    gaia_phot_bp_mean_flux_over_error float COMMENT 'Gaia BP signal-to-noise',&lt;br /&gt;
    gaia_phot_bp_n_obs smallint COMMENT 'Gaia BP number of observations',&lt;br /&gt;
    gaia_phot_rp_mean_mag float COMMENT 'Gaia RP mag',&lt;br /&gt;
    gaia_phot_rp_mean_flux_over_error float COMMENT 'Gaia RP signal-to-noise',&lt;br /&gt;
    gaia_phot_rp_n_obs smallint COMMENT 'Gaia RP number of observations',&lt;br /&gt;
    gaia_phot_variable_flag boolean COMMENT 'Gaia photometric variable flag',&lt;br /&gt;
    gaia_astrometric_excess_noise float COMMENT 'Gaia astrometric excess noise',&lt;br /&gt;
    gaia_astrometric_excess_noise_sig float COMMENT 'Gaia astrometric excess noise uncertainty',&lt;br /&gt;
    gaia_astrometric_n_obs_al smallint COMMENT 'Gaia number of astrometric observations along scan direction',&lt;br /&gt;
    gaia_astrometric_n_good_obs_al smallint COMMENT 'Gaia number of good astrometric observations along scan direction',&lt;br /&gt;
    gaia_astrometric_weight_al float COMMENT 'Gaia astrometric weight along scan direction',&lt;br /&gt;
    gaia_duplicated_source boolean COMMENT 'Gaia duplicated source flag',&lt;br /&gt;
    gaia_a_g_val float COMMENT 'Gaia line-of-sight extinction in the G band',&lt;br /&gt;
    gaia_e_bp_min_rp_val float COMMENT 'Gaia line-of-sight reddening E(BP-RP)',&lt;br /&gt;
    gaia_phot_bp_rp_excess_factor float COMMENT 'Gaia BP/RP excess factor',&lt;br /&gt;
    gaia_astrometric_sigma5d_max float COMMENT 'Gaia longest semi-major axis of the 5-d error ellipsoid',&lt;br /&gt;
    gaia_astrometric_params_solved tinyint COMMENT 'which astrometric parameters were estimated for a Gaia source',&lt;br /&gt;
    flux_g float COMMENT 'model flux in gg',&lt;br /&gt;
    flux_r float COMMENT 'model flux in rr',&lt;br /&gt;
    flux_z float COMMENT 'model flux in zz',&lt;br /&gt;
    flux_w1 float COMMENT 'WISE model flux in W1W1 (AB system)',&lt;br /&gt;
    flux_w2 float COMMENT 'WISE model flux in W2W2 (AB)',&lt;br /&gt;
    flux_w3 float COMMENT 'WISE model flux in W3W3 (AB)',&lt;br /&gt;
    flux_w4 float COMMENT 'WISE model flux in W4W4 (AB)',&lt;br /&gt;
    flux_ivar_g float COMMENT 'Inverse variance of flux_g',&lt;br /&gt;
    flux_ivar_r float COMMENT 'Inverse variance of flux_r',&lt;br /&gt;
    flux_ivar_z float COMMENT 'Inverse variance of flux_z',&lt;br /&gt;
    flux_ivar_w1 float COMMENT 'Inverse variance of flux_w1 (AB system)',&lt;br /&gt;
    flux_ivar_w2 float COMMENT 'Inverse variance of flux_w2 (AB)',&lt;br /&gt;
    flux_ivar_w3 float COMMENT 'Inverse variance of flux_w3 (AB)',&lt;br /&gt;
    flux_ivar_w4 float COMMENT 'Inverse variance of flux_w4 (AB)',&lt;br /&gt;
    fiberflux_g float COMMENT 'Predicted gg-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fiberflux_r float COMMENT 'Predicted rr-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fiberflux_z float COMMENT 'Predicted zz-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_g float COMMENT 'Predicted gg-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_r float COMMENT 'Predicted rr-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_z float COMMENT 'Predicted zz-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    apflux_g array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in gg',&lt;br /&gt;
    apflux_r array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in rr',&lt;br /&gt;
    apflux_z array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in zz',&lt;br /&gt;
    apflux_resid_g array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in gg',&lt;br /&gt;
    apflux_resid_r array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in rr',&lt;br /&gt;
    apflux_resid_z array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in zz',&lt;br /&gt;
    apflux_ivar_g array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_g',&lt;br /&gt;
    apflux_ivar_r array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_r',&lt;br /&gt;
    apflux_ivar_z array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_z',&lt;br /&gt;
    mw_transmission_g float COMMENT 'Galactic transmission in gg filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_r float COMMENT 'Galactic transmission in rr filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_z float COMMENT 'Galactic transmission in zz filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w1 float COMMENT 'Galactic transmission in W1W1 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w2 float COMMENT 'Galactic transmission in W2W2 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w3 float COMMENT 'Galactic transmission in W3W3 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w4 float COMMENT 'Galactic transmission in W4W4 filter in linear units [0, 1]',&lt;br /&gt;
    nobs_g smallint COMMENT 'Number of images that contribute to the central pixel in gg: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_r smallint COMMENT 'Number of images that contribute to the central pixel in rr: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_z smallint COMMENT 'Number of images that contribute to the central pixel in zz: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w1 smallint COMMENT 'Number of images that contribute to the central pixel in W1W1: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w2 smallint COMMENT 'Number of images that contribute to the central pixel in W2W2: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w3 smallint COMMENT 'Number of images that contribute to the central pixel in W3W3: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w4 smallint COMMENT 'Number of images that contribute to the central pixel in W4W4: filter for this object (not profile-weighted)',&lt;br /&gt;
    rchisq_g float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in gg',&lt;br /&gt;
    rchisq_r float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in rr',&lt;br /&gt;
    rchisq_z float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in zz',&lt;br /&gt;
    rchisq_w1 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W1W1',&lt;br /&gt;
    rchisq_w2 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W2W2',&lt;br /&gt;
    rchisq_w3 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W3W3',&lt;br /&gt;
    rchisq_w4 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W4W4',&lt;br /&gt;
    fracflux_g float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in gg (typically [0,1])',&lt;br /&gt;
    fracflux_r float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in rr (typically [0,1])',&lt;br /&gt;
    fracflux_z float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in zz (typically [0,1])',&lt;br /&gt;
    fracflux_w1 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W1W1 (typically [0,1])',&lt;br /&gt;
    fracflux_w2 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W2W2 (typically [0,1])',&lt;br /&gt;
    fracflux_w3 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W3W3 (typically [0,1])',&lt;br /&gt;
    fracflux_w4 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W4W4 (typically [0,1])',&lt;br /&gt;
    fracmasked_g float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in gg, strictly between [0,1]',&lt;br /&gt;
    fracmasked_r float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in rr, strictly between [0,1]',&lt;br /&gt;
    fracmasked_z float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in zz, strictly between [0,1]',&lt;br /&gt;
    fracin_g float COMMENT 'Fraction of a source\'s flux within the blob in gg, near unity for real sources',&lt;br /&gt;
    fracin_r float COMMENT 'Fraction of a source\'s flux within the blob in rr, near unity for real sources',&lt;br /&gt;
    fracin_z float COMMENT 'Fraction of a source\'s flux within the blob in zz, near unity for real sources',&lt;br /&gt;
    anymask_g smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in gg as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    anymask_r smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in rr as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    anymask_z smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in zz as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_g smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in gg as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_r smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in rr as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_z smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in zz as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    wisemask_w1 tinyint COMMENT 'W1 bitmask as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    wisemask_w2 tinyint COMMENT 'W2 bitmask as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    psfsize_g float COMMENT 'Weighted average PSF FWHM in the gg band',&lt;br /&gt;
    psfsize_r float COMMENT 'Weighted average PSF FWHM in the rr band',&lt;br /&gt;
    psfsize_z float COMMENT 'Weighted average PSF FWHM in the zz band',&lt;br /&gt;
    psfdepth_g float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_g)5/(psfdepth_g) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_g))−9]−2.5[log10⁡(5/(psfdepth_g))−9] gives corresponding AB magnitude',&lt;br /&gt;
    psfdepth_r float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_r)5/(psfdepth_r) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_r))−9]−2.5[log10⁡(5/(psfdepth_r))−9] gives corresponding AB magnitude',&lt;br /&gt;
    psfdepth_z float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_z)5/(psfdepth_z) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_z))−9]−2.5[log10⁡(5/(psfdepth_z))−9] gives corresponding AB magnitude',&lt;br /&gt;
    galdepth_g float COMMENT 'As for psfdepth_g but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    galdepth_r float COMMENT 'As for psfdepth_r but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    galdepth_z float COMMENT 'As for psfdepth_z but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    psfdepth_w1 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W1',&lt;br /&gt;
    psfdepth_w2 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W2',&lt;br /&gt;
    psfdepth_w3 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W3',&lt;br /&gt;
    psfdepth_w4 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W4',&lt;br /&gt;
    wise_coadd_id string COMMENT 'unWISE coadd file name for the center of each object',&lt;br /&gt;
    lc_flux_w1 array&amp;lt;float&amp;gt; COMMENT 'flux_w1 in each of up to eleven unWISE coadd epochs (AB system)',&lt;br /&gt;
    lc_flux_w2 array&amp;lt;float&amp;gt; COMMENT 'flux_w2 in each of up to eleven unWISE coadd epochs (AB)',&lt;br /&gt;
    lc_flux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of lc_flux_w1 (AB system)',&lt;br /&gt;
    lc_flux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of lc_flux_w2 (AB)',&lt;br /&gt;
    lc_nobs_w1 array&amp;lt;smallint&amp;gt; COMMENT 'nobs_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_nobs_w2 array&amp;lt;smallint&amp;gt; COMMENT 'nobs_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_fracflux_w1 array&amp;lt;float&amp;gt; COMMENT 'fracflux_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_fracflux_w2 array&amp;lt;float&amp;gt; COMMENT 'fracflux_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_rchisq_w1 array&amp;lt;float&amp;gt; COMMENT 'rchisq_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_rchisq_w2 array&amp;lt;float&amp;gt; COMMENT 'rchisq_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_mjd_w1 array&amp;lt;double&amp;gt; COMMENT 'mjd_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_mjd_w2 array&amp;lt;double&amp;gt; COMMENT 'mjd_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    fracdev float COMMENT 'Fraction of model in deVauc [0,1]',&lt;br /&gt;
    fracdev_ivar float COMMENT 'Inverse variance of fracdev',&lt;br /&gt;
    shapeexp_r float COMMENT 'Half-light radius of exponential model (&amp;gt;0)',&lt;br /&gt;
    shapeexp_r_ivar float COMMENT 'Inverse variance of shapeexp_r',&lt;br /&gt;
    shapeexp_e1 float COMMENT 'Ellipticity component 1',&lt;br /&gt;
    shapeexp_e1_ivar float COMMENT 'Inverse variance of shapeexp_e1',&lt;br /&gt;
    shapeexp_e2 float COMMENT 'Ellipticity component 2',&lt;br /&gt;
    shapeexp_e2_ivar float COMMENT 'Inverse variance of shapeexp_e2',&lt;br /&gt;
    shapedev_r float COMMENT 'Half-light radius of deVaucouleurs model (&amp;gt;0)',&lt;br /&gt;
    shapedev_r_ivar float COMMENT 'Inverse variance of shapedev_r',&lt;br /&gt;
    shapedev_e1 float COMMENT 'Ellipticity component 1',&lt;br /&gt;
    shapedev_e1_ivar float COMMENT 'Inverse variance of shapedev_e1',&lt;br /&gt;
    shapedev_e2 float COMMENT 'Ellipticity component 2',&lt;br /&gt;
    shapedev_e2_ivar float COMMENT 'Inverse variance of shapedev_e2',&lt;br /&gt;
    z_phot_mean FLOAT COMMENT 'photo-z derived from the mean of the photo-z PDF ',&lt;br /&gt;
    z_phot_median FLOAT COMMENT 'photo-z derived from the median of the photo-z PDF',&lt;br /&gt;
    z_phot_std FLOAT COMMENT 'standard deviation of the photo-z\'s derived from the photo-z PDF',&lt;br /&gt;
    z_phot_l68 FLOAT COMMENT 'lower bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_u68 FLOAT COMMENT 'upper bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_l95 FLOAT COMMENT 'lower bound of the 95% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_u95 FLOAT COMMENT 'upper bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_spec FLOAT COMMENT 'spectroscopic redshift, if available',&lt;br /&gt;
    survey STRING COMMENT 'source of the spectroscopic redshift',&lt;br /&gt;
    training BOOLEAN COMMENT 'whether or not the spectroscopic redshift is used in photometric redshift training'&lt;br /&gt;
 )&lt;br /&gt;
 CLUSTERED BY (&lt;br /&gt;
    release,&lt;br /&gt;
    brickid,&lt;br /&gt;
    objid)&lt;br /&gt;
 SORTED BY (&lt;br /&gt;
    release ASC,&lt;br /&gt;
    brickid ASC,&lt;br /&gt;
    objid ASC)&lt;br /&gt;
 INTO 4096 BUCKETS&lt;br /&gt;
 STORED AS ORC&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Join insert ===&lt;br /&gt;
&lt;br /&gt;
 INSERT OVERWRITE TABLE cosmohub.legacy_survey_dr8_phz&lt;br /&gt;
 SELECT&lt;br /&gt;
   dr8.*,&lt;br /&gt;
   phz.z_phot_mean,&lt;br /&gt;
   phz.z_phot_median,&lt;br /&gt;
   phz.z_phot_std,&lt;br /&gt;
   phz.z_phot_l68,&lt;br /&gt;
   phz.z_phot_u68,&lt;br /&gt;
   phz.z_phot_l95,&lt;br /&gt;
   phz.z_phot_u95,&lt;br /&gt;
   phz.z_spec,&lt;br /&gt;
   phz.survey,&lt;br /&gt;
   phz.training&lt;br /&gt;
 FROM cosmohub.legacy_survey_dr8 AS dr8&lt;br /&gt;
 LEFT JOIN tallada.dr8_sweep AS phz&lt;br /&gt;
   ON dr8.release = phz.release&lt;br /&gt;
     AND dr8.brickid = phz.brickid&lt;br /&gt;
     AND dr8.objid = phz.objid&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
== Queries for checking ==&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(release) AS c&lt;br /&gt;
   FROM cosmohub.legacy_survey_dr8&lt;br /&gt;
   GROUP BY release, brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(brickid) AS c&lt;br /&gt;
   FROM cosmohub.legacy_survey_dr8&lt;br /&gt;
   GROUP BY brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(release) AS c&lt;br /&gt;
   FROM tallada.dr8_sweep&lt;br /&gt;
   GROUP BY release, brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(brickid) AS c&lt;br /&gt;
   FROM tallada.dr8_sweep&lt;br /&gt;
   GROUP BY brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT release, brickid, objid, COUNT(release)&lt;br /&gt;
 FROM tallada.dr8_sweep&lt;br /&gt;
 GROUP BY release, brickid, objid&lt;br /&gt;
 HAVING COUNT(release) &amp;gt; 1&lt;br /&gt;
&lt;br /&gt;
 DR8 release brickid objid: DISTINCT(1.694.230.368) TOTAL(1.694.230.368)&lt;br /&gt;
 DR8 brickid objid:         DISTINCT(1.654.429.115) TOTAL(1.694.230.368)&lt;br /&gt;
 &lt;br /&gt;
 PHZ release brickid objid: DISTINCT(1.646.664.729) TOTAL(1.646.664.897)&lt;br /&gt;
 PHZ brickid objid:         DISTINCT(1.608.841.582) TOTAL(1.646.664.897)&lt;br /&gt;
 &lt;br /&gt;
 DR8: 							 1.694.230.368&lt;br /&gt;
 PHZ: 							 1.646.664.897&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
       			  				   -47.565.471‬&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=Legacy_Survey_DR9&amp;diff=875</id>
		<title>Legacy Survey DR9</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=Legacy_Survey_DR9&amp;diff=875"/>
		<updated>2020-11-27T00:24:29Z</updated>

		<summary type="html">&lt;p&gt;Tallada: /* Internal Table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Original DR9 ==&lt;br /&gt;
=== Raw data ===&lt;br /&gt;
&lt;br /&gt;
Downloaded from NERSC&lt;br /&gt;
 /global/cfs/cdirs/cosmo/work/legacysurvey/dr9m&lt;br /&gt;
&lt;br /&gt;
Directories:&lt;br /&gt;
 south/tractor&lt;br /&gt;
 north/tractor&lt;br /&gt;
&lt;br /&gt;
Downloaded using bbcp from services01.euclid into CephFS scratch:&lt;br /&gt;
 bbcp -s 16 -a -A -v -z -r -S &amp;quot;ssh -x -a -oFallBackToRsh=no %I -l %U %H /usr/common/usg/bin/bbcp&amp;quot; \&lt;br /&gt;
 &amp;quot;jcarrete@dtn01.nersc.gov:/global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/north/tractor&amp;quot; \&lt;br /&gt;
 /cephfs/pic.es/astro/scratch/tallada/dr9m/north/tractor&lt;br /&gt;
 bbcp -s 16 -a -A -v -z -r -S &amp;quot;ssh -x -a -oFallBackToRsh=no %I -l %U %H /usr/common/usg/bin/bbcp&amp;quot; \&lt;br /&gt;
 &amp;quot;jcarrete@dtn01.nersc.gov:/global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/south/tractor&amp;quot; \&lt;br /&gt;
 /cephfs/pic.es/astro/scratch/tallada/dr9m/south/tractor&lt;br /&gt;
&lt;br /&gt;
Checksums provided through sha256sum files, and checked using command:&lt;br /&gt;
 find * -type d | xargs -t -L1 -P24 sh -c 'cd $1; sha256sum --quiet -c *.sha256sum' cksum&lt;br /&gt;
&lt;br /&gt;
=== Parquet ===&lt;br /&gt;
&lt;br /&gt;
The following code snippet was used in spark to convert fits files to parquet:&lt;br /&gt;
&lt;br /&gt;
 path_base = '/cephfs/pic.es/astro/scratch/tallada/dr9m'&lt;br /&gt;
 hdfs_base = '/user/tallada/data/legacysurvey_dr9'&lt;br /&gt;
 &lt;br /&gt;
 hs = ['h=north', 'h=south']&lt;br /&gt;
 rs = ['r={0:03d}'.format(x) for x in range(360)]&lt;br /&gt;
 &lt;br /&gt;
 for h in hs:&lt;br /&gt;
     for r in rs:&lt;br /&gt;
         p = os.path.join(path_base, h, r)&lt;br /&gt;
         if not os.path.exists(p):&lt;br /&gt;
             continue&lt;br /&gt;
         &lt;br /&gt;
         size = sum(os.path.getsize(os.path.join(p,f)) for f in os.listdir(p) if os.path.isfile(os.path.join(p,f)))&lt;br /&gt;
        &lt;br /&gt;
         print h, r, size        &lt;br /&gt;
         &lt;br /&gt;
         df = spark.read.format(&amp;quot;fits&amp;quot;).option(&amp;quot;hdu&amp;quot;, 1).load(&lt;br /&gt;
             &amp;quot;file://&amp;quot; + p&lt;br /&gt;
         )&lt;br /&gt;
         &lt;br /&gt;
         df = df.repartition(int(math.ceil(size / (256*1024*1024.0))))&lt;br /&gt;
                 &lt;br /&gt;
         df.write.parquet(os.path.join(hdfs_base, h, r))&lt;br /&gt;
&lt;br /&gt;
=== External table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE `tallada`.`legacysurvey_dr9`(&lt;br /&gt;
  `release` smallint, &lt;br /&gt;
  `brickid` int, &lt;br /&gt;
  `brickname` string, &lt;br /&gt;
  `objid` int, &lt;br /&gt;
  `brick_primary` boolean, &lt;br /&gt;
  `maskbits` smallint, &lt;br /&gt;
  `fitbits` smallint, &lt;br /&gt;
  `type` string, &lt;br /&gt;
  `ra` double, &lt;br /&gt;
  `dec` double, &lt;br /&gt;
  `ra_ivar` float, &lt;br /&gt;
  `dec_ivar` float, &lt;br /&gt;
  `bx` float, &lt;br /&gt;
  `by` float, &lt;br /&gt;
  `dchisq` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `ebv` float, &lt;br /&gt;
  `mjd_min` double, &lt;br /&gt;
  `mjd_max` double, &lt;br /&gt;
  `ref_cat` string, &lt;br /&gt;
  `ref_id` bigint, &lt;br /&gt;
  `pmra` float, &lt;br /&gt;
  `pmdec` float, &lt;br /&gt;
  `parallax` float, &lt;br /&gt;
  `pmra_ivar` float, &lt;br /&gt;
  `pmdec_ivar` float, &lt;br /&gt;
  `parallax_ivar` float, &lt;br /&gt;
  `ref_epoch` float, &lt;br /&gt;
  `gaia_phot_g_mean_mag` float, &lt;br /&gt;
  `gaia_phot_g_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_g_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_bp_mean_mag` float, &lt;br /&gt;
  `gaia_phot_bp_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_bp_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_rp_mean_mag` float, &lt;br /&gt;
  `gaia_phot_rp_mean_flux_over_error` float, &lt;br /&gt;
  `gaia_phot_rp_n_obs` smallint, &lt;br /&gt;
  `gaia_phot_variable_flag` boolean, &lt;br /&gt;
  `gaia_astrometric_excess_noise` float, &lt;br /&gt;
  `gaia_astrometric_excess_noise_sig` float, &lt;br /&gt;
  `gaia_astrometric_n_obs_al` smallint, &lt;br /&gt;
  `gaia_astrometric_n_good_obs_al` smallint, &lt;br /&gt;
  `gaia_astrometric_weight_al` float, &lt;br /&gt;
  `gaia_duplicated_source` boolean, &lt;br /&gt;
  `gaia_a_g_val` float, &lt;br /&gt;
  `gaia_e_bp_min_rp_val` float, &lt;br /&gt;
  `gaia_phot_bp_rp_excess_factor` float, &lt;br /&gt;
  `gaia_astrometric_sigma5d_max` float, &lt;br /&gt;
  `gaia_astrometric_params_solved` tinyint, &lt;br /&gt;
  `flux_g` float, &lt;br /&gt;
  `flux_r` float, &lt;br /&gt;
  `flux_z` float, &lt;br /&gt;
  `flux_w1` float, &lt;br /&gt;
  `flux_w2` float, &lt;br /&gt;
  `flux_w3` float, &lt;br /&gt;
  `flux_w4` float, &lt;br /&gt;
  `flux_ivar_g` float, &lt;br /&gt;
  `flux_ivar_r` float, &lt;br /&gt;
  `flux_ivar_z` float, &lt;br /&gt;
  `flux_ivar_w1` float, &lt;br /&gt;
  `flux_ivar_w2` float, &lt;br /&gt;
  `flux_ivar_w3` float, &lt;br /&gt;
  `flux_ivar_w4` float, &lt;br /&gt;
  `fiberflux_g` float, &lt;br /&gt;
  `fiberflux_r` float, &lt;br /&gt;
  `fiberflux_z` float, &lt;br /&gt;
  `fibertotflux_g` float, &lt;br /&gt;
  `fibertotflux_r` float, &lt;br /&gt;
  `fibertotflux_z` float, &lt;br /&gt;
  `apflux_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_blobresid_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_g` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_r` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_masked_z` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_resid_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w3` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `apflux_ivar_w4` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `mw_transmission_g` float, &lt;br /&gt;
  `mw_transmission_r` float, &lt;br /&gt;
  `mw_transmission_z` float, &lt;br /&gt;
  `mw_transmission_w1` float, &lt;br /&gt;
  `mw_transmission_w2` float, &lt;br /&gt;
  `mw_transmission_w3` float, &lt;br /&gt;
  `mw_transmission_w4` float, &lt;br /&gt;
  `nobs_g` smallint, &lt;br /&gt;
  `nobs_r` smallint, &lt;br /&gt;
  `nobs_z` smallint, &lt;br /&gt;
  `nobs_w1` smallint, &lt;br /&gt;
  `nobs_w2` smallint, &lt;br /&gt;
  `nobs_w3` smallint, &lt;br /&gt;
  `nobs_w4` smallint, &lt;br /&gt;
  `rchisq_g` float, &lt;br /&gt;
  `rchisq_r` float, &lt;br /&gt;
  `rchisq_z` float, &lt;br /&gt;
  `rchisq_w1` float, &lt;br /&gt;
  `rchisq_w2` float, &lt;br /&gt;
  `rchisq_w3` float, &lt;br /&gt;
  `rchisq_w4` float, &lt;br /&gt;
  `fracflux_g` float, &lt;br /&gt;
  `fracflux_r` float, &lt;br /&gt;
  `fracflux_z` float, &lt;br /&gt;
  `fracflux_w1` float, &lt;br /&gt;
  `fracflux_w2` float, &lt;br /&gt;
  `fracflux_w3` float, &lt;br /&gt;
  `fracflux_w4` float, &lt;br /&gt;
  `fracmasked_g` float, &lt;br /&gt;
  `fracmasked_r` float, &lt;br /&gt;
  `fracmasked_z` float, &lt;br /&gt;
  `fracin_g` float, &lt;br /&gt;
  `fracin_r` float, &lt;br /&gt;
  `fracin_z` float, &lt;br /&gt;
  `anymask_g` smallint, &lt;br /&gt;
  `anymask_r` smallint, &lt;br /&gt;
  `anymask_z` smallint, &lt;br /&gt;
  `allmask_g` smallint, &lt;br /&gt;
  `allmask_r` smallint, &lt;br /&gt;
  `allmask_z` smallint, &lt;br /&gt;
  `wisemask_w1` tinyint, &lt;br /&gt;
  `wisemask_w2` tinyint, &lt;br /&gt;
  `psfsize_g` float, &lt;br /&gt;
  `psfsize_r` float, &lt;br /&gt;
  `psfsize_z` float, &lt;br /&gt;
  `psfdepth_g` float, &lt;br /&gt;
  `psfdepth_r` float, &lt;br /&gt;
  `psfdepth_z` float, &lt;br /&gt;
  `galdepth_g` float, &lt;br /&gt;
  `galdepth_r` float, &lt;br /&gt;
  `galdepth_z` float, &lt;br /&gt;
  `nea_g` float, &lt;br /&gt;
  `nea_r` float, &lt;br /&gt;
  `nea_z` float, &lt;br /&gt;
  `blob_nea_g` float, &lt;br /&gt;
  `blob_nea_r` float, &lt;br /&gt;
  `blob_nea_z` float, &lt;br /&gt;
  `psfdepth_w1` float, &lt;br /&gt;
  `psfdepth_w2` float, &lt;br /&gt;
  `psfdepth_w3` float, &lt;br /&gt;
  `psfdepth_w4` float, &lt;br /&gt;
  `wise_coadd_id` string, &lt;br /&gt;
  `wise_x` float, &lt;br /&gt;
  `wise_y` float, &lt;br /&gt;
  `lc_flux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_ivar_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_flux_ivar_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_nobs_w1` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_nobs_w2` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_fracflux_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_fracflux_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_rchisq_w1` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_rchisq_w2` array&amp;lt;float&amp;gt;, &lt;br /&gt;
  `lc_mjd_w1` array&amp;lt;double&amp;gt;, &lt;br /&gt;
  `lc_mjd_w2` array&amp;lt;double&amp;gt;, &lt;br /&gt;
  `lc_epoch_index_w1` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `lc_epoch_index_w2` array&amp;lt;smallint&amp;gt;, &lt;br /&gt;
  `sersic` float, &lt;br /&gt;
  `sersic_ivar` float, &lt;br /&gt;
  `shape_r` float, &lt;br /&gt;
  `shape_r_ivar` float, &lt;br /&gt;
  `shape_e1` float, &lt;br /&gt;
  `shape_e1_ivar` float, &lt;br /&gt;
  `shape_e2` float, &lt;br /&gt;
  `shape_e2_ivar` float)&lt;br /&gt;
 PARTITIONED BY (&lt;br /&gt;
   h STRING,&lt;br /&gt;
   r STRING&lt;br /&gt;
 )&lt;br /&gt;
 STORED AS PARQUET&lt;br /&gt;
 LOCATION '/user/tallada/data/legacysurvey_dr9'&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Internal Table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE `cosmohub`.`legacysurvey_dr9`(&lt;br /&gt;
  `release` smallint,&lt;br /&gt;
  `brickid` int,&lt;br /&gt;
  `brickname` string,&lt;br /&gt;
  `objid` int,&lt;br /&gt;
  `brick_primary` boolean,&lt;br /&gt;
  `maskbits` smallint,&lt;br /&gt;
  `fitbits` smallint,&lt;br /&gt;
  `type` string,&lt;br /&gt;
  `ra` double,&lt;br /&gt;
  `dec` double,&lt;br /&gt;
  `ra_ivar` float,&lt;br /&gt;
  `dec_ivar` float,&lt;br /&gt;
  `bx` float,&lt;br /&gt;
  `by` float,&lt;br /&gt;
  `dchisq` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `ebv` float,&lt;br /&gt;
  `mjd_min` double,&lt;br /&gt;
  `mjd_max` double,&lt;br /&gt;
  `ref_cat` string,&lt;br /&gt;
  `ref_id` bigint,&lt;br /&gt;
  `pmra` float,&lt;br /&gt;
  `pmdec` float,&lt;br /&gt;
  `parallax` float,&lt;br /&gt;
  `pmra_ivar` float,&lt;br /&gt;
  `pmdec_ivar` float,&lt;br /&gt;
  `parallax_ivar` float,&lt;br /&gt;
  `ref_epoch` float,&lt;br /&gt;
  `gaia_phot_g_mean_mag` float,&lt;br /&gt;
  `gaia_phot_g_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_g_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_bp_mean_mag` float,&lt;br /&gt;
  `gaia_phot_bp_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_bp_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_rp_mean_mag` float,&lt;br /&gt;
  `gaia_phot_rp_mean_flux_over_error` float,&lt;br /&gt;
  `gaia_phot_rp_n_obs` smallint,&lt;br /&gt;
  `gaia_phot_variable_flag` boolean,&lt;br /&gt;
  `gaia_astrometric_excess_noise` float,&lt;br /&gt;
  `gaia_astrometric_excess_noise_sig` float,&lt;br /&gt;
  `gaia_astrometric_n_obs_al` smallint,&lt;br /&gt;
  `gaia_astrometric_n_good_obs_al` smallint,&lt;br /&gt;
  `gaia_astrometric_weight_al` float,&lt;br /&gt;
  `gaia_duplicated_source` boolean,&lt;br /&gt;
  `gaia_a_g_val` float,&lt;br /&gt;
  `gaia_e_bp_min_rp_val` float,&lt;br /&gt;
  `gaia_phot_bp_rp_excess_factor` float,&lt;br /&gt;
  `gaia_astrometric_sigma5d_max` float,&lt;br /&gt;
  `gaia_astrometric_params_solved` tinyint,&lt;br /&gt;
  `flux_g` float,&lt;br /&gt;
  `flux_r` float,&lt;br /&gt;
  `flux_z` float,&lt;br /&gt;
  `flux_w1` float,&lt;br /&gt;
  `flux_w2` float,&lt;br /&gt;
  `flux_w3` float,&lt;br /&gt;
  `flux_w4` float,&lt;br /&gt;
  `flux_ivar_g` float,&lt;br /&gt;
  `flux_ivar_r` float,&lt;br /&gt;
  `flux_ivar_z` float,&lt;br /&gt;
  `flux_ivar_w1` float,&lt;br /&gt;
  `flux_ivar_w2` float,&lt;br /&gt;
  `flux_ivar_w3` float,&lt;br /&gt;
  `flux_ivar_w4` float,&lt;br /&gt;
  `fiberflux_g` float,&lt;br /&gt;
  `fiberflux_r` float,&lt;br /&gt;
  `fiberflux_z` float,&lt;br /&gt;
  `fibertotflux_g` float,&lt;br /&gt;
  `fibertotflux_r` float,&lt;br /&gt;
  `fibertotflux_z` float,&lt;br /&gt;
  `apflux_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_blobresid_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_g` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_r` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_masked_z` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_resid_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w3` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `apflux_ivar_w4` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `mw_transmission_g` float,&lt;br /&gt;
  `mw_transmission_r` float,&lt;br /&gt;
  `mw_transmission_z` float,&lt;br /&gt;
  `mw_transmission_w1` float,&lt;br /&gt;
  `mw_transmission_w2` float,&lt;br /&gt;
  `mw_transmission_w3` float,&lt;br /&gt;
  `mw_transmission_w4` float,&lt;br /&gt;
  `nobs_g` smallint,&lt;br /&gt;
  `nobs_r` smallint,&lt;br /&gt;
  `nobs_z` smallint,&lt;br /&gt;
  `nobs_w1` smallint,&lt;br /&gt;
  `nobs_w2` smallint,&lt;br /&gt;
  `nobs_w3` smallint,&lt;br /&gt;
  `nobs_w4` smallint,&lt;br /&gt;
  `rchisq_g` float,&lt;br /&gt;
  `rchisq_r` float,&lt;br /&gt;
  `rchisq_z` float,&lt;br /&gt;
  `rchisq_w1` float,&lt;br /&gt;
  `rchisq_w2` float,&lt;br /&gt;
  `rchisq_w3` float,&lt;br /&gt;
  `rchisq_w4` float,&lt;br /&gt;
  `fracflux_g` float,&lt;br /&gt;
  `fracflux_r` float,&lt;br /&gt;
  `fracflux_z` float,&lt;br /&gt;
  `fracflux_w1` float,&lt;br /&gt;
  `fracflux_w2` float,&lt;br /&gt;
  `fracflux_w3` float,&lt;br /&gt;
  `fracflux_w4` float,&lt;br /&gt;
  `fracmasked_g` float,&lt;br /&gt;
  `fracmasked_r` float,&lt;br /&gt;
  `fracmasked_z` float,&lt;br /&gt;
  `fracin_g` float,&lt;br /&gt;
  `fracin_r` float,&lt;br /&gt;
  `fracin_z` float,&lt;br /&gt;
  `anymask_g` smallint,&lt;br /&gt;
  `anymask_r` smallint,&lt;br /&gt;
  `anymask_z` smallint,&lt;br /&gt;
  `allmask_g` smallint,&lt;br /&gt;
  `allmask_r` smallint,&lt;br /&gt;
  `allmask_z` smallint,&lt;br /&gt;
  `wisemask_w1` tinyint,&lt;br /&gt;
  `wisemask_w2` tinyint,&lt;br /&gt;
  `psfsize_g` float,&lt;br /&gt;
  `psfsize_r` float,&lt;br /&gt;
  `psfsize_z` float,&lt;br /&gt;
  `psfdepth_g` float,&lt;br /&gt;
  `psfdepth_r` float,&lt;br /&gt;
  `psfdepth_z` float,&lt;br /&gt;
  `galdepth_g` float,&lt;br /&gt;
  `galdepth_r` float,&lt;br /&gt;
  `galdepth_z` float,&lt;br /&gt;
  `nea_g` float,&lt;br /&gt;
  `nea_r` float,&lt;br /&gt;
  `nea_z` float,&lt;br /&gt;
  `blob_nea_g` float,&lt;br /&gt;
  `blob_nea_r` float,&lt;br /&gt;
  `blob_nea_z` float,&lt;br /&gt;
  `psfdepth_w1` float,&lt;br /&gt;
  `psfdepth_w2` float,&lt;br /&gt;
  `psfdepth_w3` float,&lt;br /&gt;
  `psfdepth_w4` float,&lt;br /&gt;
  `wise_coadd_id` string,&lt;br /&gt;
  `wise_x` float,&lt;br /&gt;
  `wise_y` float,&lt;br /&gt;
  `lc_flux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_ivar_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_flux_ivar_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_nobs_w1` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_nobs_w2` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_fracflux_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_fracflux_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_rchisq_w1` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_rchisq_w2` array&amp;lt;float&amp;gt;,&lt;br /&gt;
  `lc_mjd_w1` array&amp;lt;double&amp;gt;,&lt;br /&gt;
  `lc_mjd_w2` array&amp;lt;double&amp;gt;,&lt;br /&gt;
  `lc_epoch_index_w1` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `lc_epoch_index_w2` array&amp;lt;smallint&amp;gt;,&lt;br /&gt;
  `sersic` float,&lt;br /&gt;
  `sersic_ivar` float,&lt;br /&gt;
  `shape_r` float,&lt;br /&gt;
  `shape_r_ivar` float,&lt;br /&gt;
  `shape_e1` float,&lt;br /&gt;
  `shape_e1_ivar` float,&lt;br /&gt;
  `shape_e2` float,&lt;br /&gt;
  `shape_e2_ivar` float)&lt;br /&gt;
 CLUSTERED BY (&lt;br /&gt;
  release, brickid, objid&lt;br /&gt;
 )&lt;br /&gt;
 SORTED BY (&lt;br /&gt;
  release, brickid, objid&lt;br /&gt;
 )&lt;br /&gt;
 INTO 4096 BUCKETS&lt;br /&gt;
 STORED AS ORC&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INSERT OVERWRITE TABLE cosmohub.legacysurvey_dr9&lt;br /&gt;
 SELECT release, brickid, brickname, objid, brick_primary, maskbits, fitbits,&lt;br /&gt;
 type, ra, `dec`, ra_ivar, dec_ivar, bx, `by`, dchisq, ebv, mjd_min, mjd_max,&lt;br /&gt;
 ref_cat, ref_id, pmra, pmdec, parallax, pmra_ivar, pmdec_ivar, parallax_ivar,&lt;br /&gt;
 ref_epoch, gaia_phot_g_mean_mag, gaia_phot_g_mean_flux_over_error, gaia_phot_g_n_obs,&lt;br /&gt;
 gaia_phot_bp_mean_mag, gaia_phot_bp_mean_flux_over_error, gaia_phot_bp_n_obs,&lt;br /&gt;
 gaia_phot_rp_mean_mag, gaia_phot_rp_mean_flux_over_error, gaia_phot_rp_n_obs,&lt;br /&gt;
 gaia_phot_variable_flag, gaia_astrometric_excess_noise, gaia_astrometric_excess_noise_sig,&lt;br /&gt;
 gaia_astrometric_n_obs_al, gaia_astrometric_n_good_obs_al, gaia_astrometric_weight_al,&lt;br /&gt;
 gaia_duplicated_source, gaia_a_g_val, gaia_e_bp_min_rp_val, gaia_phot_bp_rp_excess_factor,&lt;br /&gt;
 gaia_astrometric_sigma5d_max, gaia_astrometric_params_solved, flux_g, flux_r,&lt;br /&gt;
 flux_z, flux_w1, flux_w2, flux_w3, flux_w4, flux_ivar_g, flux_ivar_r, flux_ivar_z,&lt;br /&gt;
 flux_ivar_w1, flux_ivar_w2, flux_ivar_w3, flux_ivar_w4, fiberflux_g, fiberflux_r,&lt;br /&gt;
 fiberflux_z, fibertotflux_g, fibertotflux_r, fibertotflux_z, apflux_g, apflux_r,&lt;br /&gt;
 apflux_z, apflux_resid_g, apflux_resid_r, apflux_resid_z, apflux_blobresid_g,&lt;br /&gt;
 apflux_blobresid_r, apflux_blobresid_z, apflux_ivar_g, apflux_ivar_r, apflux_ivar_z,&lt;br /&gt;
 apflux_masked_g, apflux_masked_r, apflux_masked_z, apflux_w1, apflux_w2, apflux_w3,&lt;br /&gt;
 apflux_w4, apflux_resid_w1, apflux_resid_w2, apflux_resid_w3, apflux_resid_w4,&lt;br /&gt;
 apflux_ivar_w1, apflux_ivar_w2, apflux_ivar_w3, apflux_ivar_w4, mw_transmission_g,&lt;br /&gt;
 mw_transmission_r, mw_transmission_z, mw_transmission_w1, mw_transmission_w2,&lt;br /&gt;
 mw_transmission_w3, mw_transmission_w4, nobs_g, nobs_r, nobs_z, nobs_w1, nobs_w2,&lt;br /&gt;
 nobs_w3, nobs_w4, rchisq_g, rchisq_r, rchisq_z, rchisq_w1, rchisq_w2, rchisq_w3,&lt;br /&gt;
 rchisq_w4, fracflux_g, fracflux_r, fracflux_z, fracflux_w1, fracflux_w2, fracflux_w3,&lt;br /&gt;
 fracflux_w4, fracmasked_g, fracmasked_r, fracmasked_z, fracin_g, fracin_r, fracin_z,&lt;br /&gt;
 anymask_g, anymask_r, anymask_z, allmask_g, allmask_r, allmask_z, wisemask_w1,&lt;br /&gt;
 wisemask_w2, psfsize_g, psfsize_r, psfsize_z, psfdepth_g, psfdepth_r, psfdepth_z,&lt;br /&gt;
 galdepth_g, galdepth_r, galdepth_z, nea_g, nea_r, nea_z, blob_nea_g, blob_nea_r,&lt;br /&gt;
 blob_nea_z, psfdepth_w1, psfdepth_w2, psfdepth_w3, psfdepth_w4, wise_coadd_id,&lt;br /&gt;
 wise_x, wise_y, lc_flux_w1, lc_flux_w2, lc_flux_ivar_w1, lc_flux_ivar_w2, lc_nobs_w1,&lt;br /&gt;
 lc_nobs_w2, lc_fracflux_w1, lc_fracflux_w2, lc_rchisq_w1, lc_rchisq_w2, lc_mjd_w1,&lt;br /&gt;
 lc_mjd_w2, lc_epoch_index_w1, lc_epoch_index_w2, sersic, sersic_ivar, shape_r,&lt;br /&gt;
 shape_r_ivar, shape_e1, shape_e1_ivar, shape_e2, shape_e2_ivar&lt;br /&gt;
 FROM tallada.legacysurvey_dr9&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE release release smallint COMMENT &amp;quot;Unique integer denoting the camera and filter set used&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE brickid brickid int COMMENT &amp;quot;Brick ID [1,662174]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE brickname brickname string COMMENT &amp;quot;Name of brick, encoding the brick sky position, eg \&amp;quot;1126p222\&amp;quot; near RA=112.6, Dec=+22.2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE objid objid int COMMENT &amp;quot;Catalog object number within this brick\u003b a unique identifier hash is release,brickid,objid\u003b objid spans [0,N-1] and is contiguously enumerated within each brick&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE brick_primary brick_primary boolean COMMENT &amp;quot;True if the object is within the brick boundary&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE brightblob brightblob smallint COMMENT &amp;quot;bitwise mask indicating that an object is near a bright foreground source, as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE maskbits maskbits smallint COMMENT &amp;quot;bitwise mask indicating that an object touches a pixel in the coadd/*/*/*maskbits*maps, as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE type type string COMMENT &amp;quot;Morphological model: PSF=stellar, REX=round exponential galaxy, DEV=deVauc, EXP=exponential, COMP=composite, DUP=Gaia source fit by different model.&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ra ra double COMMENT &amp;quot;Right ascension at equinox J2000&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE dec dec double COMMENT &amp;quot;Declination at equinox J2000&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ra_ivar ra_ivar float COMMENT &amp;quot;Inverse variance of RA (no cosine term!), excluding astrometric calibration errors&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE dec_ivar dec_ivar float COMMENT &amp;quot;Inverse variance of DEC, excluding astrometric calibration errors&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE bx bx float COMMENT &amp;quot;X position (0-indexed) of coordinates in brick image stack&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE by by float COMMENT &amp;quot;Y position (0-indexed) of coordinates in brick image stack&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE dchisq dchisq array&amp;lt;float&amp;gt; COMMENT &amp;quot;Difference in χ² between successively more-complex model fits: PSF, REX, DEV, EXP, COMP. The difference is versus no source.&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ebv ebv float COMMENT &amp;quot;Galactic extinction E(B-V) reddening from SFD98, used to compute the mw_transmission_ columns&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mjd_min mjd_min double COMMENT &amp;quot;Minimum Modified Julian Date of observations used to construct the model of this object&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mjd_max mjd_max double COMMENT &amp;quot;Maximum Modified Julian Date of observations used to construct the model of this object&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ref_cat ref_cat string COMMENT &amp;quot;Reference catalog source for this star: T2 for Tycho-2, G2 for Gaia DR2, L2 for the LSLGA, empty otherwise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ref_id ref_id bigint COMMENT &amp;quot;Reference catalog identifier for this star\u003b Tyc1*1,000,000+Tyc2*10+Tyc3 for Tycho2\u003b \&amp;quot;sourceid\&amp;quot; for Gaia-DR2 and LSLGA&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE pmra pmra float COMMENT &amp;quot;Reference catalog proper motion in the RA direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE pmdec pmdec float COMMENT &amp;quot;Reference catalog proper motion in the Dec direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE parallax parallax float COMMENT &amp;quot;Reference catalog parallax&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE pmra_ivar pmra_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on pmra&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE pmdec_ivar pmdec_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on pmdec&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE parallax_ivar parallax_ivar float COMMENT &amp;quot;Reference catalog inverse-variance on parallax&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE ref_epoch ref_epoch float COMMENT &amp;quot;Reference catalog reference epoch (eg, 2015.5 for Gaia DR2)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_pointsource gaia_pointsource boolean COMMENT &amp;quot;This Gaia DR2 source is believed to be a star, not a galaxy&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_g_mean_mag gaia_phot_g_mean_mag float COMMENT &amp;quot;Gaia G band mag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_g_mean_flux_over_error gaia_phot_g_mean_flux_over_error float COMMENT &amp;quot;Gaia G band signal-to-noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_g_n_obs gaia_phot_g_n_obs smallint COMMENT &amp;quot;Gaia G band number of observations&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_bp_mean_mag gaia_phot_bp_mean_mag float COMMENT &amp;quot;Gaia BP mag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_bp_mean_flux_over_error gaia_phot_bp_mean_flux_over_error float COMMENT &amp;quot;Gaia BP signal-to-noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_bp_n_obs gaia_phot_bp_n_obs smallint COMMENT &amp;quot;Gaia BP number of observations&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_rp_mean_mag gaia_phot_rp_mean_mag float COMMENT &amp;quot;Gaia RP mag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_rp_mean_flux_over_error gaia_phot_rp_mean_flux_over_error float COMMENT &amp;quot;Gaia RP signal-to-noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_rp_n_obs gaia_phot_rp_n_obs smallint COMMENT &amp;quot;Gaia RP number of observations&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_variable_flag gaia_phot_variable_flag boolean COMMENT &amp;quot;Gaia photometric variable flag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_excess_noise gaia_astrometric_excess_noise float COMMENT &amp;quot;Gaia astrometric excess noise&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_excess_noise_sig gaia_astrometric_excess_noise_sig float COMMENT &amp;quot;Gaia astrometric excess noise uncertainty&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_n_obs_al gaia_astrometric_n_obs_al smallint COMMENT &amp;quot;Gaia number of astrometric observations along scan direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_n_good_obs_al gaia_astrometric_n_good_obs_al smallint COMMENT &amp;quot;Gaia number of good astrometric observations along scan direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_weight_al gaia_astrometric_weight_al float COMMENT &amp;quot;Gaia astrometric weight along scan direction&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_duplicated_source gaia_duplicated_source boolean COMMENT &amp;quot;Gaia duplicated source flag&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_a_g_val gaia_a_g_val float COMMENT &amp;quot;Gaia line-of-sight extinction in the G band&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_e_bp_min_rp_val gaia_e_bp_min_rp_val float COMMENT &amp;quot;Gaia line-of-sight reddening E(BP-RP)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_phot_bp_rp_excess_factor gaia_phot_bp_rp_excess_factor float COMMENT &amp;quot;Gaia BP/RP excess factor&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_sigma5d_max gaia_astrometric_sigma5d_max float COMMENT &amp;quot;Gaia longest semi-major axis of the 5-d error ellipsoid&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE gaia_astrometric_params_solved gaia_astrometric_params_solved tinyint COMMENT &amp;quot;which astrometric parameters were estimated for a Gaia source&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_g flux_g float COMMENT &amp;quot;model flux in gg&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_r flux_r float COMMENT &amp;quot;model flux in rr&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_z flux_z float COMMENT &amp;quot;model flux in zz&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_w1 flux_w1 float COMMENT &amp;quot;WISE model flux in W1W1 (AB system)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_w2 flux_w2 float COMMENT &amp;quot;WISE model flux in W2W2 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_w3 flux_w3 float COMMENT &amp;quot;WISE model flux in W3W3 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_w4 flux_w4 float COMMENT &amp;quot;WISE model flux in W4W4 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_g flux_ivar_g float COMMENT &amp;quot;Inverse variance of flux_g&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_r flux_ivar_r float COMMENT &amp;quot;Inverse variance of flux_r&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_z flux_ivar_z float COMMENT &amp;quot;Inverse variance of flux_z&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_w1 flux_ivar_w1 float COMMENT &amp;quot;Inverse variance of flux_w1 (AB system)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_w2 flux_ivar_w2 float COMMENT &amp;quot;Inverse variance of flux_w2 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_w3 flux_ivar_w3 float COMMENT &amp;quot;Inverse variance of flux_w3 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE flux_ivar_w4 flux_ivar_w4 float COMMENT &amp;quot;Inverse variance of flux_w4 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fiberflux_g fiberflux_g float COMMENT &amp;quot;Predicted gg-band flux within a fiber from this object in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fiberflux_r fiberflux_r float COMMENT &amp;quot;Predicted rr-band flux within a fiber from this object in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fiberflux_z fiberflux_z float COMMENT &amp;quot;Predicted zz-band flux within a fiber from this object in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fibertotflux_g fibertotflux_g float COMMENT &amp;quot;Predicted gg-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fibertotflux_r fibertotflux_r float COMMENT &amp;quot;Predicted rr-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fibertotflux_z fibertotflux_z float COMMENT &amp;quot;Predicted zz-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_g apflux_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in gg&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_r apflux_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in rr&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_z apflux_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in zz&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_resid_g apflux_resid_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added residual images in gg&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_resid_r apflux_resid_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added residual images in rr&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_resid_z apflux_resid_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;aperture fluxes on the co-added residual images in zz&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_ivar_g apflux_ivar_g array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_g&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_ivar_r apflux_ivar_r array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_r&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE apflux_ivar_z apflux_ivar_z array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of apflux_resid_z&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_g mw_transmission_g float COMMENT &amp;quot;Galactic transmission in gg filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_r mw_transmission_r float COMMENT &amp;quot;Galactic transmission in rr filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_z mw_transmission_z float COMMENT &amp;quot;Galactic transmission in zz filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_w1 mw_transmission_w1 float COMMENT &amp;quot;Galactic transmission in W1W1 filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_w2 mw_transmission_w2 float COMMENT &amp;quot;Galactic transmission in W2W2 filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_w3 mw_transmission_w3 float COMMENT &amp;quot;Galactic transmission in W3W3 filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE mw_transmission_w4 mw_transmission_w4 float COMMENT &amp;quot;Galactic transmission in W4W4 filter in linear units [0, 1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_g nobs_g smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in gg: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_r nobs_r smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in rr: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_z nobs_z smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in zz: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_w1 nobs_w1 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W1W1: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_w2 nobs_w2 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W2W2: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_w3 nobs_w3 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W3W3: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE nobs_w4 nobs_w4 smallint COMMENT &amp;quot;Number of images that contribute to the central pixel in W4W4: filter for this object (not profile-weighted)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_g rchisq_g float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in gg&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_r rchisq_r float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in rr&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_z rchisq_z float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in zz&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_w1 rchisq_w1 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W1W1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_w2 rchisq_w2 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W2W2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_w3 rchisq_w3 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W3W3&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE rchisq_w4 rchisq_w4 float COMMENT &amp;quot;Profile-weighted χ² of model fit normalized by the number of pixels in W4W4&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_g fracflux_g float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in gg(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_r fracflux_r float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in rr(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_z fracflux_z float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in zz(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_w1 fracflux_w1 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W1W1(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_w2 fracflux_w2 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W2W2(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_w3 fracflux_w3 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W3W3(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracflux_w4 fracflux_w4 float COMMENT &amp;quot;Profile-weighted fraction of the flux from other sources divided by the total flux in W4W4(typically [0,1])&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracmasked_g fracmasked_g float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in gg, strictly between [0,1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracmasked_r fracmasked_r float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in rr, strictly between [0,1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracmasked_z fracmasked_z float COMMENT &amp;quot;Profile-weighted fraction of pixels masked from all observations of this object in zz, strictly between [0,1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracin_g fracin_g float COMMENT &amp;quot;Fraction of a source's flux within the blob in gg, near unity for real sources&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracin_r fracin_r float COMMENT &amp;quot;Fraction of a source's flux within the blob in rr, near unity for real sources&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracin_z fracin_z float COMMENT &amp;quot;Fraction of a source's flux within the blob in zz, near unity for real sources&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE anymask_g anymask_g smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in gg as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE anymask_r anymask_r smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in rr as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE anymask_z anymask_z smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from any image satisfies each condition in zz as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE allmask_g allmask_g smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in gg as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE allmask_r allmask_r smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in rr as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE allmask_z allmask_z smallint COMMENT &amp;quot;Bitwise mask set if the central pixel from all images satisfy each condition in zz as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE wisemask_w1 wisemask_w1 tinyint COMMENT &amp;quot;W1 bitmask as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE wisemask_w2 wisemask_w2 tinyint COMMENT &amp;quot;W2 bitmask as cataloged on the DR8 bitmasks page&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfsize_g psfsize_g float COMMENT &amp;quot;Weighted average PSF FWHM in the gg band&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfsize_r psfsize_r float COMMENT &amp;quot;Weighted average PSF FWHM in the rr band&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfsize_z psfsize_z float COMMENT &amp;quot;Weighted average PSF FWHM in the zz band&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_g psfdepth_g float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_g)5/(psfdepth_g) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_g))−9]−2.5[log10⁡(5/(psfdepth_g))−9] gives corresponding AB magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_r psfdepth_r float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_r)5/(psfdepth_r) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_r))−9]−2.5[log10⁡(5/(psfdepth_r))−9] gives corresponding AB magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_z psfdepth_z float COMMENT &amp;quot;For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_z)5/(psfdepth_z) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_z))−9]−2.5[log10⁡(5/(psfdepth_z))−9] gives corresponding AB magnitude&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE galdepth_g galdepth_g float COMMENT &amp;quot;As for psfdepth_g but for a galaxy (0.45\&amp;quot; exp, round) detection sensitivity&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE galdepth_r galdepth_r float COMMENT &amp;quot;As for psfdepth_r but for a galaxy (0.45\&amp;quot; exp, round) detection sensitivity&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE galdepth_z galdepth_z float COMMENT &amp;quot;As for psfdepth_z but for a galaxy (0.45\&amp;quot; exp, round) detection sensitivity&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_w1 psfdepth_w1 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_w2 psfdepth_w2 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_w3 psfdepth_w3 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W3&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE psfdepth_w4 psfdepth_w4 float COMMENT &amp;quot;As for psfdepth_g (and also on the AB system) but for WISE W4&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE wise_coadd_id wise_coadd_id string COMMENT &amp;quot;unWISE coadd file name for the center of each object&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_flux_w1 lc_flux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;flux_w1 in each of up to eleven unWISE coadd epochs (AB system)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_flux_w2 lc_flux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;flux_w2 in each of up to eleven unWISE coadd epochs (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_flux_ivar_w1 lc_flux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of lc_flux_w1 (AB system)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_flux_ivar_w2 lc_flux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;Inverse variance of lc_flux_w2 (AB)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_nobs_w1 lc_nobs_w1 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;nobs_w1 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_nobs_w2 lc_nobs_w2 array&amp;lt;smallint&amp;gt; COMMENT &amp;quot;nobs_w2 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_fracflux_w1 lc_fracflux_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;fracflux_w1 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_fracflux_w2 lc_fracflux_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;fracflux_w2 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_rchisq_w1 lc_rchisq_w1 array&amp;lt;float&amp;gt; COMMENT &amp;quot;rchisq_w1 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_rchisq_w2 lc_rchisq_w2 array&amp;lt;float&amp;gt; COMMENT &amp;quot;rchisq_w2 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_mjd_w1 lc_mjd_w1 array&amp;lt;double&amp;gt; COMMENT &amp;quot;mjd_w1 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE lc_mjd_w2 lc_mjd_w2 array&amp;lt;double&amp;gt; COMMENT &amp;quot;mjd_w2 in each of up to eleven unWISE coadd epochs&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracdev fracdev float COMMENT &amp;quot;Fraction of model in deVauc [0,1]&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE fracdev_ivar fracdev_ivar float COMMENT &amp;quot;Inverse variance of fracdev&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_r shapeexp_r float COMMENT &amp;quot;Half-light radius of exponential model (&amp;gt;0)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_r_ivar shapeexp_r_ivar float COMMENT &amp;quot;Inverse variance of shapeexp_r&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_e1 shapeexp_e1 float COMMENT &amp;quot;Ellipticity component 1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_e1_ivar shapeexp_e1_ivar float COMMENT &amp;quot;Inverse variance of shapeexp_e1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_e2 shapeexp_e2 float COMMENT &amp;quot;Ellipticity component 2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapeexp_e2_ivar shapeexp_e2_ivar float COMMENT &amp;quot;Inverse variance of shapeexp_e2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_r shapedev_r float COMMENT &amp;quot;Half-light radius of deVaucouleurs model (&amp;gt;0)&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_r_ivar shapedev_r_ivar float COMMENT &amp;quot;Inverse variance of shapedev_r&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_e1 shapedev_e1 float COMMENT &amp;quot;Ellipticity component 1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_e1_ivar shapedev_e1_ivar float COMMENT &amp;quot;Inverse variance of shapedev_e1&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_e2 shapedev_e2 float COMMENT &amp;quot;Ellipticity component 2&amp;quot;;&lt;br /&gt;
 ALTER TABLE cosmohub.legacy_survey_dr8 CHANGE shapedev_e2_ivar shapedev_e2_ivar float COMMENT &amp;quot;Inverse variance of shapedev_e2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== Sweep photo-z ==&lt;br /&gt;
&lt;br /&gt;
=== Raw data ===&lt;br /&gt;
&lt;br /&gt;
 wget -c --no-clobber --no-parent -r https://portal.nersc.gov/project/cosmo/data/legacysurvey/dr8/north/sweep/&lt;br /&gt;
 wget -c --no-clobber --no-parent -r https://portal.nersc.gov/project/cosmo/data/legacysurvey/dr8/south/sweep/&lt;br /&gt;
&lt;br /&gt;
Checksums checked:&lt;br /&gt;
&lt;br /&gt;
 $ cd north/sweep/8.0&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 287&lt;br /&gt;
 $ wc -l legacysurvey_dr8_north_sweep_8.0.sha256sum&lt;br /&gt;
 286 (+ checksum file)&lt;br /&gt;
 $ sha256sum -c legacysurvey_dr8_north_sweep_8.0.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd north/sweep/8.0-photo-z&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 287&lt;br /&gt;
 $ wc -l legacysurvey_dr8_north_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 286 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_north_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd south/sweep/8.0&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 438&lt;br /&gt;
 $ wc -l legacysurvey_dr8_south_sweep_8.0.sha256sum&lt;br /&gt;
 437 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_south_sweep_8.0.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
 $ cd south/sweep/8.0-photo-z&lt;br /&gt;
 $ ls | wc -l&lt;br /&gt;
 438&lt;br /&gt;
 $ wc -l legacysurvey_dr8_south_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 437 (+ checksum file)&lt;br /&gt;
 $ sha256sum -w --quiet --strict -c legacysurvey_dr8_south_sweep_8.0-photo-z.sha256sum&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
=== Parquet ===&lt;br /&gt;
&lt;br /&gt;
The following code snippet was used in spark to merge fits files and convert to parquet:&lt;br /&gt;
&lt;br /&gt;
 path_base = '/cephfs/pic.es/astro/scratch/tallada/dr8-phz/'&lt;br /&gt;
 hdfs_base = '/user/tallada/data/legacysurvey-sweep'&lt;br /&gt;
 &lt;br /&gt;
 hs = ['south/sweep'] #, 'north/sweep']&lt;br /&gt;
 dir_src = '8.0'&lt;br /&gt;
 dir_phz = '8.0-photo-z'&lt;br /&gt;
 dir_dst = '8.0-merged'&lt;br /&gt;
 &lt;br /&gt;
 my_files = sorted(os.listdir(os.path.join(path_base, hs[0], dir_src)))&lt;br /&gt;
 &lt;br /&gt;
 def merge_phz(file_name):&lt;br /&gt;
     file_src = os.path.join(path_base, hs[0], dir_src, file_name)&lt;br /&gt;
     file_phz = os.path.join(path_base, hs[0], dir_phz, file_name[:-5]+'-pz.fits')&lt;br /&gt;
     file_dst = os.path.join(path_base, hs[0], dir_dst, file_name[:-5]+'-merged.fits')&lt;br /&gt;
 &lt;br /&gt;
     t_src = table.Table.read(file_src)&lt;br /&gt;
     t_phz = table.Table.read(file_phz)&lt;br /&gt;
     t_dst = table.hstack([t_src, t_phz], join_type='exact')&lt;br /&gt;
 &lt;br /&gt;
     os.unlink(file_dst)&lt;br /&gt;
     t_dst.write(file_dst)&lt;br /&gt;
     &lt;br /&gt;
     return file_name&lt;br /&gt;
 &lt;br /&gt;
 df = sc.parallelize(my_files, len(my_files))&lt;br /&gt;
 &lt;br /&gt;
 df.map(merge_phz).count()&lt;br /&gt;
 &lt;br /&gt;
 df = spark.read.format(&amp;quot;fits&amp;quot;).option(&amp;quot;hdu&amp;quot;, 1).load(&lt;br /&gt;
     &amp;quot;file://&amp;quot; + os.path.join(path_base, hs[0], dir_dst)&lt;br /&gt;
 ) &lt;br /&gt;
 &lt;br /&gt;
 df.write.parquet(os.path.join(hdfs_base, hs[0]))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== External table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE EXTERNAL TABLE tallada.dr8_sweep (&lt;br /&gt;
    `RELEASE` SMALLINT,&lt;br /&gt;
    `BRICKID` INT,&lt;br /&gt;
    `BRICKNAME` STRING,&lt;br /&gt;
    `OBJID` INT,&lt;br /&gt;
    `TYPE` STRING,&lt;br /&gt;
    `RA` DOUBLE,&lt;br /&gt;
    `DEC` DOUBLE,&lt;br /&gt;
    `RA_IVAR` FLOAT,&lt;br /&gt;
    `DEC_IVAR` FLOAT,&lt;br /&gt;
    `DCHISQ` ARRAY&amp;lt;FLOAT&amp;gt;,&lt;br /&gt;
    `EBV` FLOAT,&lt;br /&gt;
    `FLUX_G` FLOAT,&lt;br /&gt;
    `FLUX_R` FLOAT,&lt;br /&gt;
    `FLUX_Z` FLOAT,&lt;br /&gt;
    `FLUX_W1` FLOAT,&lt;br /&gt;
    `FLUX_W2` FLOAT,&lt;br /&gt;
    `FLUX_W3` FLOAT,&lt;br /&gt;
    `FLUX_W4` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_G` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_R` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_Z` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W1` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W2` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W3` FLOAT,&lt;br /&gt;
    `FLUX_IVAR_W4` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_G` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_R` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_Z` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W1` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W2` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W3` FLOAT,&lt;br /&gt;
    `MW_TRANSMISSION_W4` FLOAT,&lt;br /&gt;
    `NOBS_G` INT,&lt;br /&gt;
    `NOBS_R` INT,&lt;br /&gt;
    `NOBS_Z` INT,&lt;br /&gt;
    `NOBS_W1` INT,&lt;br /&gt;
    `NOBS_W2` INT,&lt;br /&gt;
    `NOBS_W3` INT,&lt;br /&gt;
    `NOBS_W4` INT,&lt;br /&gt;
    `RCHISQ_G` FLOAT,&lt;br /&gt;
    `RCHISQ_R` FLOAT,&lt;br /&gt;
    `RCHISQ_Z` FLOAT,&lt;br /&gt;
    `RCHISQ_W1` FLOAT,&lt;br /&gt;
    `RCHISQ_W2` FLOAT,&lt;br /&gt;
    `RCHISQ_W3` FLOAT,&lt;br /&gt;
    `RCHISQ_W4` FLOAT,&lt;br /&gt;
    `FRACFLUX_G` FLOAT,&lt;br /&gt;
    `FRACFLUX_R` FLOAT,&lt;br /&gt;
    `FRACFLUX_Z` FLOAT,&lt;br /&gt;
    `FRACFLUX_W1` FLOAT,&lt;br /&gt;
    `FRACFLUX_W2` FLOAT,&lt;br /&gt;
    `FRACFLUX_W3` FLOAT,&lt;br /&gt;
    `FRACFLUX_W4` FLOAT,&lt;br /&gt;
    `FRACMASKED_G` FLOAT,&lt;br /&gt;
    `FRACMASKED_R` FLOAT,&lt;br /&gt;
    `FRACMASKED_Z` FLOAT,&lt;br /&gt;
    `FRACIN_G` FLOAT,&lt;br /&gt;
    `FRACIN_R` FLOAT,&lt;br /&gt;
    `FRACIN_Z` FLOAT,&lt;br /&gt;
    `ANYMASK_G` SMALLINT,&lt;br /&gt;
    `ANYMASK_R` SMALLINT,&lt;br /&gt;
    `ANYMASK_Z` SMALLINT,&lt;br /&gt;
    `ALLMASK_G` SMALLINT,&lt;br /&gt;
    `ALLMASK_R` SMALLINT,&lt;br /&gt;
    `ALLMASK_Z` SMALLINT,&lt;br /&gt;
    `WISEMASK_W1` TINYINT,&lt;br /&gt;
    `WISEMASK_W2` TINYINT,&lt;br /&gt;
    `PSFSIZE_G` FLOAT,&lt;br /&gt;
    `PSFSIZE_R` FLOAT,&lt;br /&gt;
    `PSFSIZE_Z` FLOAT,&lt;br /&gt;
    `PSFDEPTH_G` FLOAT,&lt;br /&gt;
    `PSFDEPTH_R` FLOAT,&lt;br /&gt;
    `PSFDEPTH_Z` FLOAT,&lt;br /&gt;
    `GALDEPTH_G` FLOAT,&lt;br /&gt;
    `GALDEPTH_R` FLOAT,&lt;br /&gt;
    `GALDEPTH_Z` FLOAT,&lt;br /&gt;
    `PSFDEPTH_W1` FLOAT,&lt;br /&gt;
    `PSFDEPTH_W2` FLOAT,&lt;br /&gt;
    `WISE_COADD_ID` STRING,&lt;br /&gt;
    `FRACDEV` FLOAT,&lt;br /&gt;
    `FRACDEV_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_R` FLOAT,&lt;br /&gt;
    `SHAPEDEV_R_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E1` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E1_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E2` FLOAT,&lt;br /&gt;
    `SHAPEDEV_E2_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_R` FLOAT,&lt;br /&gt;
    `SHAPEEXP_R_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E1` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E1_IVAR` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E2` FLOAT,&lt;br /&gt;
    `SHAPEEXP_E2_IVAR` FLOAT,&lt;br /&gt;
    `FIBERFLUX_G` FLOAT,&lt;br /&gt;
    `FIBERFLUX_R` FLOAT,&lt;br /&gt;
    `FIBERFLUX_Z` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_G` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_R` FLOAT,&lt;br /&gt;
    `FIBERTOTFLUX_Z` FLOAT,&lt;br /&gt;
    `REF_CAT` STRING,&lt;br /&gt;
    `REF_ID` BIGINT,&lt;br /&gt;
    `REF_EPOCH` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_G_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_G_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_BP_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_BP_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_RP_MEAN_MAG` FLOAT,&lt;br /&gt;
    `GAIA_PHOT_RP_MEAN_FLUX_OVER_ERROR` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_EXCESS_NOISE` FLOAT,&lt;br /&gt;
    `GAIA_DUPLICATED_SOURCE` BOOLEAN,&lt;br /&gt;
    `GAIA_PHOT_BP_RP_EXCESS_FACTOR` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_SIGMA5D_MAX` FLOAT,&lt;br /&gt;
    `GAIA_ASTROMETRIC_PARAMS_SOLVED` TINYINT,&lt;br /&gt;
    `PARALLAX` FLOAT,&lt;br /&gt;
    `PARALLAX_IVAR` FLOAT,&lt;br /&gt;
    `PMRA` FLOAT,&lt;br /&gt;
    `PMRA_IVAR` FLOAT,&lt;br /&gt;
    `PMDEC` FLOAT,&lt;br /&gt;
    `PMDEC_IVAR` FLOAT,&lt;br /&gt;
    `MASKBITS` SMALLINT,&lt;br /&gt;
    `z_phot_mean` FLOAT,&lt;br /&gt;
    `z_phot_median` FLOAT,&lt;br /&gt;
    `z_phot_std` FLOAT,&lt;br /&gt;
    `z_phot_l68` FLOAT,&lt;br /&gt;
    `z_phot_u68` FLOAT,&lt;br /&gt;
    `z_phot_l95` FLOAT,&lt;br /&gt;
    `z_phot_u95` FLOAT,&lt;br /&gt;
    `z_spec` FLOAT,&lt;br /&gt;
    `survey` STRING,&lt;br /&gt;
    `training` BOOLEAN&lt;br /&gt;
 )&lt;br /&gt;
 STORED AS PARQUET&lt;br /&gt;
 LOCATION '/user/tallada/data/legacysurvey-sweep'&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Combined table ===&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE cosmohub.legacysurvey_dr8_phz (&lt;br /&gt;
    release smallint COMMENT 'Unique integer denoting the camera and filter set used',&lt;br /&gt;
    brickid int COMMENT 'Brick ID [1,662174]',&lt;br /&gt;
    brickname string COMMENT 'Name of brick, encoding the brick sky position, eg &amp;quot;1126p222&amp;quot; near RA=112.6, Dec=+22.2',&lt;br /&gt;
    objid int COMMENT 'Catalog object number within this brick\u003b a unique identifier hash is release,brickid,objid\u003b objid spans [0,N-1] and is contiguously enumerated within each brick',&lt;br /&gt;
    brick_primary boolean COMMENT 'True if the object is within the brick boundary',&lt;br /&gt;
    brightblob smallint COMMENT 'bitwise mask indicating that an object is near a bright foreground source, as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    maskbits smallint COMMENT 'bitwise mask indicating that an object touches a pixel in the coadd/*/*/*maskbits* maps, as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    type string COMMENT 'Morphological model: &amp;quot;PSF&amp;quot;=stellar, &amp;quot;REX&amp;quot;=&amp;quot;round exponential galaxy&amp;quot;, &amp;quot;DEV&amp;quot;=deVauc, &amp;quot;EXP&amp;quot;=exponential, &amp;quot;COMP&amp;quot;=composite, &amp;quot;DUP&amp;quot;=Gaia source fit by different model. Note that in some FITS readers, a trailing space may be appended for &amp;quot;PSF &amp;quot;, &amp;quot;DEV &amp;quot; and &amp;quot;EXP &amp;quot; since the column data type is a 4-character string',&lt;br /&gt;
    ra double COMMENT 'Right ascension at equinox J2000',&lt;br /&gt;
    dec double COMMENT 'Declination at equinox J2000',&lt;br /&gt;
    ra_ivar float COMMENT 'Inverse variance of RA (no cosine term!), excluding astrometric calibration errors',&lt;br /&gt;
    dec_ivar float COMMENT 'Inverse variance of DEC, excluding astrometric calibration errors',&lt;br /&gt;
    bx float COMMENT 'X position (0-indexed) of coordinates in brick image stack',&lt;br /&gt;
    `by` float COMMENT 'Y position (0-indexed) of coordinates in brick image stack',&lt;br /&gt;
    dchisq array&amp;lt;float&amp;gt; COMMENT 'Difference in χ² between successively more-complex model fits: PSF, REX, DEV, EXP, COMP. The difference is versus no source.',&lt;br /&gt;
    ebv float COMMENT 'Galactic extinction E(B-V) reddening from SFD98, used to compute the mw_transmission_ columns',&lt;br /&gt;
    mjd_min double COMMENT 'Minimum Modified Julian Date of observations used to construct the model of this object',&lt;br /&gt;
    mjd_max double COMMENT 'Maximum Modified Julian Date of observations used to construct the model of this object',&lt;br /&gt;
    ref_cat string COMMENT 'Reference catalog source for this star: &amp;quot;T2&amp;quot; for Tycho-2, &amp;quot;G2&amp;quot; for Gaia DR2, &amp;quot;L2&amp;quot; for the LSLGA, empty otherwise',&lt;br /&gt;
    ref_id bigint COMMENT 'Reference catalog identifier for this star\u003b Tyc1*1,000,000+Tyc2*10+Tyc3 for Tycho2\u003b &amp;quot;sourceid&amp;quot; for Gaia-DR2 and LSLGA',&lt;br /&gt;
    pmra float COMMENT 'Reference catalog proper motion in the RA direction',&lt;br /&gt;
    pmdec float COMMENT 'Reference catalog proper motion in the Dec direction',&lt;br /&gt;
    parallax float COMMENT 'Reference catalog parallax',&lt;br /&gt;
    pmra_ivar float COMMENT 'Reference catalog inverse-variance on pmra',&lt;br /&gt;
    pmdec_ivar float COMMENT 'Reference catalog inverse-variance on pmdec',&lt;br /&gt;
    parallax_ivar float COMMENT 'Reference catalog inverse-variance on parallax',&lt;br /&gt;
    ref_epoch float COMMENT 'Reference catalog reference epoch (eg, 2015.5 for Gaia DR2)',&lt;br /&gt;
    gaia_pointsource boolean COMMENT 'This Gaia DR2 source is believed to be a star, not a galaxy',&lt;br /&gt;
    gaia_phot_g_mean_mag float COMMENT 'Gaia G band mag',&lt;br /&gt;
    gaia_phot_g_mean_flux_over_error float COMMENT 'Gaia G band signal-to-noise',&lt;br /&gt;
    gaia_phot_g_n_obs smallint COMMENT 'Gaia G band number of observations',&lt;br /&gt;
    gaia_phot_bp_mean_mag float COMMENT 'Gaia BP mag',&lt;br /&gt;
    gaia_phot_bp_mean_flux_over_error float COMMENT 'Gaia BP signal-to-noise',&lt;br /&gt;
    gaia_phot_bp_n_obs smallint COMMENT 'Gaia BP number of observations',&lt;br /&gt;
    gaia_phot_rp_mean_mag float COMMENT 'Gaia RP mag',&lt;br /&gt;
    gaia_phot_rp_mean_flux_over_error float COMMENT 'Gaia RP signal-to-noise',&lt;br /&gt;
    gaia_phot_rp_n_obs smallint COMMENT 'Gaia RP number of observations',&lt;br /&gt;
    gaia_phot_variable_flag boolean COMMENT 'Gaia photometric variable flag',&lt;br /&gt;
    gaia_astrometric_excess_noise float COMMENT 'Gaia astrometric excess noise',&lt;br /&gt;
    gaia_astrometric_excess_noise_sig float COMMENT 'Gaia astrometric excess noise uncertainty',&lt;br /&gt;
    gaia_astrometric_n_obs_al smallint COMMENT 'Gaia number of astrometric observations along scan direction',&lt;br /&gt;
    gaia_astrometric_n_good_obs_al smallint COMMENT 'Gaia number of good astrometric observations along scan direction',&lt;br /&gt;
    gaia_astrometric_weight_al float COMMENT 'Gaia astrometric weight along scan direction',&lt;br /&gt;
    gaia_duplicated_source boolean COMMENT 'Gaia duplicated source flag',&lt;br /&gt;
    gaia_a_g_val float COMMENT 'Gaia line-of-sight extinction in the G band',&lt;br /&gt;
    gaia_e_bp_min_rp_val float COMMENT 'Gaia line-of-sight reddening E(BP-RP)',&lt;br /&gt;
    gaia_phot_bp_rp_excess_factor float COMMENT 'Gaia BP/RP excess factor',&lt;br /&gt;
    gaia_astrometric_sigma5d_max float COMMENT 'Gaia longest semi-major axis of the 5-d error ellipsoid',&lt;br /&gt;
    gaia_astrometric_params_solved tinyint COMMENT 'which astrometric parameters were estimated for a Gaia source',&lt;br /&gt;
    flux_g float COMMENT 'model flux in gg',&lt;br /&gt;
    flux_r float COMMENT 'model flux in rr',&lt;br /&gt;
    flux_z float COMMENT 'model flux in zz',&lt;br /&gt;
    flux_w1 float COMMENT 'WISE model flux in W1W1 (AB system)',&lt;br /&gt;
    flux_w2 float COMMENT 'WISE model flux in W2W2 (AB)',&lt;br /&gt;
    flux_w3 float COMMENT 'WISE model flux in W3W3 (AB)',&lt;br /&gt;
    flux_w4 float COMMENT 'WISE model flux in W4W4 (AB)',&lt;br /&gt;
    flux_ivar_g float COMMENT 'Inverse variance of flux_g',&lt;br /&gt;
    flux_ivar_r float COMMENT 'Inverse variance of flux_r',&lt;br /&gt;
    flux_ivar_z float COMMENT 'Inverse variance of flux_z',&lt;br /&gt;
    flux_ivar_w1 float COMMENT 'Inverse variance of flux_w1 (AB system)',&lt;br /&gt;
    flux_ivar_w2 float COMMENT 'Inverse variance of flux_w2 (AB)',&lt;br /&gt;
    flux_ivar_w3 float COMMENT 'Inverse variance of flux_w3 (AB)',&lt;br /&gt;
    flux_ivar_w4 float COMMENT 'Inverse variance of flux_w4 (AB)',&lt;br /&gt;
    fiberflux_g float COMMENT 'Predicted gg-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fiberflux_r float COMMENT 'Predicted rr-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fiberflux_z float COMMENT 'Predicted zz-band flux within a fiber from this object in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_g float COMMENT 'Predicted gg-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_r float COMMENT 'Predicted rr-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    fibertotflux_z float COMMENT 'Predicted zz-band flux within a fiber from all sources at this location in 1 arcsec Gaussian seeing',&lt;br /&gt;
    apflux_g array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in gg',&lt;br /&gt;
    apflux_r array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in rr',&lt;br /&gt;
    apflux_z array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added images in apertures of radius [0.5, 0.75, 1.0, 1.5, 2.0, 3.5, 5.0, 7.0] arcsec in zz',&lt;br /&gt;
    apflux_resid_g array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in gg',&lt;br /&gt;
    apflux_resid_r array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in rr',&lt;br /&gt;
    apflux_resid_z array&amp;lt;float&amp;gt; COMMENT 'aperture fluxes on the co-added residual images in zz',&lt;br /&gt;
    apflux_ivar_g array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_g',&lt;br /&gt;
    apflux_ivar_r array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_r',&lt;br /&gt;
    apflux_ivar_z array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of apflux_resid_z',&lt;br /&gt;
    mw_transmission_g float COMMENT 'Galactic transmission in gg filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_r float COMMENT 'Galactic transmission in rr filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_z float COMMENT 'Galactic transmission in zz filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w1 float COMMENT 'Galactic transmission in W1W1 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w2 float COMMENT 'Galactic transmission in W2W2 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w3 float COMMENT 'Galactic transmission in W3W3 filter in linear units [0, 1]',&lt;br /&gt;
    mw_transmission_w4 float COMMENT 'Galactic transmission in W4W4 filter in linear units [0, 1]',&lt;br /&gt;
    nobs_g smallint COMMENT 'Number of images that contribute to the central pixel in gg: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_r smallint COMMENT 'Number of images that contribute to the central pixel in rr: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_z smallint COMMENT 'Number of images that contribute to the central pixel in zz: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w1 smallint COMMENT 'Number of images that contribute to the central pixel in W1W1: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w2 smallint COMMENT 'Number of images that contribute to the central pixel in W2W2: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w3 smallint COMMENT 'Number of images that contribute to the central pixel in W3W3: filter for this object (not profile-weighted)',&lt;br /&gt;
    nobs_w4 smallint COMMENT 'Number of images that contribute to the central pixel in W4W4: filter for this object (not profile-weighted)',&lt;br /&gt;
    rchisq_g float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in gg',&lt;br /&gt;
    rchisq_r float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in rr',&lt;br /&gt;
    rchisq_z float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in zz',&lt;br /&gt;
    rchisq_w1 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W1W1',&lt;br /&gt;
    rchisq_w2 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W2W2',&lt;br /&gt;
    rchisq_w3 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W3W3',&lt;br /&gt;
    rchisq_w4 float COMMENT 'Profile-weighted χ² of model fit normalized by the number of pixels in W4W4',&lt;br /&gt;
    fracflux_g float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in gg (typically [0,1])',&lt;br /&gt;
    fracflux_r float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in rr (typically [0,1])',&lt;br /&gt;
    fracflux_z float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in zz (typically [0,1])',&lt;br /&gt;
    fracflux_w1 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W1W1 (typically [0,1])',&lt;br /&gt;
    fracflux_w2 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W2W2 (typically [0,1])',&lt;br /&gt;
    fracflux_w3 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W3W3 (typically [0,1])',&lt;br /&gt;
    fracflux_w4 float COMMENT 'Profile-weighted fraction of the flux from other sources divided by the total flux in W4W4 (typically [0,1])',&lt;br /&gt;
    fracmasked_g float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in gg, strictly between [0,1]',&lt;br /&gt;
    fracmasked_r float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in rr, strictly between [0,1]',&lt;br /&gt;
    fracmasked_z float COMMENT 'Profile-weighted fraction of pixels masked from all observations of this object in zz, strictly between [0,1]',&lt;br /&gt;
    fracin_g float COMMENT 'Fraction of a source\'s flux within the blob in gg, near unity for real sources',&lt;br /&gt;
    fracin_r float COMMENT 'Fraction of a source\'s flux within the blob in rr, near unity for real sources',&lt;br /&gt;
    fracin_z float COMMENT 'Fraction of a source\'s flux within the blob in zz, near unity for real sources',&lt;br /&gt;
    anymask_g smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in gg as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    anymask_r smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in rr as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    anymask_z smallint COMMENT 'Bitwise mask set if the central pixel from any image satisfies each condition in zz as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_g smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in gg as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_r smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in rr as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    allmask_z smallint COMMENT 'Bitwise mask set if the central pixel from all images satisfy each condition in zz as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    wisemask_w1 tinyint COMMENT 'W1 bitmask as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    wisemask_w2 tinyint COMMENT 'W2 bitmask as cataloged on the DR8 bitmasks page',&lt;br /&gt;
    psfsize_g float COMMENT 'Weighted average PSF FWHM in the gg band',&lt;br /&gt;
    psfsize_r float COMMENT 'Weighted average PSF FWHM in the rr band',&lt;br /&gt;
    psfsize_z float COMMENT 'Weighted average PSF FWHM in the zz band',&lt;br /&gt;
    psfdepth_g float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_g)5/(psfdepth_g) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_g))−9]−2.5[log10⁡(5/(psfdepth_g))−9] gives corresponding AB magnitude',&lt;br /&gt;
    psfdepth_r float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_r)5/(psfdepth_r) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_r))−9]−2.5[log10⁡(5/(psfdepth_r))−9] gives corresponding AB magnitude',&lt;br /&gt;
    psfdepth_z float COMMENT 'For a 5σ5σ point source detection limit in gg, 5/(√psfdepth_z)5/(psfdepth_z) gives flux in nanomaggies and −2.5[log10(5/(√psfdepth_z))−9]−2.5[log10⁡(5/(psfdepth_z))−9] gives corresponding AB magnitude',&lt;br /&gt;
    galdepth_g float COMMENT 'As for psfdepth_g but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    galdepth_r float COMMENT 'As for psfdepth_r but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    galdepth_z float COMMENT 'As for psfdepth_z but for a galaxy (0.45&amp;quot; exp, round) detection sensitivity',&lt;br /&gt;
    psfdepth_w1 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W1',&lt;br /&gt;
    psfdepth_w2 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W2',&lt;br /&gt;
    psfdepth_w3 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W3',&lt;br /&gt;
    psfdepth_w4 float COMMENT 'As for psfdepth_g (and also on the AB system) but for WISE W4',&lt;br /&gt;
    wise_coadd_id string COMMENT 'unWISE coadd file name for the center of each object',&lt;br /&gt;
    lc_flux_w1 array&amp;lt;float&amp;gt; COMMENT 'flux_w1 in each of up to eleven unWISE coadd epochs (AB system)',&lt;br /&gt;
    lc_flux_w2 array&amp;lt;float&amp;gt; COMMENT 'flux_w2 in each of up to eleven unWISE coadd epochs (AB)',&lt;br /&gt;
    lc_flux_ivar_w1 array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of lc_flux_w1 (AB system)',&lt;br /&gt;
    lc_flux_ivar_w2 array&amp;lt;float&amp;gt; COMMENT 'Inverse variance of lc_flux_w2 (AB)',&lt;br /&gt;
    lc_nobs_w1 array&amp;lt;smallint&amp;gt; COMMENT 'nobs_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_nobs_w2 array&amp;lt;smallint&amp;gt; COMMENT 'nobs_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_fracflux_w1 array&amp;lt;float&amp;gt; COMMENT 'fracflux_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_fracflux_w2 array&amp;lt;float&amp;gt; COMMENT 'fracflux_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_rchisq_w1 array&amp;lt;float&amp;gt; COMMENT 'rchisq_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_rchisq_w2 array&amp;lt;float&amp;gt; COMMENT 'rchisq_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_mjd_w1 array&amp;lt;double&amp;gt; COMMENT 'mjd_w1 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    lc_mjd_w2 array&amp;lt;double&amp;gt; COMMENT 'mjd_w2 in each of up to eleven unWISE coadd epochs',&lt;br /&gt;
    fracdev float COMMENT 'Fraction of model in deVauc [0,1]',&lt;br /&gt;
    fracdev_ivar float COMMENT 'Inverse variance of fracdev',&lt;br /&gt;
    shapeexp_r float COMMENT 'Half-light radius of exponential model (&amp;gt;0)',&lt;br /&gt;
    shapeexp_r_ivar float COMMENT 'Inverse variance of shapeexp_r',&lt;br /&gt;
    shapeexp_e1 float COMMENT 'Ellipticity component 1',&lt;br /&gt;
    shapeexp_e1_ivar float COMMENT 'Inverse variance of shapeexp_e1',&lt;br /&gt;
    shapeexp_e2 float COMMENT 'Ellipticity component 2',&lt;br /&gt;
    shapeexp_e2_ivar float COMMENT 'Inverse variance of shapeexp_e2',&lt;br /&gt;
    shapedev_r float COMMENT 'Half-light radius of deVaucouleurs model (&amp;gt;0)',&lt;br /&gt;
    shapedev_r_ivar float COMMENT 'Inverse variance of shapedev_r',&lt;br /&gt;
    shapedev_e1 float COMMENT 'Ellipticity component 1',&lt;br /&gt;
    shapedev_e1_ivar float COMMENT 'Inverse variance of shapedev_e1',&lt;br /&gt;
    shapedev_e2 float COMMENT 'Ellipticity component 2',&lt;br /&gt;
    shapedev_e2_ivar float COMMENT 'Inverse variance of shapedev_e2',&lt;br /&gt;
    z_phot_mean FLOAT COMMENT 'photo-z derived from the mean of the photo-z PDF ',&lt;br /&gt;
    z_phot_median FLOAT COMMENT 'photo-z derived from the median of the photo-z PDF',&lt;br /&gt;
    z_phot_std FLOAT COMMENT 'standard deviation of the photo-z\'s derived from the photo-z PDF',&lt;br /&gt;
    z_phot_l68 FLOAT COMMENT 'lower bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_u68 FLOAT COMMENT 'upper bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_l95 FLOAT COMMENT 'lower bound of the 95% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_phot_u95 FLOAT COMMENT 'upper bound of the 68% confidence region, derived from the photo-z PDF',&lt;br /&gt;
    z_spec FLOAT COMMENT 'spectroscopic redshift, if available',&lt;br /&gt;
    survey STRING COMMENT 'source of the spectroscopic redshift',&lt;br /&gt;
    training BOOLEAN COMMENT 'whether or not the spectroscopic redshift is used in photometric redshift training'&lt;br /&gt;
 )&lt;br /&gt;
 CLUSTERED BY (&lt;br /&gt;
    release,&lt;br /&gt;
    brickid,&lt;br /&gt;
    objid)&lt;br /&gt;
 SORTED BY (&lt;br /&gt;
    release ASC,&lt;br /&gt;
    brickid ASC,&lt;br /&gt;
    objid ASC)&lt;br /&gt;
 INTO 4096 BUCKETS&lt;br /&gt;
 STORED AS ORC&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
=== Join insert ===&lt;br /&gt;
&lt;br /&gt;
 INSERT OVERWRITE TABLE cosmohub.legacy_survey_dr8_phz&lt;br /&gt;
 SELECT&lt;br /&gt;
   dr8.*,&lt;br /&gt;
   phz.z_phot_mean,&lt;br /&gt;
   phz.z_phot_median,&lt;br /&gt;
   phz.z_phot_std,&lt;br /&gt;
   phz.z_phot_l68,&lt;br /&gt;
   phz.z_phot_u68,&lt;br /&gt;
   phz.z_phot_l95,&lt;br /&gt;
   phz.z_phot_u95,&lt;br /&gt;
   phz.z_spec,&lt;br /&gt;
   phz.survey,&lt;br /&gt;
   phz.training&lt;br /&gt;
 FROM cosmohub.legacy_survey_dr8 AS dr8&lt;br /&gt;
 LEFT JOIN tallada.dr8_sweep AS phz&lt;br /&gt;
   ON dr8.release = phz.release&lt;br /&gt;
     AND dr8.brickid = phz.brickid&lt;br /&gt;
     AND dr8.objid = phz.objid&lt;br /&gt;
 ;&lt;br /&gt;
&lt;br /&gt;
== Queries for checking ==&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(release) AS c&lt;br /&gt;
   FROM cosmohub.legacy_survey_dr8&lt;br /&gt;
   GROUP BY release, brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(brickid) AS c&lt;br /&gt;
   FROM cosmohub.legacy_survey_dr8&lt;br /&gt;
   GROUP BY brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(release) AS c&lt;br /&gt;
   FROM tallada.dr8_sweep&lt;br /&gt;
   GROUP BY release, brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT COUNT(c), SUM(c) &lt;br /&gt;
 FROM (&lt;br /&gt;
   SELECT COUNT(brickid) AS c&lt;br /&gt;
   FROM tallada.dr8_sweep&lt;br /&gt;
   GROUP BY brickid, objid&lt;br /&gt;
 ) AS t&lt;br /&gt;
&lt;br /&gt;
 SELECT release, brickid, objid, COUNT(release)&lt;br /&gt;
 FROM tallada.dr8_sweep&lt;br /&gt;
 GROUP BY release, brickid, objid&lt;br /&gt;
 HAVING COUNT(release) &amp;gt; 1&lt;br /&gt;
&lt;br /&gt;
 DR8 release brickid objid: DISTINCT(1.694.230.368) TOTAL(1.694.230.368)&lt;br /&gt;
 DR8 brickid objid:         DISTINCT(1.654.429.115) TOTAL(1.694.230.368)&lt;br /&gt;
 &lt;br /&gt;
 PHZ release brickid objid: DISTINCT(1.646.664.729) TOTAL(1.646.664.897)&lt;br /&gt;
 PHZ brickid objid:         DISTINCT(1.608.841.582) TOTAL(1.646.664.897)&lt;br /&gt;
 &lt;br /&gt;
 DR8: 							 1.694.230.368&lt;br /&gt;
 PHZ: 							 1.646.664.897&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
       			  				   -47.565.471‬&lt;/div&gt;</summary>
		<author><name>Tallada</name></author>
	</entry>
</feed>