1. first stop oracle if it is installed
2. find and cpio are the commands used to create backup tar file
Find list of files to be backed up and create archive
find command :
============
xdev : options tells only search in current file system . i.e ' / '
To omit paths in /tmp, /proc and /var/tmp we use prune option. we no need to take a backup of these temporary
files. use -prune option for that
-o options is like OR conidtion to add two are more prunes
-print options prints path
cpio command
===========
it creates and un-creates archived cpio files. And also is capable of copying files to things other than a hard disk.
-o options tells that "(copy out) : cpio -o reads the standard input to obtain a list of path names and copies those files onto the standard output."
-v : for verbose
switch to root user. $sudo su - (to get permissions to all files)
take relative path backup using following command.
find ./ -xdev
-path /tmp -prune -o
-path /proc -prune -o
-path /var/tmp -prune -o
-print | cpio -ov > /tmp/fullback.cpio
so the single line commad is
>find ./ -xdev -path /tmp -prune -o -path /proc -prune -o -path /var/tmp -prune -o -print | cpio -ov > /tmp/fullback.cpio
step 3: Now we can restart oracle
>/etc/init.d/dboracle start ( dboraz is a service to be exist)
Step 4: create message digest for archive file for security reasons. this is useful while
restoring backup. it used to check correctness of backup file before starting restore.
>md5 fullback.cpio > fullback.md5
Step 5: Now split big file into small pieces so that we can write them into a DVD (4.7 GB)
>split -d -b4096m fullback.cpio fullback [yields fullback00, fullback01, ... fullbackxx]
Step 6:
burn pieces fullbackxx to DVDs along with message digest file. fullback.md5
No comments:
Post a Comment