Could You please explain what exactly that line means:<br><br># dump 0f - / | (cd /seconddisk; restore -rf -)<br><br>You are very helpful.<br><br>With regards,<br>R.<br><br><div class="gmail_quote">2009/6/21 Robert Heller <span dir="ltr"><<a href="mailto:heller@deepsoft.com">heller@deepsoft.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">At Sun, 21 Jun 2009 15:06:35 +0200 CentOS mailing list <<a href="mailto:centos@centos.org">centos@centos.org</a>> wrote:<br>

<br>
><br>
><br>
><br>
> I think about using dd instead of dump? Is this an acceptable idea?<br>
<br>
</div>*NO!*.  dd is NOT a proper backup tool...  I don't know where the idea<br>
that it is comes from (probably some really old UNIX sys admin book or<br>
something). dd has many uses, but it is not normally considered a<br>
backup tool.  Dump is a perfectly acceptable backup tool.  Dump was<br>
*designed* as the backup tool of choice. And it works just fine on a<br>
read-write file system, with the *standard* disclaimer that if used on<br>
a file system that is 'active', it (*like all backup tools*) will miss<br>
files that are being created/writen to during the backup.  Generally,<br>
the missed files will be gotten on a later backup.  On a normal, typical<br>
system, one would run the full backup at a 'quiet' time (a time frame<br>
of low activity, with the idea of avoiding having the backup interfere<br>
with normal activities and of normal activities interfering with the<br>
backup. On a typical normal system, the missed files will likely be<br>
things like the tail end of log files or various trasienent files (like<br>
mail queue files and the like).<br>
<br>
If you want a non-live mirror on the second does do this:<br>
<br>
Pick a 'quiet' time (say on a quiet Sunday morning) and do this:<br>
<br>
(Assume that /dev/sdb1 is the sole partition on the second disk):<br>
<br>
# mkfs.ext3 -L SecondDisk /dev/sdb1<br>
# mkdir /seconddisk<br>
# mount -v -t ext3 LABEL=SecondDisk /seconddisk<br>
# dump 0f - / | (cd /seconddisk; restore -rf -)<br>
<br>
At this point pick out a good book to read and get comfortable and read<br>
a chapter or three or you can do whatever you would do to kill some time<br>
-- ie go for a walk (or walk the dog), play a game of hoops or go for a<br>
swim or whatever.  I am assuming that the disk is probably good sized,<br>
so full dump may take some time.  You could stare at the screen for an<br>
hour, if that floats your boat...  Dump will display a progress report<br>
every 5 minutes.<br>
<br>
# umount -v /seconddisk<br>
<br>
Now create a script (Let's call it '/usr/local/sbin/dailybackup'):<br>
<br>
<br>
#!/bin/sh<br>
/sbin/e2fsck -C -T -a LABEL=SecondDisk<br>
mount -v -t ext3 LABEL=SecondDisk /seconddisk<br>
rsync -v -a -x -H --delete --delete-after --exclude=lost+found/ / /seconddisk<br>
umount -v /seconddisk<br>
<br>
<br>
<br>
# chmod +x /usr/local/sbin/dailybackup<br>
<br>
Now create a daily cron job:<br>
<br>
# crontab -e<br>
<br>
Add the line:<br>
<br>
10 0 * * * /usr/local/sbin/dailybackup<br>
<br>
<br>
And you are all set.  Once a day an 10 past midnight, the backup disk<br>
will be sync'ed to the live system disk.  Every morning you will get a<br>
message from cron with the output.<br>
<br>
If you really want to, you can change the '0' above to '0,6,12,18' and<br>
the sync'ing will happen every 6 hours.  This is *probably* overkill.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
><br>
> 2009/6/21 Robert Heller <<a href="mailto:heller@deepsoft.com">heller@deepsoft.com</a>><br>
><br>
> > At Sun, 21 Jun 2009 11:49:09 +0200 CentOS mailing list <<a href="mailto:centos@centos.org">centos@centos.org</a>><br>
> > wrote:<br>
> ><br>
> > ><br>
> > ><br>
> > ><br>
> > > Hi all. I'm currently having a following problem: I have only ssh<br>
> > connection<br>
> > > to a CentOS 5.2 system, there are two harddiscs on it. One stores the<br>
> > system<br>
> > > (/ filesystem) and the other should be used to help restore the system in<br>
> > > case of first disks' failure. I thought that maybe dump would be a good<br>
> > > utility to make it. But in only works on read-only filesystems. In one<br>
> ><br>
> > Dump works just fine on a read-write file system.  There is the pretty<br>
> > much standard limitation (that applies to *all* backup methods) that<br>
> > when backing up an 'active' file system: there will always be files that<br>
> > will miss the backup because they were being written during the backup<br>
> > process.<br>
> ><br>
> > > article I've read that making a snapshot of the / filesystem (then it<br>
> > > wouldbe read-only) and backing it could help. But aren't snapshots<br>
> > limited<br>
> > > to logical volumes (LVM)?  My friend told me to use rsync to back up the<br>
> > > entire / filesystem to the second disk and then in case o failure the<br>
> > system<br>
> > > from the copy should boot ok.<br>
> > ><br>
> > > Could anyone provide any suggestions? I don't have physical contact with<br>
> > the<br>
> > > machine so for example RAID 1 isn't a possible option/<br>
> > ><br>
> > > Any help will be very kindly appreciated.<br>
> ><br>
> > Make an initial dump to get the base system copied, then set up a cron<br>
> > job to sync the disks once a day (or more frequently) with rsync.<br>
> ><br>
> > ><br>
> > > With regards,<br>
> > > R.<br>
> > ><br>
> > > MIME-Version: 1.0<br>
> > ><br>
> > > _______________________________________________<br>
> > > CentOS mailing list<br>
> > > <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
> > > <a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
> > ><br>
> > ><br>
> ><br>
> > --<br>
> > Robert Heller             -- 978-544-6933<br>
> > Deepwoods Software        -- Download the Model Railroad System<br>
> > <a href="http://www.deepsoft.com/" target="_blank">http://www.deepsoft.com/</a>  -- Binaries for Linux and MS-Windows<br>
> > <a href="mailto:heller@deepsoft.com">heller@deepsoft.com</a>       -- <a href="http://www.deepsoft.com/ModelRailroadSystem/" target="_blank">http://www.deepsoft.com/ModelRailroadSystem/</a><br>
> ><br>
> > _______________________________________________<br>
> > CentOS mailing list<br>
> > <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
> > <a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
> ><br>
><br>
> MIME-Version: 1.0<br>
><br>
> _______________________________________________<br>
> CentOS mailing list<br>
> <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
> <a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
><br>
><br>
<br>
--<br>
Robert Heller             -- 978-544-6933<br>
Deepwoods Software        -- Download the Model Railroad System<br>
<a href="http://www.deepsoft.com/" target="_blank">http://www.deepsoft.com/</a>  -- Binaries for Linux and MS-Windows<br>
<a href="mailto:heller@deepsoft.com">heller@deepsoft.com</a>       -- <a href="http://www.deepsoft.com/ModelRailroadSystem/" target="_blank">http://www.deepsoft.com/ModelRailroadSystem/</a><br>
<br>
_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div><br>