| What is it? | Backup commands. | other issues | Media, Hardware |
These are common backup and restore commands used in
all favours of Unix.
Backup and restore (storage) Commands
compress uncompress,
cpio,dump, restore , pack,
tar, mt.
Compress command.
Compress command compresses a file and returns the original file with .z extension, to uncompress
this filename.Z file use uncompress filename command.
syntax for compress command is
compress options files
Uncompress command.
Uncompress file uncompresses a file and return it to its original form.
syntax is
uncompress filename.Z this uncompresses the compressed file to its original name.
Cpio command.
cpio command is useful to backup the file systems. It copy file archives in from
or out to tape or disk, or to another location on the local machine. Its syntax is
cpio flags [options]
Dump command is useful to backup the file systems.
dump command copies all the files in filesystem that have been changed after a certain date. It
is good for incremental backups. This information about date is derived from /var/adm/dumpdates and
/etc/fstab .
syntax for HP-UX dump is
/usr/sbin/dump [option [argument ...] filesystem]
Restore command.
Restore and ufsrestore command restores files backed up with dump command.
Syntax is
restore options arguments files-dirs
Pack command.
pack command compacts each file and combine them together into a filename.z file. The original
file is replaced. Pcat and unpack will restore packed files to their original form.
Syntax is
Pack options files
Tar command.
tar command creates an archive of files into a single file.
Tar copies and restore files to a tape or
any storage media. Synopsis of tar is
tar [options] [file]
Examples:
tar cvf /dev/rmt/0 /bin /usr/bin creates an archive of /bin and /usr/bin, and store on the tape in /dev/rmt0.
tar tvf /dev/rmt0 will list the tape's content in a /dev/rmt0 drive.
tar cvf - 'find . -print' > backup.tar will creates an archive of current directory and store it in file backup.tar.
Mt command is used for tape and other device functions like rewinding, ejecting, etc. It give
commands to tape device rather than tape itself. Mt command is BSD command and is seldom found
in system V unix versions.
syntax is
mt [-t tapename] command [count]
These following are some other issues concerning backups.
Magnetic Tape
Magnetic tapes are the most used media for backup. 8mm and 4mm tapes are most common backup
medium for Unix systems. 8mm tapes were originally designed for video uses (8mm video camcorder),
media holds upto 2GB of data. If your system needs more then 1 tape for backup then a stacker
which can hold upto ten tapes along with software is very common. 4mm tapes which are smaller
can hold more data since it is newer technology, upto 4GB. Another type of very famous
upcoming media is DLT tapes, DLT tapes normally comes with all the hardware and software. All
you have to do is make sure that there are enough tapes and schedule the backup.
Floppy disks
Floppy disks are found on most computer systems. Very inexpensive and reliable but their
capacity is very small. Floppy disks are only good for emergency booting of system. Backup
on floppies can run into several hundred or thousands of floppies each time.
Hard Disks
Disk mirroring capabilities make it a very fast and reliable backup system.
back to top
Back to main page
| Fundamentals of Unix | Unix commands | User Accounts | Shell Programming |
| File Systems | Networking | Backups | Security |
| Installing software | Installing Hardware | Performance and Tuning | Some Useful Scripts |
Your suggestions and comments are welcome. Please e-mail me
Copyright reserved with Sandeep S Bajwa.