This discussion is archived
10 Replies Latest reply: Oct 12, 2012 1:55 PM by Levi-Pereira RSS

Remote Backup

scottjhn Newbie
Currently Being Moderated
Oracle 11g on SUSE Linux 11. Standalone database server.
TASK: Backup the database to a remote location (example 192.168.1.2)

Start DBCONSOLE --> http://dbserver:1158/em --> Availability -->Schedule Backup --> Schedule Customerized Backup --> Disk --> Override Default Settngs --> Disk Backup Location: //192.168.1.2/backup Disk Backup Type: Backup Set --> Test Disk Backup -->

Test Failed.

Message:

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Oct 10 11:59:31 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

RMAN>
connected to target database: TEST (DBID=1394562974)
using target database control file instead of recovery catalog

RMAN> run {
2> allocate channel oem_disk_backup type disk format '//192.168.1.2/backuptest/%U'
3> ;backup as BACKUPSET current controlfile tag '10102012115930';
4> restore controlfile validate from tag '10102012115930';
5> release channel oem_disk_backup;
6> }
allocated channel: oem_disk_backup
channel oem_disk_backup: SID=771 device type=DISK

Starting backup at 10-OCT-12
channel oem_disk_backup: starting full datafile backup set
channel oem_disk_backup: specifying datafile(s) in backup set
including current control file in backup set
channel oem_disk_backup: starting piece 1 at 10-OCT-12
released channel: oem_disk_backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on oem_disk_backup channel at 10/10/2012 11:59:33
ORA-19504: failed to create file "/192.168.1.2/backuptest/10nnda53_1_1"
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9

RMAN> allocate channel for maintenance type disk;
allocated channel: ORA_MAINT_DISK_1
channel ORA_MAINT_DISK_1: SID=771 device type=DISK


Q: How can I backup the database to a remote location such as the one located at 192.168.1.2
  • 1. Re: Remote Backup
    Levi-Pereira Guru
    Currently Being Moderated
    Hi,
    TASK: Backup the database to a remote location (example 192.168.1.2)
    What is the remote location ? NFS? Windows ?

    Why not to create a mount point ?
  • 2. Re: Remote Backup
    mseberg Guru
    Currently Being Moderated
    Hello;

    You need a shared Disk.

    This is documented by this Oracle note :

    How to Configure RMAN to Write to Shared Drives on Windows NT/2000/2003 [ID 145843.1]

    It details everything you need to know.

    For additional information see

    ERROR in RMAN to Write to Shared Drives on Windows NT/2000 [ID 246107.1]

    Best Regards

    mseberg
  • 3. Re: Remote Backup
    scottjhn Newbie
    Currently Being Moderated
    What is the remote location ? NFS? Windows ?
    --It will be on hosting facility's backup server.  I believe it is on Linux/Unix box.

    Why not to create a mount point ?
    --I'll try that.

    How to Configure RMAN to Write to Shared Drives on Windows NT/2000/2003 [ID 145843.1]
    ERROR in RMAN to Write to Shared Drives on Windows NT/2000 [ID 246107.1]
    --This sounds like for Windows.  Mine is running on Linux.  Can I still use the doc?


    Thanks
  • 4. Re: Remote Backup
    mseberg Guru
    Currently Being Moderated
    Hello;

    Linux allows different mount points and shares so I'm thinking yes. The document should still be useful since the main concept is the same.

    For awhile all the Linux servers in my shop had a common share, but the admin who set it all up has left so I cannot ask. Still knowing it can be done.

    I think it was NFS.

    http://www.linuxjournal.com/article/4880

    Best Regards

    mseberg
  • 5. Re: Remote Backup
    scottjhn Newbie
    Currently Being Moderated
    I am using Samba to network the linux boxes to simulate the remote offsite backup. PC1 (Oracle Server) and PC2 (backup) both on SUSE Linux 11.
    The netwrok was tested and worked well.

    The shared directory /TEST/backup (on PC2) is mounted to PC1 as /mnt/TEST/backup

    Now go to DBCONSOLE to schedule a job. Before start, click on the Test Backup Disk to see if it will work.

    An error returned. The following is what displayed:

    RMAN>
    connected to target database: DB (DBID=1394562974)
    using target database control file instead of recovery catalog

    RMAN>
    echo set on


    RMAN> run {
    2> allocate channel oem_disk_backup type disk format '/MNT/TEST/%U'
    3> ;backup as BACKUPSET current controlfile tag '10112012094345';
    4> restore controlfile validate from tag '10112012094345';
    5> release channel oem_disk_backup;
    6> }
    allocated channel: oem_disk_backup
    channel oem_disk_backup: SID=201 device type=DISK

    Starting backup at 11-OCT-12
    channel oem_disk_backup: starting full datafile backup set
    channel oem_disk_backup: specifying datafile(s) in backup set
    including current control file in backup set
    channel oem_disk_backup: starting piece 1 at 11-OCT-12
    released channel: oem_disk_backup
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on oem_disk_backup channel at 10/11/2012 09:43:49
    ORA-19504: failed to create file "/MNT/TEST/1cnnfmij_1_1"
    ORA-27041: unable to open file
    Linux-x86_64 Error: 13: Permission denied
    Additional information: 9


    RMAN> allocate channel for maintenance type disk;
    allocated channel: ORA_MAINT_DISK_1
    channel ORA_MAINT_DISK_1: SID=201 device type=DISK


    RMAN> delete noprompt backuppiece tag '10112012094345';
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of delete command at 10/11/2012 09:43:50
    RMAN-06168: no backup pieces with this tag found: 10112012094345


    RMAN> exit;


    What could be wrong?


    P.S., If the directory is a local drive and path instead of mounting a remote drive and path, the same setting as above actually worked.
  • 6. Re: Remote Backup
    mseberg Guru
    Currently Being Moderated
    Hello;

    Could it be as simple as you show MNT with two different cases UPPER and LOWER in Linux?

    I think the Linux user who owes the oracle software need permissions on the common mount point

    Linux-x86_64 Error: 13: Permission denied

    Guess ( On the user and group )

    chown -R oracle.oinstall /mnt/TEST/backup


    Best Regards

    mseberg

    Edited by: mseberg on Oct 12, 2012 12:01 PM
  • 7. Re: Remote Backup
    scottjhn Newbie
    Currently Being Moderated
    Even after change the path name to all lower or upper case, there are still some errors. Once again, test on a local path worked.


    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on oem_disk_backup channel at 10/11/2012 10:52:37
    ORA-19504: failed to create file "/test/1snnfqji_1_1"
    ORA-27041: unable to open file
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9



    Thanks to help.
  • 8. Re: Remote Backup
    mseberg Guru
    Currently Being Moderated
    Its screams OS permissions.

    Can you as the Oracle software owner switch to the mount point and create and save a file using vi?

    chmod 777 /mnt/TEST/backup

    Best Regards

    mseberg

    Edited by: mseberg on Oct 12, 2012 1:52 PM
  • 9. Re: Remote Backup
    scottjhn Newbie
    Currently Being Moderated
    Yes. I can, as user oracle, switch to the /TEST directory, and, create and save a file. But run rman script gives error:

    RMAN-03009: failure of backup command on oem_disk_backup channel at 10/11/2012 11:49:13
    ORA-19504: failed to create file "/TEST/22nnfttn_1_1"
    ORA-27041: unable to open file
    Linux-x86_64 Error: 13: Permission denied
    Additional information: 9

    On shared directory /WEB on both PCs are given full and all permission at this time.


    P.S. One again, when tested a local path /local_test on the DB server. It worked.
  • 10. Re: Remote Backup
    Levi-Pereira Guru
    Currently Being Moderated
    Hi,

    Put here... execute as oracle user:
    $ id oracle
    $  touch /TEST/file_test
    
    $ ls -la /TEST/*
    
    $ mount 

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points