Jump to content



Photo

Incremental Backup to NAS

ubuntu

  • Please log in to reply
6 replies to this topic

#1 Fahim S.

Fahim S.

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 15-April 02
  • OS: Windows 8 - OG
  • Phone: Google Nexus 4 16GB by LG

Posted 24 December 2013 - 10:59

First thing to say is that I am a complete Linux noob, so be gentle!!!

I have set up an OwnCloud installation running on an Ubuntu VM on ESXi 5.1. The OwnCloud file store is on the local filesystem of the Ubuntu VM.

I would like to set up incremental backup to my Qnap NAS.

It would be great if I could get a folder structure on my NAS which goes something like this:

OwnCloudBackup
-- 2012-12-24 All files
-- 2012-12-25 Files that have added/changed since 24th December
-- 2012-12-26 Files that have added/changed since 25th December
-- 2012-12-27 ....

Can someone help me do this?

I am not adverse to paying for software to help.

Thanks.


#2 +LambdaLambdaLambdaFn

LambdaLambdaLambdaFn

    Neowinian

  • Joined: 13-November 13

Posted 24 December 2013 - 18:32

Depends what you're trying to do.  Do you need the files in that hierarchy, or are you just trying to do a backup and want to be able to see what has changed since time x?

 

If this is just a backup and you want to be able to restore to a point in time and see what has changed, a combination of revision control and syncing might be a better solution. 



#3 OP Fahim S.

Fahim S.

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 15-April 02
  • OS: Windows 8 - OG
  • Phone: Google Nexus 4 16GB by LG

Posted 24 December 2013 - 19:30

Depends what you're trying to do. Do you need the files in that hierarchy, or are you just trying to do a backup and want to be able to see what has changed since time x?

If this is just a backup and you want to be able to restore to a point in time and see what has changed, a combination of revision control and syncing might be a better solution.


I would like a backup as well as being able to do file restore of any file in its past form.

I am not overly married to the file structure I described, although it would be my ideal.

#4 Tidosho

Tidosho

    Electronics, Software & Computer Engineer

  • Joined: 14-March 10
  • Location: Birmingham, UK
  • OS: Windows 7 & Linux Mint
  • Phone: Samsung Galaxy S3 & Note 2 16GB

Posted 24 December 2013 - 19:59

Hi Fahim!

 

I have to say, great choice with OwnCloud! I use it for staff storage, and customers who want backup space, it is absolutely fantastic. It has its bugs, but as long as you keep updating the server software and the client it gets better :)

 

I run OwnCloud on our Windows Server 2008 machine. Backing that up is automatic, I have Windows Backup create an image of the drive then FTP it to an offsite datacentre server during the night once every fortnight, we have no need for incremental, as I find them time consuming. I never ran Linux as an OwnCloud client, I kept telling myself I was gonna switch to Linux, but in the end time constraints forced us to go from Server 2003 to 2008.  I enjoy the flexibility of Linux and the update system, how everything including system and software is updated together, WITHOUT constant reboots!

 

OwnCloud itself has a file versioning system, though I think that's just for document files like ODF and Office files, not really used it as a feature.



#5 +LambdaLambdaLambdaFn

LambdaLambdaLambdaFn

    Neowinian

  • Joined: 13-November 13

Posted 24 December 2013 - 22:11

I would like a backup as well as being able to do file restore of any file in its past form.

I am not overly married to the file structure I described, although it would be my ideal.

 

I can't really speak to to OwnCloud.  I'm treating it as just a "drive".  If there is an automated backup for OwnCloud, you'd be best advised to use that. 

 

There are also backup solutions out there like Amanda and Bacula, probably worth looking into.  I'm not a sysadmin, I'm sure there's someone more qualified on these boards to answer these questions than me, but since nobody has answered you yet, I'll throw out these ideas for you... These are more than a little hacky, but will do the trick.

 

If you want point in time restore and the ability to see differences over time, you could do what you want to do by:

- setting up an SVN (or git or whatever revision control) repository on the NAS

- Set up cron job to add/commit the directories that matter to you nightly

 

This will take up a ton of disk space on the NAS for any binary file that has changed.  Text files will be more efficient -- it'll only store a diff. The upside is that you can compare revisions really easily and there are lots of tools available, and it's pretty easy to set up.

 

If you just want to sync files, look at

- rsync

- csync

 

Hope that helps.



#6 +snaphat (Myles Landwehr)

snaphat (Myles Landwehr)

    Electrical & Computer Engineer

  • Tech Issues Solved: 29
  • Joined: 23-August 05
  • OS: Win/Lin/Bsd/Osx
  • Phone: dumb phone

Posted 27 December 2013 - 00:55

InstantHC-Corey is right, the Linux-y way to do this is typically rsync. I'm not saying it is the right solution for you, but it does do incremental backups.



#7 OP Fahim S.

Fahim S.

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 15-April 02
  • OS: Windows 8 - OG
  • Phone: Google Nexus 4 16GB by LG

Posted 01 January 2014 - 14:16

I decided to use an app called BackInTime, which uses a combination of cron and rsync as well as some fancy hard-linking to save on space. So far so good.

Also had to set up a cron job to change permissions on the files created so that I can read them from my Windows machine.