Copying files to/from UT Box at the command lineIf you use SSO (through UT Box), you need to first set up an external password![]() ![]() ~/.lftp/rc in a text editor. (You may need to first create the ~/.lftp folder if it does not exist. Strictly speaking, this step is optional. You could run these commands every time you enter the LFTP shell to temporarily set the options.)
Add these lines to the ~/.lftp/rc file.
set ftps:initial-prot "" set ftp:ssl-force true set ftp:ssl-protect-data true lftp ftps://ftp.box.com:990 lftp ftp.box.com:~> user YYY@XXX.utexas.edu ![]()
mirror -R {local dir} {remote dir} {remote dir} if it has been deleted in {local dir} since the last backup. You would need to add the --delete flag for that type of sync, but be very careful when doing so! You can use the --dry-run option to see what would have been deleted before running it.
Note: Sometimes you may get an error looking like this during a mirror -R call. The file has been successfully transferred despite this message!
mirror: Access failed: 550 Box: Item with the same name already exists (code=item_name_in_use, request_id=XXXXXXXXXXXXXXX). (FILENAME) module load gcc glob pget */*.gz pget-chunk: B-A1/B-A1_R1.fastq.gz: seek failed for each file once each file transferred.
To recursively copy directories FROM BOX, you will need this command:
mirror ![]() Creating a Bookmark File | ||||||||
Changed: | ||||||||
< < | This only works if you are UT-affiliated. You need to first set up an external password![]() | |||||||
> > | This only works if you are UT-affiliated. | |||||||
Added: | ||||||||
> > | First, follow these instructions to set up an external password![]() | |||||||
Next, create a bookmark called utbox .
Security Note: this saves your external password in clear text in your home directory.
lftp ftps://ftp.box.com:990 set bmk:save-passwords yes | ||||||||
Changed: | ||||||||
< < | user YYY@XXX.utexas.edu | |||||||
> > | user [your_EID]@eid.utexas.edu | |||||||
[Enter Password] bookmark add utbox | ||||||||
Added: | ||||||||
> > | quit | |||||||
Then, you can log in using just one command!
lftp utbox | ||||||||
Added: | ||||||||
> > | Be sure to test your setup after logging in by running a command like `ls` because it will not give you an error if login failed! It should list all of your Box file. | |||||||
This is also the standard way that we make it possible to mass download data as part of brefito![]() |