3

I just built a new media/backup server using Ubuntu 12.04 64bit. I installed a hard drive to be used only for music, pictures, and videos and formatted it fat32 so my 1 and only Windows PC could map those folders as netshares. My laptop, also running Ubuntu 12.04, is what I am using the most so new media is first downloaded on my laptop. I've already got the music, videos, and pictures folders from my server mounting as shares on my laptop on boot thanks to some fstab edits and sshfs. Now I'm wanting either an app or script that could backup any new files I add to my local media folders to the mounted folders on my server. I've been Googling all day and found a few apps like rsync but they seem to have issues with ext4 to vfat backups. I thought maybe a script would be best but I'm new to scripting in Linux and don't want to mess anything up.

Basically I am looking for something that will backup only newly added files to the server. I figure I could schedule it once a week. There are some stipulations. For example, my local music folder has over 700 folders for each artist/band then sub folders inside those for albums. I want something smart enough to only copy newly added content so I'm guessing the modified date would probably be a good condition if I were scripting. I'm rambling.

Any suggestions would be GREATLY appreciated. I'm not finding anything to suit my needs. I'm almost to the point of just learning bas scripting so I can write something but then it will be a couple weeks or so before I have a possible solution and I'd like something in place sooner.

3 Answers3

2

Firstly, your reasons for making the share directory FAT are erroneous. Only the computer mounting the drive or partition needs to be compatible with the filesystem. After that it is just a network resource. If you want to store larger files (example Movies) then you've just shot yourself in the foot because the maximum file size under FAT32 is 4Gb. Your library is much better off on a journalling filesystem like ext4 for reasons of reliability, usefulness, and speed.

rsync does work fine writing to FAT partitions - I do it all the time as some of my pendrive backups are FAT. You do lose all the owner and permissions information though, since FAT has no way of storing this information, but it's a moot point however, since I'd recommend you drop the use of FAT32 for your mass storage device. Look at the -av switches for rsync - ie

rsync -av ~/Downloads/Movies/  /Path-to-Destination/Movies

Which will work exactly as you want it to.

fabricator4
  • 8,375
  • Rsync it is then. I just have to figure out which switches I need to only copy the new files over. – DigitalJedi Oct 14 '12 at 02:01
  • -av are the switches. It copies only new or changed files, and preserves attributes like ownership creation date, and permissions. – fabricator4 Oct 14 '12 at 03:42
  • Note: if you see some unusual activity while using rsync (e.g. rsync copying all files even though they weren't changed) you might be facing a problem with NTFS/FAT compatibility. In that case, please refer to this Q&A for a solution. – Glutanimate Oct 14 '12 at 11:32
1

Ubuntu One comes packaged with Ubuntu. You could log into both computers with the same account, and all data would be synced between the two computers. It's cross platform, with the new beta for Mac. You get 5GB free, then more on pricing can be found here.

It may not be a free solution if you need more storage, but it's very effective, and it also makes your files web accessible.

What is Ubuntu One?

Ubuntu One is the personal cloud that brings your digital life together, so you can enjoy your content, your way, wherever you are. With our suite of cloud services including storage, sync, sharing and streaming - you have immediate access to your music collection, favorite photos, videos, important documents and more, at any time and from any device.

Ubuntu One is easy to install and easy to use – everyone gets our sync services and 5 GB of storage for free, and if you pay a little extra, you can add Music Streaming and Storage to suit your own needs.

Source: https://one.ubuntu.com/about/

Kyle Macey
  • 1,679
0

I agree to @Kyle Macey's answer.

Nevertheless, for a Backup purpose it is important to have some additional and helpful features of which I suggest to have the possibility to bring back something that was deleted in the past. Feature that I haven't found yet in Ubuntu One and that Dropbox has already solved since the very beginning of their service.

Ubuntu One and Dropbox keeps in sync several files/folders between computers, but if you accidentally or intentionally delete a file/folder, Dropbox will keep it in the list to be undeleted. Feature that I haven't yet found in Ubuntu One and that became SO IMPORTANT for me and if you run a search on "how to recover data" right here you'll see that there are at least 5000+ questions related, so it is not my personal need but vox populi.

Both Ubuntu One and Dropbox they are awesome for backing up and sync both but, meanwhile I have recommended both Dropbox and Ubuntu One to several friends, they accepted to install only Dropbox since it is easier and faster to configure in several operating systems other than Ubuntu. This situation resulted in my current Dropbox available storage increased up to 8.5GB meanwhile my Ubuntu One remains in the original 5GB.

Both Ubuntu One and Dropbox offer paid services but let's face it. Dropbox is easiest to use.


Take a look to ownCloud (http://owncloud.org/) and similar software list (http://alternativeto.net/software/owncloud/) that includes Dropbox and Ubuntu one. ownCloud is an easy to use self hosted cloud which I have used in the past. Nevertheless it lacks of a per-OS based client and even so it allow you to run backups and gain access to your files from the outside of your network via LDAP and other ways. See the comprehensive list of features at: http://owncloud.org/features/

Good luck!

  • I use Ubuntu One and Dropbox free accounts, but I'm not willing to pay for additional storage since free options laying around. Ideally, I should suck it up and pay for a cloud service but that will have to wait. – DigitalJedi Oct 14 '12 at 02:03
  • Take a look at my edit. ownCloud seems to be a good choice for a free self-hosted cloud. Good luck! – Geppettvs D'Constanzo Oct 14 '12 at 02:14