Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Help finding a Unix friendly RAID 1 backup Post 302522986 by Corona688 on Tuesday 17th of May 2011 12:09:13 PM
Old 05-17-2011
Glad it worked for you.

I needed to do some more research into rsync, I hadn't used it lately, but understand it a bit better now.

If you want to synchronize the contents of the two drives, I'd stick to just updating the /home/ partition, that seems to be where all the changing data is kept:
  1. Plug in the USB drive, and run fdisk -l to see what it shows up as. Your internal disk showed up as sda, so I suspect the external will show up as sdb, but best not to assume.
  2. Mount the external drive's home directory onto /mnt/external. To do this, mkdir -p /mnt/external ; mount /dev/sdb6 /mnt/external.
  3. Use rsync to copy new files to the drive. rsync --dry-run -r -a -H /home/ /mnt/external
  4. Optionally, if you want, use rsync to delete files from /mnt/external that no longer exist in /home/ rsync --dry-run -r --delete -a -H /home/ /mnt/external
  5. umount /mnt/external && sync wait for it to finish and then it will be safe for you to remove the USB drive, if you want to.
Note how I'm doing
Code:
rsync ... /path/ /path2

Having the exact right number of slashes is crucial.

Also, for the record, the various flags I'm giving it have these meanings:
Code:
-r    Recursively, so it checks folders in folders in folders
--dry-run    Only says what it's copying or deleting and doesn't actually do it!
                  Remove when you're confident it's copying what you want where you want.
--delete      Removes files not found in the source from the destination
-a               Preserves many things like ownership and timestamps
-H              Preserves hard links.  May not be necessary, and may improve performance to leave out.


Last edited by Corona688; 05-17-2011 at 01:14 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

RAID Unix command

Is there a command used to determine whether or not a machine has been RAIDed besides using 'df -k'. I am interested b/c I am writing a script where I would like to receive some sort of notification as to whether or not a machine has been RAIDed. The simpler the info returned back, the better. ... (2 Replies)
Discussion started by: zuinc
2 Replies

2. UNIX for Advanced & Expert Users

Unix Sco 5.0.7 Raid Problems

Hello there guys , I have this problem , i have this hp smart array 641 raid card and i'm trying to install sco unix 5.0.7 and is says no root disk found right before the instalation is about to start. I know that you have to load the driver befor the install bud i really cannot find the... (0 Replies)
Discussion started by: josramon
0 Replies

3. HP-UX

RAID 0 on Unix

I was wanting to know if anyone knew how to setup RAID 0 on an old HP Unix server. It's for where I work and my boss has two hard drives and wants the second to take over if the first one fails hence RAID 0. If anyone could help me it would be greatly appreciated. (5 Replies)
Discussion started by: zmachine04
5 Replies

4. UNIX for Advanced & Expert Users

User friendly Unix ksh prompt to type directories/files

Hello, I wanted to setup user friendly ksh command prompt, by typing first character of files or directories and then tab bring up whole word. No need to type whole file/directory/command names. Example: cat a file like university just typing un and then tab bring up whole university wod.... (3 Replies)
Discussion started by: abdurrouf
3 Replies

5. Shell Programming and Scripting

Converting MSVC /showInclude to unix friendly path

Hi guys, I've been trying to do this for hours, and I've just been running around in circles trying to get this script made. I have a set of files outputted by an MSVC compiler that looks like this 1> helloworld.cpp 1> Note: including file: c:\dev\test\makefile\source\helloworld.h 1> ... (7 Replies)
Discussion started by: krad
7 Replies

6. AIX

SCSI PCI - X RAID Controller card RAID 5 AIX Disks disappeared

Hello, I have a scsi pci x raid controller card on which I had created a disk array of 3 disks when I type lspv ; I used to see 3 physical disks ( two local disks and one raid 5 disk ) suddenly the raid 5 disk array disappeared ; so the hardware engineer thought the problem was with SCSI... (0 Replies)
Discussion started by: filosophizer
0 Replies

7. Red Hat

RAID Configuration for IBM Serveraid-7k SCSI RAID Controller

Hello, I want to delete a RAID configuration an old server has. Since i haven't the chance to work with the specific raid controller in the past can you please help me how to perform the configuraiton? I downloaded IBM ServeRAID Support CD but i wasn't able to configure the video card so i... (0 Replies)
Discussion started by: @dagio
0 Replies

8. SCO

Backup/RAID of HD on Old UNIX Server

I need to be able to make a backup image of an OLD UNIX server HD where I can restore the complete HD from scratch if (when) the HD fails. This server runs the accounting system for a company. I can and have backed the data up via local FTP, but O/S and Apps are so old that I am not sure I could... (21 Replies)
Discussion started by: chrishouse
21 Replies

9. What is on Your Mind?

Mobile Friendly Version of UNIX.COM

Hello, I have noticed some problems with Google complaining our site is not "https://search.google.com/www.usearch-console/mobile-friendly" using only Tapatalk. So, after a lot of work, I have re-enabled our legacy mobile style and make some improvements and Google has declared us "mobile... (2 Replies)
Discussion started by: Neo
2 Replies
DB2BAK(8)						      System Manager's Manual							 DB2BAK(8)

NAME
db2bak - Directory Server script for making a backup of the database SYNOPSIS
db2bak [archivedir] [-Z serverID] [-q] [-h] DESCRIPTION
Creates a backup of the database. This script can be executed while the server is running or stopped. OPTIONS
A summary of options is included below: archivedir The full path to the directory to store the backup. -Z Server Identifier The server ID of the Directory Server instance. If there is only one instance on the system, this option can be skipped. -q Quiet mode. Reduces output of task. -h Display the usage. EXAMPLE
db2bak -Z instance2 Makes a backup of the entire database for 'instance2', and stores it in the default server instance backup directory. db2bak /LDAP/backups/20130305 Creates a backup of the database and stores it in specified location. DIAGNOSTICS
Exit status is zero if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error. AUTHOR
db2bak was written by the 389 Project. REPORTING BUGS
Report bugs to http://bugzilla.redhat.com. COPYRIGHT
Copyright (C) 2013 Red Hat, Inc. Mar 5, 2013 DB2BAK(8)
All times are GMT -4. The time now is 06:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy