Linux Newbie help
 help / color / mirror / Atom feed
From: "Eve Atley" <eatley@wow-corp.com>
To: Linux-Newbie <linux-newbie@vger.kernel.org>
Subject: Need help interpreting Backup Script
Date: Thu, 8 Apr 2004 14:47:31 -0400	[thread overview]
Message-ID: <GNEPLLCIIBHICCOGIAKPMEHPCJAA.eatley@wow-corp.com> (raw)
In-Reply-To: <20040408183547.96802.qmail@web11805.mail.yahoo.com>


I really have 3 questions here.
1. What is the backup script at the bottom of this email doing?
2. How can I add folders to this, or should I be creating a new script for
the seperate folders? If I add more folders to the same script, the backup
time is bound to increase, so I figure it's a tradeoff between having
multiple scripts vs. time.
3. As it appears this script is already backing up /home/shared, what does
the script tell me in terms of where I can find the backup?

Here's a more detailed explanation of 1 and 2.

1. and 2. Being new to Linux, I am trying to add to a backup script that
already exists. However, before I do so, I'd like to know more about what
it's doing, and where things are going. What I want to backup is linux
directory /home/shared, which it is doing; but I'd also like to backup /home
so that each individual user folder can be backed up as well.

The way I understand it is like so: /home/shared is being backed up on a
daily? basis. Is this correct? Should I write another script based on this
one that will copy the /home/ directories minus the shared directory?
--------------------------------------------------
With that said, here's the script. The only things I've changed is the
username & password.

Thanks,
Eve

#!/bin/sh
#backup_main: simple backup routine to be used with samba and bash cp.
#this one simply copies an entire directory recursively to an smb mount.
#
#written by RKL - 7/17/2003
mount -t smbfs -o
username=username,password=password,workgroup=workgroup
//BACKUP/backup /mnt/backup
&>/root/backup_scripts/logs/`date
+"MOUNT-%y-%m-%d.log"`
if [ -f /mnt/backup/connected ]; then
	rm -rf /mnt/backup/`date +"%A/"`
	mkdir /mnt/backup/`date +"%A/"`
	cp -r /home/shared/* /mnt/backup/`date +"%A/"`
1>/mnt/backup/logs/`date +"DAILY-%y-%m-%d.log"`
2>/mnt/backup/logs/`date +"DAILY-%y-%m-%d.err"`
	umount /mnt/backup  &>/root/backup_scripts/logs/`date
+"MOUNT-%y-%m-%d.log"`
fi

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

       reply	other threads:[~2004-04-08 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040408183547.96802.qmail@web11805.mail.yahoo.com>
2004-04-08 18:47 ` Eve Atley [this message]
2004-04-08 20:20   ` Need help interpreting Backup Script Ray Olszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=GNEPLLCIIBHICCOGIAKPMEHPCJAA.eatley@wow-corp.com \
    --to=eatley@wow-corp.com \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox