[HowTo] Backup Your Files And Upload To HotFile Or Rapidshare

There are lots of File server service in the internet. You can host your files for free. The biggest 2 are Rapidshare and Hotfile. They both offer free service to host your file. And for hotfile offer you affiliate that you can earn money per 1000 downloaded file. But for now i will talk about backing up your files using Rapidshare or Hotfile.

I got this script from WJunction, and i feel it is a great script to share with you and this is a free script developed by the community. All the rights is belong to the respective owner and community.

Copy this scripts:

if [ $# -ne 2 ]
  size=$((100 * 1024))
  size=$(($2 * 1024))
  rar a -m0 -v"$size"k $rarfile $1
  echo $rarfile >> rarNupload.log

if [ $2 ]; then
while [ $part -le 10 ]
    if [ -f ${file%.*}_your-site.com.${file##*.}.part$part.rar ];
       echo "Uploading" ${file%.*}_your-site.com.${file##*.}.part$part.rar "to RS"
        perl rsapiresume.pl ${file%.*}_your-site.com.${file##*.}.part$part.rar col rsUserName rsPassword
       echo "Uploading" ${file%.*}_your-site.com.${file##*.}.part$part.rar "to HF"
        curl -T ${file%.*}_your-site.com.${file##*.}.part$part.rar ftp.hotfile.com --user hfUserName:hfpassword
        rm ${file%.*}_your-site.com.${file##*.}.part$part.rar
       echo "File $FILE does not exists"
part=`expr $part + 1`
  echo "Uploading" $rarfile "to RS"
    perl rsapiresume.pl $rarfile col rsUserName rsPassword
  echo "Uploading" $rarfile "to HF"
    curl -T $rarfile ftp.hotfile.com --user HFUsername:hfpassword
  rm $rarfile

Save it as uploadFileRapidHotfile.sh

Or download the script

Changes to be made throughout the whole script
your-site.com: your hostname
rsUserName: your rapidshare username
rsPassword: your rapidshare password
hfUserName: your Hotfile username
hfPassword: your Hotfile password

How to use the script:

./uploadFileRapidHotfile.sh "file to be compressed" "Number of MB"

“file to be compressed”: path to the file name. Only work with 1 files only.
“Number of MB”: File size to be splitted in MB.


  1. laowei says:

    there‘s an program called file & image uploader,it can upload files to many file hostings,including hotfile。but free version can’t upload to account。

  2. Rapidshare change their system recently, i don't think that code is still functioning well. But upload to hotfile still working good. Check my new post about backup your website to hotfile as well.

  3. ryuk says:

    umm i dont really understand how to use the script? do we have to upload it to our site or what? please explain more in detail

  4. Yes you have to upload it to your server. And make it executable permission.
    You can run it via cron or ssh.

  5. Buzzknow says:

    cool, its really nice bash script to remote backup 🙂


Give me your feedback

This site uses Akismet to reduce spam. Learn how your comment data is processed.