Jump to content

Script/Backup/FTP [solved]


Recommended Posts

Hi all,

 

I wonder if someone could help me with creating a script which will backup my .Mail folder & another non-hidden folder, then ftp it within my lan to another pc (ftp server - XP). I would like to automate this via say 'cron' to carry out the tack every night. Ive STF & googled, but its left me a little confused ( I have downloaded 'ncftp' & will have a little read of the man pages)..

 

TIA

 

EDIT:

 

Ok I've managed to create the above request. Here's what I did for anyone in a similair position.

 

I installed ncftp-3.1.8-1mdk.i586.rpm then created the following script

#!/bin/sh

DATETMP=`date +%Y-%m-%d-%H-%M-%S`
cd /home/user1
tar czf /home/user1/backup.tar-$DATETMP.gz \
       /home/user1/.Mail \
       /home/user1/documents \
       
ncftpput -u username -p password -V -DD ftp.name.com / /home/user1/mail-backup.tar-$DATETMP.gz

 

then I added this to cron. I have to add that this is not secure as the username & password will be sent over cleartext, & the file will reside on your PC. My situation is that I am protected by a hardware firewall & both PC's are on the lan (local & DMZ) so I'm not worried instance.

 

 

HTH

Edited by jaraeez
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...