LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux 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



Reply
 
Search this Thread
Old 10-06-2004, 11:00 AM   #1
glenn69
Member
 
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Rep: Reputation: 32
Question How do I setup an auto backup to an email address?


I would like to have our system at the office do an automatic backup to an email address.

ex...every night at 8pm send a particular file to an email address as a backup.

I am using debian sarge setup as a file server. I do not have an email program setup on that machine, so suggestions would be helpful.

Thanks
 
Old 10-08-2004, 08:22 AM   #2
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
If it is just a text file you can set 'cron' or 'at' (see man pages, or google for tutorials) to run a command like

mail -s "my backup" whoever@wherever < my_precious_file

at specified times. If the file is binary it seems like you can do a similar thing to send it as an attachment, but you need 'mutt' instead

mutt -a my_precious_file whoever@wherever

Ref: http://mailman.u.washington.edu/pipe...er/005135.html
 
Old 10-08-2004, 10:18 AM   #3
glenn69
Member
 
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Original Poster
Rep: Reputation: 32
Thank You. I just needed to be pointed in the right direction.
 
Old 10-08-2004, 10:44 AM   #4
glenn69
Member
 
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Original Poster
Rep: Reputation: 32
I typed mail -s "m y backup" myaddress@wherever < "the name of the file"
now my screen simply displays < as the cursor. I cannot end it. I tried Ctrl+Z...nothing. What does it mean and how do i fix it.
 
Old 10-08-2004, 02:19 PM   #5
glenn69
Member
 
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Original Poster
Rep: Reputation: 32
I tried to send my file with mutt. It worke on the first file, however on the real backup file I was given an error that the ile was too large. The file I am trying to send is about 20MB and growing. What can I use to send it via cron?
 
Old 10-10-2004, 07:26 AM   #6
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
If you tried to send a binary file with 'mail' I would not be surprised at anything that happened.

A 20Mb file is pretty big for any email attachment. I guess it could run up against all sorts of limits at various stages of the transmission process. You could try and compress it with gzip or bzip2 (slower but more effective) to get it to a more reasonable size. Or you could split it up first. Or use some other strategy altogether.

What's best probably depends on the sort of connection you have between the two machines.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kmail and auto complete of email address in the TO field shazam75 Linux - Software 3 08-14-2013 01:17 PM
auto backup digity Linux - Software 2 09-07-2005 09:13 PM
Auto backup of www and mysql critical Linux - Software 6 08-18-2005 03:13 AM
Creating A Second Email Address For Email Account On Sendmail treedstang Linux - Software 1 04-27-2004 11:31 PM
sending an email to a email address after a perl operation meluser Programming 9 04-07-2003 02:26 PM


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

Main Menu
Advertisement
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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration