Re: backup home directories
- From: "SA_IT" <scott.elfman@xxxxxxxxxxxxxxxxxx>
- Date: 27 Apr 2006 13:46:46 -0700
If I have 50 user directory's and specify 4 threads, then only 4
backups should run at any given time.
We would like to use Korne, Borne, or Bash to do this.
Thanks again for all your help.
Chris F.A. Johnson wrote:
On 2006-04-27, SA_IT wrote:
We are looking to backup our users home directory's on an individual
directory basis, but we want to thread it such that we can backup 'n'
number of user directory's at the same time. Basically the script
should go get the list of user directory's and then kick off 'n'
number of subprocesses to backup the first 'n'directory's. Once any
one of the subprocesses completes that process should get the next
directory in the list. This loop should continue until all directory's
have been processed.
Any scripting language, but C shell.
for dir in /home/*/ ## or custom list of directories
do
backup_script "$dir" &
done
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, is written for the POSIX locale
===== and is released under the GNU General Public Licence
.
- Follow-Ups:
- Re: backup home directories
- From: Chris F.A. Johnson
- Re: backup home directories
- References:
- backup home directories
- From: SA_IT
- Re: backup home directories
- From: Chris F.A. Johnson
- backup home directories
- Prev by Date: Re: grabbing 1st 5 char of a string
- Next by Date: Re: grabbing 1st 5 char of a string
- Previous by thread: Re: backup home directories
- Next by thread: Re: backup home directories
- Index(es):
Relevant Pages
|
|