Koozali.org: home of the SME Server

Restoring individual files in SME 6.X

ralphd

Restoring individual files in SME 6.X
« on: October 08, 2004, 09:10:47 PM »
Hi everyone,

I'm looking to restore an individual file from a backup created on an SME 6.0 server.  The DMAY contrib for advanced restore procedures doesn't seem to work and I think it has to do with the method the backup is running in SME 6 has changed from 5.X.  (i.e. Tar vs dump???)  

Someone mentioned that it might be useful to mount the drive.  

Any ideas?

Thanks,

Ralph
rdickie@unr.ca

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Restoring individual files in SME 6.X
« Reply #1 on: October 09, 2004, 04:09:12 AM »
Ralphd,

Here is skinny on how to get this to work.

edit /sbin/e-smith/RestoreNow and replace with the following:

<snip>
#!/bin/sh

#------------------------------------------------------------
# copyright (C) 2001 DMC NETSOURCED.COM
#------------------------------------------------------------

export PATH=$PATH:/sbin

#-----------------------------------------------------------------------
# modified by John H. Bennett III  bennettj@thebennetthome.com
#
# The below 2 lines remove the spaces from the /tmp/RestoreNow file.
# If the spaces are not removed, then the restore will begin restoring
# from / and try to restore everything, which breaks your system.
# I know this from first hand experience
sed  '/^$/d' /tmp/RestoreNow > /tmp/RestoreNow1;
mv -f /tmp/RestoreNow1 /tmp/RestoreNow;
# end modifications by JHB3
#-----------------------------------------------------------------------

cd /
/bin/mt -f /dev/nst0 rewind
/bin/mt -f /dev/nst0 fsf 1
/usr/bin/flexbackup -extract -flist /tmp/RestoreNow
/bin/mt -f /dev/nst0 rewind

</snip>

Then edit /etc/e-smith/events/actions/BackupNow and change /sbin/e-smith/backup to /sbin/e-smith/do_backup

Now you should be able to use Darrell's old RPM to do immediate backups and restores.  One note:  When you do a restore, for some reason, the tape stays active after restoring the file.  I don't know how long the tape will stay active, because on my system, once I see that the file has been restored, I reboot the system.

Good Luck to you.

JB
......

Buddha_Joe

single file restore
« Reply #2 on: October 14, 2004, 09:57:45 PM »
Quote
One note: When you do a restore, for some reason, the tape stays active after restoring the file. I don't know how long the tape will stay active, because on my system, once I see that the file has been restored, I reboot the system.


 I'm new to SME and Linux and still figuring it out so forgive me. I looked at do_backup.. It looks like it actually starts the backup process agian.. that may be why the drive is active... is there a diffrent event that can be called? Or am I missing something here? if so please explain.

Buddha_Joe

DOHHH!!!!
« Reply #3 on: October 14, 2004, 11:16:48 PM »
I looked at the post agin and realized that I miss read it.. my bad... I understand what is happening now.