First - Set an External Password for your Box Account
You'll only need to complete the following steps once:
- Set up an "external password" on your UCSB Box account. This enables your account to be accessed via methods other than single sign-on, such as via the FTPS protocol.
- Log into your Box account (https://ucsb.account.box.com/login).
- From the dropdown menu with your name, near the upper right, select Account Settings.
- Scroll down to the Create External Password section.
- Click the Edit Password link.
- Follow the onscreen prompts to create and save your external password. Note the password does NOT have to be your UCSBnetID/Box password.
To mirror a local directory to Box it's generally easiest to create a script that connects to box and handles the lftp commands. Using your favorite editor create a script that looks like:
lftp -c 'open -e "set ftps:initial-prot ""; \
set ftp:ssl-force true; \
set ftp:ssl-protect-data true; \
open ftps://ftp.box.com:990; \
user email@example.com; \
mkdir myfolder; \
mirror --reverse --delete --no-perms --verbose "/home/username/myfolder" myfolder;" '
This forces encryption and creates the remote directory. You'll have to enter the external password you created. Note that you should be careful with lftp as it will delete items. If 'myfolder' already exists, you don't need to create it again. You might want to make your script executably by issuing a:
chmod 700 myscriptname
Also note that UCSB's data transfer rate to Box is limited and pretty slow.