Merge pull request #465 from jasonc/http-status-code-change-fix
Allow for HTTP 2 Status Codes.
|7 months ago|
|.gitignore||2 years ago|
|CHANGELOG.md||3 years ago|
|Dockerfile||2 years ago|
|Dockerfile.pi||1 year ago|
|LICENSE||6 years ago|
|README.md||1 year ago|
|dropShell.sh||3 years ago|
|dropbox_uploader.sh||7 months ago|
|testUnit.sh||3 years ago|
Dropbox Uploader is a BASH script which can be used to upload, download, delete, list files (and more!) from Dropbox, an online file sharing, synchronization and backup service.
It’s written in BASH scripting language and only needs cURL.
You can take a look to the GiHub project page.
Why use this script?
cURL(curl is a tool to transfer data from or to a server, available for all operating systems and installed by default in many linux distributions).
Please refer to the Wiki for tips and additional information about this project. The Wiki is also the place where you can share your scripts and examples related to Dropbox Uploader.
First, clone the repository using git (recommended):
git clone https://github.com/andreafabrizi/Dropbox-Uploader.git
or download the script manually using this command:
curl "https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" -o dropbox_uploader.sh
Then give the execution permission to the script and run it:
$chmod +x dropbox_uploader.sh $./dropbox_uploader.sh
The first time you run
dropbox_uploader, you’ll be guided through a wizard in order to configure access to your Dropbox. This configuration will be stored in
The syntax is quite simple:
./dropbox_uploader.sh [PARAMETERS] COMMAND... [%%]: Optional param <%%>: Required param
upload <LOCAL_FILE/DIR …> <REMOTE_FILE/DIR>
Upload a local file or directory to a remote Dropbox folder.
If the file is bigger than 150Mb the file is uploaded using small chunks (default 50Mb); in this case a . (dot) is printed for every chunk successfully uploaded and a * (star) if an error occurs (the upload is retried for a maximum of three times). Only if the file is smaller than 150Mb, the standard upload API is used, and if the -p option is specified the default curl progress bar is displayed during the upload process.
The local file/dir parameter supports wildcards expansion.
download <REMOTE_FILE/DIR> [LOCAL_FILE/DIR]
Download file or directory from Dropbox to a local folder
Remove a remote file or directory from Dropbox
move <REMOTE_FILE/DIR> <REMOTE_FILE/DIR>
Move or rename a remote file or directory
copy <REMOTE_FILE/DIR> <REMOTE_FILE/DIR>
Copy a remote file or directory
Create a remote directory on Dropbox
List the contents of the remote Dropbox folder
monitor [REMOTE_DIR] [TIMEOUT]
Monitor the remote Dropbox folder for changes. If timeout is specified, at the first change event the function will return.
Get a public share link for the specified file or directory
saveurl <URL> <REMOTE_DIR>
Download a file from an URL to a Dropbox folder directly (the file is NOT downloaded locally)
search <QUERY> Search for a specific pattern on Dropbox and returns the list of matching files or directories
Print some info about your Dropbox account
space Print some info about the space usage on your Dropbox account
Unlink the script from your Dropbox account
Load the configuration file from a specific file
Skip already existing files when download/upload. Default: Overwrite
Enable DEBUG mode
Quiet mode. Don’t show progress meter or messages
Show file sizes in human readable format
Show cURL progress meter
Doesn’t check for SSL certificates (insecure)
Ignores/excludes directories or files from syncing. -x filename -x directoryname.
./dropbox_uploader.sh upload /etc/passwd /myfiles/passwd.old ./dropbox_uploader.sh upload *.zip / ./dropbox_uploader.sh -x .git upload ./project / ./dropbox_uploader.sh download /backup.zip ./dropbox_uploader.sh delete /backup.zip ./dropbox_uploader.sh mkdir /myDir/ ./dropbox_uploader.sh upload "My File.txt" "My File 2.txt" ./dropbox_uploader.sh share "My File.txt" ./dropbox_uploader.sh list
If you have successfully tested this script on others systems or platforms please let me know!
Dropbox Uploader relies on a different configuration file for each system user. The default configuration file location is
$HOME/.dropbox_uploader. This means that if you setup the script with your user and then you try to run a cron job as root, it won’t work.
So, when running this script using cron, please keep in mind the following:
To use a proxy server, just set the https_proxy environment variable:
export HTTP_PROXY_USER=XXXX export HTTP_PROXY_PASSWORD=YYYY export https_proxy=http://192.168.0.1:8080
setenv HTTP_PROXY_USER XXXX setenv HTTP_PROXY_PASSWORD YYYY setenv https_proxy http://192.168.0.1:8080
Debian & Ubuntu Linux:
sudo apt-get install bash (Probably BASH is already installed on your system) sudo apt-get install curl
cd /usr/ports/shells/bash && make install clean cd /usr/ports/ftp/curl && make install clean
You need to install these packages:
Before running the script, you need to convert it using the dos2unix command.
Build cURL from source:
DropShell is an interactive DropBox shell, based on DropBox Uploader:
DropShell v0.2 The Intractive Dropbox SHELL Andrea Fabrizi - firstname.lastname@example.org Type help for the list of the available commands. andrea@Dropbox:/$ ls [D] 0 Apps [D] 0 Camera Uploads [D] 0 Public [D] 0 scripts [D] 0 Security [F] 105843 notes.txt andrea@DropBox:/ServerBackup$ get notes.txt
First build the docker image:
docker build https://github.com/sircuri/Dropbox-Uploader.git -f Dockerfile -t <TAG>
or for RaspBerry:
docker build https://github.com/sircuri/Dropbox-Uploader.git -f Dockerfile.pi -t <TAG>
then, you can run it as following:
docker run -i --rm --user=$(id -u):$(id -g) -v <LOCAL_CONFIG_PATH>:/config -v <YOUR_DATA_DIR_MOUNT>:/workdir <TAG> <Arguments>
This will store the auth token information in the given local directory in
<LOCAL_CONFIG_PATH>. To ensure access to your mounted directories it can be important to pass a UID and GID to the docker deamon (as stated in the example by the --user argument)
Using the script with docker makes it also possible to run the script even on windows machines.
To use a proxy, just set the mentioned environment variables via the docker
thunar-dropbox: A simple extension to Dropbox Uploader that provides a convenient method to share your Dropbox files with one click!
If you want to support this project, please consider donating: