8 Replies Latest reply: Aug 28, 2013 7:17 AM by Shaik RSS

    CPIO command

    Shaik


      Hi

       

      we are on R12.1.3 on Solaris SPARC 10

       

      I have taken cold backup using tar command.

       

      Now this tar files i need to take to tape using cpio command.

       

      I have googled but not understood the options.

      Please sugget me the command with options to copy the tar file to tape from disk.

       

       

      Thanks

        • 1. Re: CPIO command
          Asif Muhammad

          Hi,

           

          You may use the TAR command to transfer these backups to tape.

           

          Please refer link:

          Solaris tar command to backup data on tape device

           

          Thanks &

          Best Regards,

          • 2. Re: CPIO command
            Shaik

            Hi Asif,

             

            Thanks for replying to my query.

             

            Already i have taken tar files , these tar files i need to transfer to tapes.

             

             

            Thanks

            • 3. Re: CPIO command
              Asif Muhammad

              Hi Shaik,

               

              Already i have taken tar files , these tar files i need to transfer to tapes.

              Yes... you may transfer the tar files to tape using tar command...

               

              Which should be something like:

              tar -cvf /dev/st0 <tar file>.tar

               

              This is how I work on tapes, otherwise you may do create a small tar file and test doing this transfering to tape.

               

              Thanks &

              Best Regards

              • 4. Re: CPIO command
                Shaik

                Thanks Asif,

                 

                Now i understood, I will one time.

                 

                Thanks

                • 5. Re: CPIO command
                  Shaik

                  Hi Asif,

                   

                  I acn delete the tar file in tape, from command line?

                  Like how iam copying to tape , same i can delete also?

                  Please suggest.

                   

                   

                  Thanks

                  • 6. Re: CPIO command
                    Asif Muhammad

                    Hi,

                     

                    I acn delete the tar file in tape, from command line?

                    If you do a "tar -cvf" onto a tape, automatically the previous content is deleted and new files are created.

                     

                    If you wish to append additional file to tape, you may use command:

                    tar -rvf

                     

                     

                    Hope this helps!

                    Thanks &

                    Best Regards,

                    • 7. Re: CPIO command
                      Shaik

                      Hi

                       

                      here iam using script for cold backup like:

                       

                      tar -cvf  /prdbkp/orabak/oraprod_data_clone_${DT}.tar.gz /data/ora/proddata

                       

                      Here if i will give desitnation as tape location [/dev/mnt/0] , the backup will be directly go to Tapedrive?

                      Ex:

                      tar -cvf /dev/mnt/0  /data/ora/proddata

                      Is it correct, please sugget me.

                       

                      Thanks

                      • 8. Re: CPIO command
                        Asif Muhammad

                        Hi,

                        Here if i will give desitnation as tape location [/dev/mnt/0] , the backup will be directly go to Tapedrive?

                        Ex:

                        tar -cvf /dev/mnt/0  /data/ora/proddata

                        Yes, Correct

                         

                        In my server, the tape drive is identified as /dev/st0, therefore It works for me as:

                        tar -cvf /dev/st0 /data/ora/proddata

                         

                         

                        You can create a dump file and give it a try, before implement it a PROD system solution.

                         

                        Hope this answers

                        Thanks &

                        Best Regards,