USB backup of photos share


Recommended Posts

Hi all, just a quick question that may be stupid. I've a unraid server with 4drives and a parity. I came from a Synology solution and in that environment there was an app to backup shares on 1 external drive (a USB HDD in my case). I was wondering if I need to do it also in my unraid configuration and in case how to make it.

Thanks for all advises

  • Like 1
Link to comment
52 minutes ago, Energen said:

Do you need to? Probably not, but if you want to then you can.

Perhaps @Energen already knows this, but just in case.

 

Parity is not a backup. You absolutely must have another copy of anything important and irreplaceable. Photos are one of those things that are often considered important and irreplaceable. What will you do when your wife finds out you have lost all the baby pictures?

  • Like 1
Link to comment

An rsync script will often take care of it. I use that method to backup shares from my main server to my backup server, and also to make backups to external Unassigned Devices for storage offsite.

 

Check out the script examples in the first page of the Unassigned Devices thread

 

 

Link to comment
24 minutes ago, Jokerigno said:

That's my opinion too. As a former synology user is quite strange that unraid does not offer a native solution for it. I can use dockers like duplicati but was looking for other examples or best practices.

There isn't really a best practice but rather depends on what you need. The UD script is probably the most simple without any bells and whistles. I use sync + zfs snapshots. Some use duplicati.

Link to comment
7 hours ago, Jokerigno said:

What do you mean? I'm not an IT guy but as far as I know having a backup (or more than one) is a must as nothing last forever.

Then why are you asking? I don't mean to come off as "trolling" you but if you're used to backing up from synology and as far as you know you need a backup... then just do it.  You were wondering if you need to do it, so don't wonder about it.

7 hours ago, trurl said:

 What will you do when your wife finds out you have lost all the baby pictures?

I mean... if the baby was ugly.....................................................................................  :D kidding, kidding.

 

  • Haha 1
Link to comment
9 hours ago, Energen said:

Then why are you asking? 

 

Because Unraid don't have a native solution to backup.  So I came here to ask what users normally do. 

 

I checked UD scripts but It's not so intuitive to me.

 

Here's the script found here:

 

#!/bin/bash
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
## Available variables: 
# AVAIL      : available space
# USED       : used space
# SIZE       : partition size
# SERIAL     : disk serial number
# ACTION     : if mounting, ADD; if unmounting, UNMOUNT; if unmounted, REMOVE; if error, ERROR_MOUNT, ERROR_UNMOUNT
# MOUNTPOINT : where the partition is mounted
# FSTYPE     : partition filesystem
# LABEL      : partition label
# DEVICE     : partition device, e.g /dev/sda1
# OWNER      : "udev" if executed by UDEV, otherwise "user"
# PROG_NAME  : program name of this script
# LOGFILE    : log file for this script

case $ACTION in
  'ADD' )
    #
    # Beep that the device is plugged in.
    #
    beep  -l 200 -f 600 -n -l 200 -f 800
    sleep 2

    if mountpoint -q $MOUNTPOINT; then
      if [ $OWNER = "udev" ]
      then
        beep  -l 100 -f 2000 -n -l 150 -f 3000
        beep  -l 100 -f 2000 -n -l 150 -f 3000

        logger Started -t$PROG_NAME
        echo "Started: `date`" > $LOGFILE

        logger Pictures share -t$PROG_NAME
        rsync -a -v /mnt/user/Pictures $MOUNTPOINT/ 2>&1 >> $LOGFILE

        logger Syncing -t$PROG_NAME
        sync -f $MOUNTPOINT

        beep  -l 100 -f 2000 -n -l 150 -f 3000
        beep  -l 100 -f 2000 -n -l 150 -f 3000
        beep  -r 5 -l 100 -f 2000

        logger Unmounting PicturesBackup -t$PROG_NAME
        /usr/local/sbin/rc.unassigned umount $DEVICE

       echo "Completed: `date`" >> $LOGFILE
        logger Pictures Backup drive can be removed -t$PROG_NAME

        /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Server Backup" -d "Pictures Backup completed" -i "normal"
    fi
    else
        logger Pictures Backup Drive Not Mounted -t$PROG_NAME
  fi
  ;;

  'REMOVE' )
    #
    # Beep that the device is unmounted.
    #
    beep  -l 200 -f 800 -n -l 200 -f 600
  ;;

  'ERROR_MOUNT' )
	/usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Server Backup" -d "Could not mount Pictures Backup" -i "normal"
  ;;

  'ERROR_UNMOUNT' )
	/usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Server Backup" -d "Could not unmount Pictures Backup" -i "normal"
  ;;
esac

What's is not clear is: where I put my specs (my share name, my usb device name etc? Moreover I wish to u backup 2 different folders ("photos", not pictures in my case and "video". 

Can some one please me point me to the right direction?

Link to comment

Hi guys, I found this great solution on /r/unraid which is a fairly simple to setup, especially if you already have rclone configured. You can automate it on a schedule too. It will do differential deduplicated backups of any share/folder you put in the script using the Borg backup application, and they are proper backups, not just a file sync.

 

Full install and configure instructions are contained in the excellent reddit post: https://www.reddit.com/r/unRAID/comments/e6l4x6/tutorial_borg_rclone_v2_the_best_method_to/

 

For my setup, I have Borg backup to an external USB HDD then rclone sync it to my Microsoft Onedrive account. It runs on a schedule in the User Scripts plugin. For my offsite backup I generally take the HDD to work when the schedule is not set to run. Let me know if you have any problems setting it up. 

 

Edited by partyhat
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.