https://docs.uabgrid.uab.edu/w/api.php?action=feedcontributions&user=Emuwang%40uab.edu&feedformat=atomCheaha - User contributions [en]2024-03-29T14:31:08ZUser contributionsMediaWiki 1.38.2https://docs.uabgrid.uab.edu/w/index.php?title=Box.com_bulk_transfer&diff=5741Box.com bulk transfer2018-05-04T15:53:05Z<p>Emuwang@uab.edu: </p>
<hr />
<div>UAB has an Enterprise contract with Box.com, which is currently in BETA. <br />
<br />
This page describes what we have learned about doing bulk-transfers of data. <br />
<br />
== Warning: size limitations ==<br />
<br />
Box.com claims to have a '''''5G max filesize''''' limit<br />
* Now '''''15G max filesize''''' (2/18/016; private email), but "that file size limit is still considered to be in a beta phase"<br />
<br />
<br />
There was a rumor this would be increased in early 2016. <br />
Offically, this is all we know: https://community.box.com/t5/Managing-Your-Content/What-s-the-maximum-file-size-I-can-upload/ta-p/307<br />
<br />
If you need to work around this, you can use the Linux "[http://ss64.com/bash/split.html split]" utility<br />
<br />
{| class="wikitable"<br />
|-<br />
| # chop file into 4G pieces <br /><br />
split \<br /><br />
--bytes=4000m \<br /><br />
big_file.fastq.gz \<br /><br />
big_file.fastq.gz.split4g.<br /><br />
|-<br />
| # record checksums of original and chunks<br /><br />
md5sum \<br /><br />
big_file.fastq.gz \<br /><br />
big_file.fastq.gz.split4g.* \<br /><br />
> big_file.fastq.gz.md5<br />
|}<br />
<br />
== Warning: time stamps ==<br />
<br />
When using an FTP client to transfer data up, it is easy to lose both modification and creation timestamps. In particular, many clients will (optionally) preserve modification time, but few will (optionally) preserve creation date. <br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! FTP client<br />
! cost<br />
! platform<br />
! preserve mod_date<br />
! preserve create_date<br />
|-<br />
| lftp<br />
| free<br />
| linux/cmd_line<br />
| yes<br />
| no<br />
|-<br />
| SmartFTP<br />
| $$<br />
| Win Only/GUI<br />
| yes<br />
| can be enabled<br />
|-<br />
| fileZilla<br />
| free<br />
| linux & win/GUI_only<br />
| can be enabled<br />
| [https://trac.filezilla-project.org/ticket/2347 no]<br />
|-<br />
| ftp_ssl<br />
| free<br />
| linux/cmd_line<br />
| yes<br />
| no<br />
|}<br />
<br />
Filezilla on create times<br />
* request closed, no plans to fix: https://trac.filezilla-project.org/ticket/2347<br />
<br />
== Warning: Shared-to-you folders can't be moved ==<br />
<br />
If someone creates a folder and shares it to you (as an reader, editor, co-owner, etc), it will live in your top level directory, and you will NOT be able to move it into any subfolder. <br />
<br />
"Currently, users can't rearrange their own view of folders they are invited to collaborate within. As you note, when someone invites you to collaborate in a folder that you have never had access to before, you will see that folder on your root level." [box.com]<br />
<br />
'''Workaround''': if your collaborator makes you the full owner of the folder, then you will be able to move it. <br />
<br />
'''Fix timeframe''': "We've heard requests that people be able to rearrange their views before, and this is being considered as part of a larger product experience change next year" [box.com]<br />
<br />
== lftp mirror -R examples (UPload) ==<br />
<br />
lftp mirror<br />
* "mirror" copies directory hierarchies DOWN from box.com to local<br />
* "mirror -R" copies directory hierarchies UP from local to box.com<br />
<br />
error handling<br />
* the box server frequently looses connection (fails) on particular files<br />
* just re-run the "mirror -R" and it will upload only new/failed files..<br />
<br />
=== Interactive lftp ===<br />
{| class="wikitable" border="1"<br />
|-<br />
| lftp ftp.box.com<br /><br />
> user ''BLAZERID''@uab.edu ''users_BOX_external_password''<br /><br />
> mirror --parallel=10 -R ''local_src_dir'' ''box_dest_dir''<br />
|}<br />
<br />
=== Single-line lftp (non-shared box) ===<br />
<br />
'''Warning''': This one makes the password visible to "ps" so should only be used on personal machines<br />
{| class="wikitable" border="1"<br />
|-<br />
| lftp -u ''BLAZERID''@uab.edu,''users_BOX_external_password'' ftp.box.com << EOF<br /><br />
mirror --parallel=10 -R ''local_src_dir'' ''box_dest_dir''<br /><br />
EOF<br />
|}<br />
<br />
=== scripted lftp ===<br />
{| class="wikitable" border="1"<br />
|- <br />
| cat > box_upload.lftp << EOF<br /><br />
open ftp.box.com<br /><br />
user ''BLAZERID''@uab.edu ''users_BOX_external_password''<br /><br />
mirror --parallel=10 -R ''local_src_dir'' /''box_dest_dir''<br /><br />
EOF<br /><br />
chmod 700 box_upload.lftp<br /><br />
lftp -f box_upload.lftp ; echo lftp_RC=$?<br />
|}<br />
<br />
=== scripted lftp - externalize password ===<br />
<br />
file ~/.netrc contains your box external password once (works for wget, lftp, etc)<br />
{| class="wikitable" border="1"<br />
|- <br />
| cat >> ~/.netrc << EOF<br /><br />
machine ftp.box.com<br /><br />
login ''BLAZERID''@uab.edu<br /><br />
password user_Box_External_PW <br /><br />
<br /><br />
EOF<br /><br />
<br /><br />
chmod 700 ~/.netrc<br /><br />
|}<br />
<br />
then for each transfer, you create a local .lftp file w/o a password. <br />
Much more secure and easy to keep up to date. <br />
{| class="wikitable" border="1"<br />
|- <br />
| cat > box_upload.lftp << EOF<br /><br />
open ftp.box.com<br /><br />
mirror -R ''local_src_dir'' /''box_dest_dir''<br /><br />
EOF<br /><br />
<br /><br />
lftp -f box_upload.lftp ; echo lftp_RC=$?<br />
|}<br />
<br />
== lftp mirror examples (DOWNload) ==<br />
<br />
=== scripted lftp ===<br />
<br />
Arguments<br />
* --loop keep restarting until there are no new files left to download - helps if someone else is uploading to that directory while you're downloading it!<br />
* -v verbose level 1: includes bytes transferred and transfer speed. <br />
* --parallel=10 use 10 concurrent TCP/IP connections (much faster)<br />
{| class="wikitable" border="1"<br />
|- <br />
| cat > box_download.lftp << EOF<br /><br />
open ftp.box.com<br /><br />
user ''BLAZERID''@uab.edu ''users_BOX_external_password''<br /><br />
mirror --loop -v --parallel=10 /''box_remote_src_dir'' ''local_dest_dir''<br /><br />
EOF<br /><br />
chmod 700 box_download.lftp<br /><br />
lftp -f box_download.lftp ; echo lftp_RC=$?<br />
|}<br />
<br />
== Issues to resolve ==<br />
<br />
* Routing over Iternet2<br />
* we see our traffic randomly going over the commodity internet<br />
<br />
== Linux Support ==<br />
Unfortunately, Box doesn't provide a Linux client (is it on the road map?).</div>Emuwang@uab.edu