The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

backup remount/umount and bail out

Discussion in 'E-mail Discussions' started by stardotstar, Jul 17, 2010.

  1. stardotstar

    stardotstar Well-Known Member

    Joined:
    Sep 14, 2009
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Hi all,

    I have recently put on a nas for backups and want some thoughts on best way to configure the backup for a NFS mount.

    I note that the backup configuration allows for the

    Remount/Unmount Backup Drive (requires a separate drive/coda/nfs mount)

    and

    Bail Out If Backup Drive Mount Fails (Recommended if Remount/Mount set)

    I have my backup mounted "noauto" in /etc/fstab, its a nfs mount on a local lan thus:

    192.168.0.101:/mnt/moon_nfs/nfs_moon/moonmount /backup/moonmount nfs defaults,noauto 0 0

    If I have a power down at the dc I am thinking that maybe the nas won't be ready at the same time as the main server so I set it to noauto to prevent timeouts trying to mount/connect on boot.

    Therefore I need to know if the best way to try and do this is to set the:
    Remount/Unmount Backup Drive (requires a separate drive/coda/nfs mount)

    to yes and also the:
    Bail Out If Backup Drive Mount Fails (Recommended if Remount/Mount set)
    to yes

    so that prior to backup starting the volume (specified at the bottom as /backup/moonmount) is mounted (or is that not how it works - ie does it need to be already mounted so it can be "re"mounted.

    Do I need to put a mount command in the precpbackup script/process.

    Thanks guys for helping me get my head around this.


    Will
     
  2. stardotstar

    stardotstar Well-Known Member

    Joined:
    Sep 14, 2009
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    OK, so I am still hoping that someone can assist me with the right configuration approach here.

    I have set the system to
    Remount/Unmount Backup Drive (requires a separate drive/coda/nfs mount) --> Enabled
    Bail Out If Backup Drive Mount Fails (Recommended if Remount/Mount set) --> Enabled

    It looks like last night the system managed to do a backup, not only do I have a backup successful email from the scheduled time but I can see from the disk that it was written to and unmounted.

    When I look at the log however it seems that something has gone wrong.

    Code:
    [cpbackup] Started at Tue Jul 20 01:00:01 2010
    [cpbackup] Running dir & file backup with target : /backup/moonmount/cpbackup/daily
    rsync: mknod "/backup/moonmount/cpbackup/daily/dirs/_var_named/chroot/dev/null" failed: Operation not permitted (1)
    rsync: mknod "/backup/moonmount/cpbackup/daily/dirs/_var_named/chroot/dev/random" failed: Operation not permitted (1)
    rsync: mknod "/backup/moonmount/cpbackup/daily/dirs/_var_named/chroot/dev/zero" failed: Operation not permitted (1)
    rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
    rsync: recv_generator: mkdir "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/admin/1033" failed: Permission denied (13)
    rsync: stat "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/admin/1033" failed: No such file or directory (2)
    rsync: recv_generator: mkdir "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin" failed: Permission denied (13)
    rsync: stat "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin" failed: No such file or directory (2)
    rsync: recv_generator: mkdir "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin/_vti_adm" failed: No such file or directory (2)
    rsync: stat "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin/_vti_adm" failed: No such file or directory (2)
    rsync: recv_generator: mkdir "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin/_vti_aut" failed: No such file or directory (2)
    rsync: stat "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin/_vti_aut" failed: No such file or directory (2)
    rsync: recv_generator: mkdir "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin/images" failed: No such file or directory (2)
    rsync: stat "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin/images" failed: No such file or directory (2)
    rsync: recv_generator: mkdir "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/help/1033" failed: Permission denied (13)
    rsync: stat "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/help/1033" failed: No such file or directory (2)
    ...
    rsync: recv_generator: mkdir "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin/images" failed: No such file or directory (2)
    rsync: stat "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/exes/_vti_bin/images" failed: No such file or directory (2)
    rsync: recv_generator: mkdir "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/help/1033" failed: Permission denied (13)
    rsync: stat "/backup/moonmount/cpbackup/daily/dirs/_usr_local_frontpage/version5.0/help/1033" failed: No such file or directory (2)
    rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
    
    Looks like the rsync part is failing and not realising that the mount needs doing.

    Then just after that section the backup seems to progress without any complaints:

    Code:
    [cpbackup] Running account backup with target : /backup/moonmount/cpbackup/daily
    pkgacct started.
    pkgacct version 8.3 - user : sapphire - archive version: 3 - running with uid 0
    Copying Reseller Config...Done
    Copying Suspension Info (if needed)...Done
    Copying SSL Certificates, CSRS, and Keys...Done
    Copying Domain Keys....Done
    Copying Counter Data....Done
    Copying Bandwidth Data.......sapphirecleaningservices.com.au...Done
    Copying Dns Zones.......sapphirecleaningservices.com.au...Done
    Copying Mail files....Done
    Copying frontpage files....Done
    Copying proftpd file....Done
    Copy userdata............
    Copy custom virtualhost templates............
    Done
    Leaving timeout safety mode
    Copying mailman lists....Done
    Copying mailman archives....Done
    Copying homedir....Skipping access-logs
    Skipping .cpanel/datastore
    Skipping .cpanel/caches
    Done
    Entering timeout safety mode
    Grabbing mysql dbs........horde.turba_objects horde.horde_prefs horde.kronolith_events horde.kronolith_storage horde.mnemo_memos horde.nag_tasks roundcube.users roundcube.messages roundcube.identities roundcube.contacts ...Done
    Grabbing mysql privs...Done
    Copying cpuser file.......Done
    Copying crontab file.......Done
    Copying quota info.......Done
    Storing Subdomains....
    Done
    Storing Parked Domains....
    Done
    Storing Addon Domains....
    Done
    Storing ssl domain......Done
    Copying password.......Done
    Copying shell.......Done
    Creating Archive ....Done
    pkgacct target is: /backup/moonmount/cpbackup/daily/sapphire
    pkgacct started.
    pkgacct version 8.3 - user : mdmas - archive version: 3 - running with uid 0
    
    and so on to the bottom where mention is made of the unmount...

    Code:
    Done
    Storing ssl domain......Done
    Copying password.......Done
    Copying shell.......Done
    Creating Archive ....Done
    pkgacct target is: /backup/moonmount/cpbackup/daily/sourcepo
    [cpbackup] Executing user defined post backup script (/scripts/postcpbackup).
    Backup Rotate: Successfully moved daily/ backup to Tuesday_20100720/
    [cpbackup] Shutting down mount
    [cpbackup] running: /bin/mount -o remount,ro /backup/moonmount
    [cpbackup] running: /bin/umount /backup/moonmount
    [cpbackup] Completed at Tue Jul 20 08:14:24 2010
    Notification => admin@sourcepoint.com.au via EMAIL [level => 2]
    Notification => 560737003 via UIN [level => 2]
    
    Am I to assume that

    Code:
    Incremental Backup (only backup what has changed. (**No Compression**, not compatible w/FTP backups)
    is failing because the nfs mount point is not there to begin with? Wouldn't the script invoke the mount prior to the rsync checks for changes?

    TIA
    \\'
     
Loading...

Share This Page