Page 2 of 2 FirstFirst 12
Results 17 to 23 of 23

Thread: (NSYNC ADVICE) Or somthing similar.. please give opinions

  1. #17
    Member
    Join Date
    Jan 2009
    Posts
    137
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: (NSYNC ADVICE) Or somthing similar.. please give opinions

    Use rsync

    It is really easy to setup. Just look at the rsync manpage

    Get the ssl, sysuser modules for your thecus

    Puiece of cake

  2. #18
    Member
    Join Date
    Nov 2008
    Posts
    137
    Thanks
    0
    Thanked
    2 times in 2 posts

    Re: (NSYNC ADVICE) Or somthing similar.. please give opinions

    ok ill start to learn rsync... but will i have the same problems as before.. a folder which is 3TB in size wont transfer? my photo archive folder
    p

  3. #19
    Member
    Join Date
    Jan 2009
    Posts
    137
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: (NSYNC ADVICE) Or somthing similar.. please give opinions

    no

    Rsync dos it file by file, so it can sync and move onl;y changed files

    So the problem will not happen

    I think Thecus's is faster (nsync) because they don't have to create all the files during network transfer, but it also hits the 2tb limit.

    I actually have a rsync script that lets me copy my raid shares, folder by folder to USB-mounted drives.

    I plugged 2 2tb usb drives in and do the rsync backup to them every night (it updates changes only)

    Glad to send it when I get home from my vacation if you'd like

  4. #20
    Member
    Join Date
    Nov 2008
    Posts
    137
    Thanks
    0
    Thanked
    2 times in 2 posts

    Re: (NSYNC ADVICE) Or somthing similar.. please give opinions

    i would really like to use your script, if thats ok
    thanks for getting back in touch after your vacation
    p

  5. #21
    Member
    Join Date
    Jan 2009
    Posts
    137
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: (NSYNC ADVICE) Or somthing similar.. please give opinions

    ok

    I am back Thursday

    I'd send it now but I turned my Thecus off while I was away.

    phil

  6. #22
    Member
    Join Date
    Jan 2009
    Posts
    137
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: (NSYNC ADVICE) Or somthing similar.. please give opinions

    Here is the cmd file I use to rsync to my attached usb drives.

    #!/bin/bash
    #
    # Backup to usb drives using rsync. Run usb_backup_init to remount usb drives r/w on new ports
    #
    # System is set to use only the first drive. Uncvomment the second to use it too
    #
    # Assumptions: Drives will have a signature file, 'usbdisk1.flg' and 'usbdisk2.flg' for drive 1 and 2
    # Thus is used to allow the system to find the usb drives since usb is dynamic and mounted first come, first served
    #
    # At end, just place the locations of your shares to be backed up. They MUST have trailing slashes...
    # To use drive 2 for some, just uncomment drive 2 discovery at topo and replace ${disk1} with ${disk2} in dest values.
    #
    # You must have loaded the following modules: SYSUSR, SSHD, RSYNC NTFS3G
    #
    #Subroutines here
    #############################
    writelocalog() {
    if [ -z $1 ]
    # Checks if any params.
    then
    echo No parameters passed to writelog
    return 0
    fi
    echo USBBackup run on ${dt} > $1
    echo From- ${infle} To- ${dest} >> $1
    echo Logfile- ${logot} >> $1
    echo $nothing >> $1
    #tail -n 3 -q ${logot} >> $1
    cat ${logot} >> $1
    return 0
    }
    #
    #########################################
    #
    #first check if drives mounted correctly
    #
    #Set backup log stuff based upon date
    dt=`date +%Y%m%d%H%M%S`
    fdt=`date`
    #
    logfl="backup_${dt}.log"
    flogfl="backup.log"
    #
    #args to rsync
    #rargs="-auvogpDEb"
    rargs="-auogpDeb --stats"
    #
    RSYNC="/raid/data/module/RSYNC/system/bin/rsync_acl"
    #
    dsk1=''
    if [ -f /raid0/data/usbhdd/usb/sdh1/usbdisk1.flg ]; then dsk1='sdh1';
    else
    {
    if [ -f /raid0/data/usbhdd/usb/sdi1/usbdisk1.flg ]; then dsk1='sdi1';
    else
    {
    echo 'Backup Drive 1 Signature NOT Found - Backup ending'
    exit 1;
    }
    fi
    }
    fi
    #dsk2=''
    #if [ -f /raid0/data/usbhdd/usb/sdh1/usbdisk2.flg ]; then dsk2='sdh1';
    # else
    # {
    # if [ -f /raid0/data/usbhdd/usb/sdi1/usbdisk2.flg ]; then dsk2='sdi1';
    # else
    # {
    # echo 'Backup Drive 2 Signature NOT Found - Backup ending'
    # exit 1;
    # }
    # fi
    # }
    #fi
    #echo DISK=$dsk D2=$dsk2
    #echo log=$logfl
    #
    #Do syncs...for now, all to $dsk1
    #
    #
    dest="/raid0/data/usbhdd/usb/${dsk1}/KITS/"; infle="/raid0/data/KITS/"; logot="${dest}${logfl}"
    echo Starting Backup of $infle to $dest
    ${RSYNC} ${rargs} --exclude '*~' ${infle} ${dest} > ${logot} 2>&1
    writelocalog ${infle}${flogfl}
    #
    dest="/raid0/data/usbhdd/usb/${dsk1}/VIDEO/"; infle="/raid0/data/VIDEO/"; logot="${dest}${logfl}"
    echo Starting Backup of $infle to $dest
    ${RSYNC} ${rargs} --exclude '*~' ${infle} ${dest} > ${logot} 2>&1
    writelocalog ${infle}${flogfl}
    #
    dest="/raid0/data/usbhdd/usb/${dsk1}/PICTURES/"; infle="/raid0/data/PICTURES/"; logot="${dest}${logfl}"
    echo Starting Backup of $infle to $dest
    ${RSYNC} ${rargs} --exclude '*~' ${infle} ${dest} > ${logot} 2>&1
    writelocalog ${infle}${flogfl}
    #
    dest="/raid0/data/usbhdd/usb/${dsk1}/MUSIC/"; infle="/raid0/data/MUSIC/"; logot="${dest}${logfl}"
    echo Starting Backup of $infle to $dest
    ${RSYNC} ${rargs} --exclude '*~' ${infle} ${dest} > ${logot} 2>&1
    writelocalog ${infle}${flogfl}
    #
    dest="/raid0/data/usbhdd/usb/${dsk1}/PUBLIC/"; infle="/raid0/data/PUBLIC/"; logot="${dest}${logfl}"
    echo Starting Backup of $infle to $dest
    ${RSYNC} ${rargs} --exclude '*~' ${infle} ${dest} > ${logot} 2>&1
    writelocalog ${infle}${flogfl}
    #
    echo Backup USBBACKUP complete
    echo USBBACKUP Last run was ${fdt} > /raid0/data/module/backuprun.txt

  7. #23
    Member
    Join Date
    Jan 2009
    Posts
    137
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: (NSYNC ADVICE) Or somthing similar.. please give opinions

    ok

    Quick setup of this script:

    From the SSH prompt, do the following:

    mkdir /raid0/data/module/USBCOPY
    mkdir /raid0/data/module/USBCOPY/system
    mkdir /raid0/data/module/USBCOPY/system/etc
    mkdir /raid0/data/module/USBCOPY/system/bin

    copy my script into /raid0/data/module/USBCOPY/system/bin/usb_copy
    cd into /raid0/data/module/USBCOPY/system/bin
    chmod 755 usb_backup
    edit the script end section to point to your shares. The ones listed are mine.
    point the RSYNC line to point to the correct location for your rsync_acl file you installed

    Mount a USB drive, go into df and make sure it mounted RW as sdi1 or sdh1
    create a file on the drive named usbdisk1.flg. This is how the script sees the drive to use. so to do this:
    cd /raid0/data/usbhdd/usb/sdh1 (or sdi1).
    touch usbdisk1.flg
    Then mkdir the output folders on this usb drive:
    mkdir VIDEO
    mkdir PICTURES
    etc,etc for your output shares defined in the usb_backup script.

    cd back to the system/bin you created above and try to run the script:
    ./usb_backup

    It should just run, and will take a long time the first time.

    To add to cron, so it runs every night:
    do a 'crontab -l > a.a'
    edit a.a and add the following line to the bottom of a.a
    7 3 * * * /raid/data/module/USBBACKUP/system/bin/usb_backup > /dev/null 2>&1

    Then run the following to add it officially: 'crontab a.a'

    That will do it..

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Gaming within budget - please give opinions!
    By vrfx in forum PC Hardware and Components
    Replies: 4
    Last Post: 15-08-2008, 10:04 AM
  2. You photographers out there, mind give me some advice :D
    By Hans Voralberg in forum General Discussion
    Replies: 5
    Last Post: 17-02-2006, 09:13 PM
  3. Can anyone give me any advice...
    By kasavien in forum PC Hardware and Components
    Replies: 4
    Last Post: 15-12-2005, 02:58 PM
  4. Buying a new PC - pls look inside and give me your advice
    By brammers in forum PC Hardware and Components
    Replies: 15
    Last Post: 13-08-2004, 06:40 PM
  5. Thinking if moving to a SFF advice opinions please
    By Gunbuster in forum PC Hardware and Components
    Replies: 2
    Last Post: 05-01-2004, 12:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •