Help backing up and restoring UNIX sco openserver

I help clients backup their data.  I am currently working on a project with some medical professionals that want UNIX systems backed up.

I am a little nervous to commit.

How would I go about backing up to get the data over to a windows environment and keep its integrity if they have to use the data to restore their system?  Their software vendors would help them use the data to restore the system, I simply am the backup guy.  One other requirement - the files need to be as small as possible as these are online backups.  I had someone suggest a tar file of everything but one large file takes much longer to upload/download than lots of smaller ones.

Any suggestions?

joemckameyGeneral ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

use tar (or cpio, if special files are involved use cpio, tar (sco version) can't handle specify files), then compress the tar file, use gzip (3rd party) or compress (comes with SCO).

Don't tranfer single file to Windows, Windows can antomatically rename then or change the files names from lower case to upper case which can cause
drama when you need to restore the files back to Unix.

If you have GNU tar install in your system, you can create a compress tar
file in one step, eg:

tar -zcvf mybackup.tar.gz files-or-dirs

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
joemckameyGeneral ManagerAuthor Commented:
I am concerned with file size on the tar file.  I would like smaller files.  If this is my only option is there a way to automate the process and then send it over to a windows machine?

How do I select the files that will be backed up?

Thanks for your help...this is a new one for me.
For regular backup, it is easier to backup the data to *nix (Unix/Linux), you can use rsync to a backup box. (use NFS mount + rsync/tar , or ssh + rsync/tar etc)

have a look at:

for more details about rsync

If you still want to backup to a Windows HD, you can setup samba: (need some work)

or SCO visionfs to mount the Windows HD, and then use tar or cpio
to backup the data to windows.



>>How do I select the files that will be backed up
you need you know where the data (dir) the data located, you can also create
a list of files/dirs and put them in a test file, and use it for your back up


tar -cf - `cat mylist` | (cd /path-to/target ; tar -xf -)

man tar
to learn more details.

>is there a way to automate the process

write an backup script first, then use cron to run the script to perform the auto
backup for you.

man crontab
to learn more details.

Have a nice weekend, cheers!
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

tar and cpio are the standard commands for copying files like this under *nix.  They do more or less the same thing, but in somewhat different ways.  tar traditionally doesn't copy "special" files (eg. device files, /dev/*), so if you need to backup anything besides "regular" files, standard tar may not be an option.

 You can get GNU tar for OpenServer, if it's not already installed.  It has some additional options, including a "verify" option to make sure the backup is good (more important for backing up to tape than to a file on a hard drive, which is what it sounds like you're going to be doing).

 You can also get a zip program for OpenServer that does the exact same thing as zip programs in Windows (eg. Winzip).  If the files are going to a Windows system, zip may be a good option.

 Both GNU tar and zip are available for free.  I know GNU tar was (and I assume still is) available on SCO's FTP site.  zip probably is as well.

 tar, cpio, GNU tar and zip all accept (require, actually) a list of the files or directories to be backed up.  The list can be entered on the command line or in a file.  If you want to break the backup into pieces, you could have several commands with a different list of files in each one.

I should clarify:

 I didn't mean to imply that the OpenServer zip program that I'm thinking of is a GUI program like most Windows zip programs.  It's a command line program, like tar and the others.  I just meant that it creates and reads zip files, like the zip programs that you may be familiar with under Windows.

joemckameyGeneral ManagerAuthor Commented:
James. it possible to create the cpio file and specify the file size and it automatically be split up?

Also, would you be able to help me set all this up with a cron job?


joemckameyGeneral ManagerAuthor Commented:
By the way, if it helps we do have an ftp server setup where we can download the files to windows if we need to.  However, I understand windows can mess up Unix files since they are case sensitive and windows files are not.  Hopefully this is helpful.  If not, just ignore.

> it possible to create the cpio file and specify
 > the file size and it automatically be split up?

 I don't think so.  cpio and tar will let you specify a volume size, but that was intended for things like tapes and floppies.  When it reached the specified volume size, it would stop and wait for you to insert the next volume and then continue.  It wasn't meant for splitting a backup into different files, or for unattended use (an operator is expected to be there to change volumes and tell the program when it's OK to continue).
 Having said that, it's possible that newer versions of cpio or tar, or GNU tar, have an option to split a backup into separate files, or you may be able to work around the limitations and use the volume size option to do what you want.  Maybe someone else will have some suggestions along those lines.

 Otherwise, you could have several commands that backup different groups of files, but that presents some problems.  You have to decide how to split the files up, and you may have to adjust that as time goes by, if you're trying to limit the size of the backup files.  And if you're using prepared lists of files, new files and files that are moved or renamed won't be included unless you make some allowances for them (eg. have one command that backs up everything not included in the prepared lists).

 Is it really necessary to split the backup into pieces?  It's not entirely clear to me why you want to do that in the first place.

 Yes, case can be a problem when moving files from *nix to Windows, or vice versa.  Windows does not distinguish between cases, but *nix does.  cat, CAT, Cat, cAt and CaT are all different filenames under *nix.  So if you're thinking of FTP'ing the individual files to a Windows server, that could be a problem.  If the files are in an archive (tar or cpio or zip), that's not a problem, unless you then want to extract the files on a Windows system.

Another thing I'm not clear on.

 When you talk about trying to copy the files to a Windows system, is that simply as a place to store a backup, which would then be copied back to the OpenServer system if necessary, or are they going to try to actually use the files under Windows?

joemckameyGeneral ManagerAuthor Commented:

Thanks so much for your help.

To answer your question - I am using RBS backup software and trying to help a client backup their unix box.  I don't want to commit to them until I know it can work.

The reason for the smaller file sizes is that we will be backing up online.  I have just experienced that files are downloaded faster when they are smaller rather than just one large file.

Yes, the only reason to go to windows is to have a place to store.  Windows is not using the files.

Thanks again...
>>Yes, the only reason to go to windows is to have a place to store.  Windows is not using the files.

why not use samba mount and tar/cpio the files accross?

joemckameyGeneral ManagerAuthor Commented:
yuzh...the main software provider does not want them to install any software on the server that they do not approve of first and they don't want samba.

Must work within their parameters.
I'm not familiar with RBS.  Is that running on the OpenServer system or Windows?  I'm assuming Windows, in which case I guess you're trying to get backup files from the OSR system onto the Windows system so they can be included in the RBS backup.  Is that correct?  Just trying to understand the situation better.

 Re: Smaller files d/l'ing faster.

 I don't know about that, but there can be other advantages to smaller files, like if the transfer is interrupted for some reason and you have to start it over, you don't have to start over from the very beginning.  Or if the transfer takes a long time and you want to be able to do it in pieces for whatever reason.

 FYI, if you do manage to split a cpio backup into volumes and then lose a volume (eg. one of your backup files is deleted), you may have trouble getting data from the remaining volumes.  The individual volumes created by cpio are not intended to be stand-alone entities (at least, not in the versions of cpio that I'm familiar with).  The later volumes begin wherever the previous volume left off, with no real header information.  There is an option in cpio to try to get around that by trying to read until it finds what looks like the header for a file, but you may lose some data (in addition to whatever was on the missing volume).
 I just wanted you to be aware of that if you're thinking about using cpio.

 I don't think you've said how much data you're backing up.  As I recall, most versions of OpenServer have a file size limit of 2 GB.  If you're writing to a tape, that's not an issue.  But if you're trying to create backup files on disk and you have more than 2 GB of data, that's another issue you may have to deal with.  More recent versions of OpenServer may have a larger file size limit.  I'm not sure.  Which version are they running?  If they don't know, "uname -X" (Without the quotes.  Uppercase "X") should tell them.

 If Windows will only be used to store, or backup, backup files (tar/cpio/zip/whatever) that were created on the OSR system, then the filename case isn't an issue, or isn't a big issue.  The actual files will be in the backup files, so they won't be affected.  I only see two possible problems offhand (both fairly minor, I think):
 1) If you had two backup files in a set that had the same name, except for the case (eg. Backup and backup), that would be a problem.  So don't do that.  :-)
 2) If the backup filenames included lowercase characters, they might become uppercase under Windows and if you tried to use some automated process to access those files (eg. from the OSR system), it might not be able to find them.  Humans that might need to access the files would need to know that the names could be uppercase or lowercase.

You can use -K option with cpio (SCO version) to specify the volume size, or
"-k" with tar (SCO) to specify the volume size.

man cpio
man tar
to learn more details
Yes, you can specify the volume size, but originally that was intended to be used with devices (usually tape or floppy) and each successive volume would be written to the same device.  I'm not sure if you can use a volume size when writing to a file instead of a device.  You have to be able to enter a different file name for each volume.  I haven't taken the time to boot OSR 5 and play around with cpio and tar and see if that works.

http:#16277354 answered the original question.

answered the add-ons.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.