bash script - linux

Web, Mobile & Software Dev Scripts & Utilities Posted 3 years ago


Hours to be determined
Less than 1 week

Start Date

April 23, 2013


Simple bash code to insert the verbose output of lftp into mysql.


lftp -u username,password ftphost << EOF
mirror -Re --use-cache /home/ /backup/
mirror -Re --use-cache /etc/ /backup/
mirror -Re --use-cache /var/www/ /backup/
quit 0

Using shell script to insert data into remote MYSQL database

mysql --host=randomhost --user=randomuser --password=randompass randomdb
insert into table (field1,field2,field3) values('$hash','$file','$size');

Couple of other things;

- script needs to run every X minutes, however, should not run if already running
- perhaps mysql batch insert?
- ideally some knowledge/experience of lftp commands would be very useful

Thank you.

Skills: server-administration, linux

  • Other Skills:

Activity on this Job

Last Viewed by Client: 3 years ago

Invites Sent: 12

Unanswered Invites: 0

Hired: 1

About the Client

(5.00) 36 reviews

St Johns 04:26 PM

87 Jobs Posted
61% Hire Rate, 1 Open Job

Over $10,000 Total Spent
56 Hires, 2 Active

$10.05/hr Avg Hourly Rate Paid
752 Hours

Member Since Jan 28, 2011