Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 820  / 2 Years ago, mon, december 6, 2021, 6:41:24

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.


More From » server

 Answers
6

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.


[#34975] Tuesday, December 7, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
strhen

Total Points: 27
Total Questions: 111
Total Answers: 103

Location: Angola
Member since Tue, Apr 25, 2023
1 Year ago
;