LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 05-06-2009, 04:03 PM   #1
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 16
Thanked: 0
Post FTP Upload Scripts Using lftp


[Log in to get rid of this advertisement]
I just finished makes some upload scripts to facilitate some command-line uploading. I send many files to the same ftp server over and over and just wanted to make things a little more streamline. I wanted to just sends some files or directories up at a slow upload and have an email sent to me when it's done, whether hours, days, or weeks later.

Requires: lftp a rather wonderful command-line ftp client. I was searching for a command-line ftp client that would throttle uploads and I found this and have been using it ever since. It also has a mirror command that will mirror from local (upload) or mirror a remote directory. This is extremely useful when uploading directories with sub directories and files, since you would have to make any directories on the remote site if they did not exist (uploading). Plus probably useful for backup purposes since it can delete files on the remote if no longer on the local site.

You will need to edit the configuration section in the script you wish to use with your email, and ftp info...

Anyways, hope it helps or can just be a reference for your bash scripting delight

Files:
> uploadFiles(.txt)
- usage: uploadFiles uploadDirectory file [file]* [--email] [--limit-rate=rate]
* uploadDirectory: directory to upload files to, will not create if does not exist
* file [file]*: list of files separated by spaces
* --limitRate: set rate to upload max in B/s
* --email: emails $EMAIL_ADDRESS when upload is complete, see configuration section
- uploads the given files to the specified directory on the remote site

> mirrorLocal(.txt)
- usage: mirrorLocal localDirectory remoteDirectory [limitRate] --email
* localDirectory: the local directory to mirror on the remote site
* remoteDirectory: the remote directory name that will be a mirror of localDirectory, will create remoteDirectory if it does not exist
* limitRate: set rate to upload max in B/s
* --email: emails $EMAIL_ADDRESS when upload is complete, see configuration section
-uploads an uploadDirectory to remoteDirectory

> common.bash(.txt)
- an include file that should remain in the same directory as one of the scripts above
Attached Files
File Type: txt uploadFiles.txt (3.9 KB, 16 views)
File Type: txt mirrorLocal.txt (2.9 KB, 6 views)
File Type: txt common.bash.txt (2.0 KB, 7 views)

Last edited by pricejm; 05-06-2009 at 04:07 PM.. Reason: Attached files...
pricejm is offline  
Tag This Post , , , ,
Reply With Quote
Old 06-12-2009, 09:08 AM   #2
linenoise88
LQ Newbie
 
Registered: Jun 2009
Posts: 2
Thanked: 0
Is it just me? I can't access the scripts posted here. Trying to open it, but it says I can't access them. I'm able to make this post so I am logged in and activated. Maybe a post of the file contents instead of an attachment would work.

Sam
linenoise88 is offline     Reply With Quote
Old 08-17-2009, 11:00 AM   #3
MungoH
LQ Newbie
 
Registered: Aug 2006
Distribution: debian
Posts: 1
Thanked: 0
me too - although hopefully posting something enables permissions on my site account...
MungoH is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lftp to upload file pritisolanki Linux - Newbie 2 03-20-2009 08:59 AM
Is there an ftp program that allows for multi-thread ftp uploads ? Want faster upload brjoon1021 Linux - Software 4 02-04-2009 07:28 PM
lftp upload sycamorex Linux - Networking 9 04-24-2008 06:13 PM
Php upload createdir deldir set of scripts nx5000 Programming 3 12-11-2007 11:52 AM
FTP upload hinetvenkat Linux - Software 3 06-02-2005 10:34 PM


All times are GMT -5. The time now is 06:02 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration