LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2009, 10:14 AM   #1
unihiekka
Member
 
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273

Rep: Reputation: 32
backup laptop with rsync: online check


Hi!

I am writing my own anacron script that backs up my most important files from my laptop to my office pc regularly using rsync. However, sometimes my laptop is on when anacron starts the back-up job but my laptop is offline, so that it cannot rsync with my desktop. Is it possible to tell anacron to re-schedule the task to either the next time I'm online again or to some later date (preferably not the next scheduled time, but some time before)?

Thanks.
 
Old 12-31-2009, 10:21 AM   #2
briealeida
Member
 
Registered: Jun 2007
Location: PA
Distribution: FreeBSD, Ubuntu, Knoppix,
Posts: 41

Rep: Reputation: 16
You could possibly tell it to sleep, say, 1 hour and then try again.

Syntax for the sleep command is here:

http://ss64.com/bash/sleep.html
 
Old 01-01-2010, 07:07 AM   #3
unihiekka
Member
 
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273

Original Poster
Rep: Reputation: 32
Thought about that one, but the problem is that I'm sometimes in the train working without being online, so that the sleep command would not help very much, because afterwards it's switched off again. Thanks, though.
 
Old 01-01-2010, 07:36 AM   #4
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
you could have the script touch a file when it completes, then schedule the cron job to run every 5 minutes, but not to do anything unless the file you touched is more than n hours old.
 
Old 01-01-2010, 08:10 AM   #5
unihiekka
Member
 
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273

Original Poster
Rep: Reputation: 32
Thanks, I'll try that one!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dead Laptop RAM: How to backup files with Rsync? fragged Linux - Newbie 5 08-23-2009 02:43 PM
backup using rsync mkrems Linux - Software 6 04-04-2009 03:07 PM
rsync backup songeek Solaris / OpenSolaris 1 07-05-2007 08:01 AM
Using RSync to backup a secondary off-site backup server pezdspencer Linux - Software 4 06-29-2007 04:40 PM
Using rsync to backup data. Best way to backup folders? Micro420 Linux - General 2 11-23-2006 02:13 AM


All times are GMT -5. The time now is 06:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration