Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-29-2007, 10:35 AM   #1
LQ Newbie
Registered: Sep 2006
Posts: 3

Rep: Reputation: 0
Every sunday running difference backup job.

Hi there, I would like to find out, how can I run a difference backup job on every sunday?
Let say, week 1 sunday I need to backup server A and B.
Week 2 sunday backup server C and D.
week 3 back to week 1 schedule backuping up server A nad B so and so on.

I there any way to do so?
Old 04-29-2007, 11:23 AM   #2
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Sure you can. You'll just need to write a script that performs the backup, and set it up as a cron job. You can have a simple text file, which the script will read, and in that text file, your can store the number of the week. Then after the backup is done, the script writes in the number of the next week.
Old 05-01-2007, 10:01 AM   #3
LQ Newbie
Registered: Sep 2006
Posts: 3

Original Poster
Rep: Reputation: 0

d=`date +%d`
m=`expr \( $d - 1 \) / 7`
case $m in
0) echo "1st week in this month";; #<<<<<<<
1) echo "2nd week";;
2) echo "3rd week";;
3) echo "4th week";;
4) echo "5th week";;


does it help?


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
[SOLVED] Scheduling a CRON job to run on the first Sunday of the month New2Linux2 Linux - Software 10 11-08-2016 12:25 PM
Need suggestion on biweekly backup job cojo Linux - Software 12 11-06-2006 08:17 AM
How to improve my mysql backup cron job stardotstar Programming 8 05-25-2006 06:11 AM
cron backup job not running dsschanze Linux - General 9 07-29-2005 08:47 PM
cron job - backup medamnit Linux - Newbie 4 05-24-2002 03:37 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:01 AM.

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