LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-19-2006, 02:40 AM   #1
shawnbishop
Member
 
Registered: Dec 2005
Location: South Africa
Distribution: CentOS,Ubuntu,Fedora
Posts: 249

Rep: Reputation: 30
Script as a backup Solution


Good Day

I have the following problem,I have a SAMBA Server with multiple directories on the server.I want to backup almost 300GB daily,and this is where I have the following problem.

THe directory structure is as follows

/pub/job100/AR - Architect of record
/pub/job100/EE - Electrical Engineer
/pub/job100/ID - Interior Design

/pub/job200/AR - Architect of record
/pub/job200/EE - Electrical Engineer

and so forth. We have multiple jobs,upto 20,but I only want to backup the AR - Architect of Record Directory,as all the other directories are not neccessary.Now sometimes the directory structure has an extra "layer" eg

/pub/job300/Drawings/AR - Architect of Record.

Could somebody show me how to write a script so that I can only backup the AR - Architect of Record directories?

Cheers
 
Old 03-19-2006, 04:07 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
How about this:
for DIR in `find /pub -type d -name AR`; do
#your backup process goes here e.g.
rsync -a /$DIR/ /backup/directory/$DIR/
done
 
Old 04-12-2006, 09:23 AM   #3
shawnbishop
Member
 
Registered: Dec 2005
Location: South Africa
Distribution: CentOS,Ubuntu,Fedora
Posts: 249

Original Poster
Rep: Reputation: 30
Good Day

I have tried the above and it didnt work,can somebody help me...

REgards
 
Old 04-14-2006, 09:39 PM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Quote:
I have tried the above and it didnt work
A little more information would help.
 
  


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
Backup Solution aerogate Mandriva 2 02-20-2006 05:37 PM
Backup Solution Hexane Linux - General 6 01-23-2005 05:26 AM
Backup solution Dannydy Linux - Newbie 5 10-12-2004 03:22 AM
What is the best solution for backup? jml75 Linux - Hardware 2 07-25-2004 09:50 AM
Looking for a backup solution Seventh Linux - Software 2 04-27-2004 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:10 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
Open Source Consulting | Domain Registration