Jump to content



Photo

Backups


  • Please log in to reply
7 replies to this topic

#1 Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 12
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 02 October 2012 - 10:16

Ok was not sure wether to post this here as it linux i use or in the hardware bit

I have been reading about a few backup utilities wihin linux itself and a few programs too

basically what i want to do is this

I have a small USB hub that has 4 ports

I want to plug 3*32gb USB drives into that hub

1 for photos
1 for documents
1 for files

I will set up the back up software to back up particular folder to each drive

BUT

how do i make sure that when i turn on my laptop it will mount the drives in the same way as it did so that each folder is backed up to the correct usb drive?

I am not keen on using mechanical drives for this as one of my backup drives failed


#2 ichi

ichi

    Akihabara Style

  • Tech Issues Solved: 5
  • Joined: 20-December 04

Posted 02 October 2012 - 10:33

Since usb drives might get different device names when you plug them, you'll have to use UUIDs.

First plug one of the USB devices, check what device name it got and run blkid to get the UUID. Eg. if it was /dev/sdc1 you'd do:

blkid /dev/sdc1

And you'd get something like this:

/dev/sdc1: UUID="6494BFE994BFBC3C" LABEL="usbdrive" TYPE="vfat"

Use that UUID in /etc/fstab to configure the mount point:

UUID=6494BFE994BFBC3C /home/user/usbdisk/ vfat defaults,auto,umask=000,users,rw 0 0

Repeat with each of the USB devices.

#3 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 12
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 02 October 2012 - 11:04

Awesome

also looking at automatic backups to dropbox too

i am assuming UUID never changes?

#4 ichi

ichi

    Akihabara Style

  • Tech Issues Solved: 5
  • Joined: 20-December 04

Posted 02 October 2012 - 11:37

That UUID is an unique identifier for partitions, it won't change as long as that partition on that drive also doesn't (eg. deleting the partition and creating a new one).

#5 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 12
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 02 October 2012 - 11:49

Cool thanks :)

#6 simplezz

simplezz

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 01-February 12

Posted 02 October 2012 - 15:37

also looking at automatic backups to dropbox too


You could set a cron job to copy whatever data you want to backup to the dropbox folder at a specific time/date or day of week.

#7 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 12
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 02 October 2012 - 15:44

yeah was just looking at that

just have it compress the folder and move it to the dropbox folder

trying to think of a way to keep it clean as in just do incremental backups

Simple Linux backup does that :D


i am right in saying incremental backup will replace any news files etc but if i modify a file will it pick up that its been changed and replace that file too?

#8 simplezz

simplezz

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 01-February 12

Posted 02 October 2012 - 16:01

yeah was just looking at that

just have it compress the folder and move it to the dropbox folder


The best thing to do is have cron run a backup script. The script should tar -czf <dir>, then cp it to ~/dropbox/ or where ever you want to put it. Here's a good article on using cron:
http://www.thegeekst...ontab-examples/

trying to think of a way to keep it clean as in just do incremental backups


Not too difficult. Just use differential archives.

i am right in saying incremental backup will replace any news files etc but if i modify a file will it pick up that its been changed and replace that file too?


Yes. That's the gist of it. Basically, tar's ( -g --listed-incremental FILE ) switch allows you to do precisely that.