Results 1 to 7 of 7

Thread: How do I update and external USB drive to match a folder on my computer in Linux?

  1. #1
    Join Date
    Apr 2014
    Beans
    35

    How do I update and external USB drive to match a folder on my computer in Linux?

    I have a master directory of my music library (mp3 files) on my desktop computer. Sometimes I update it or make tweaks to it as I get new music, or fix mp3 tags, etc.
    In both my cars, I have copies of this folder on USB sticks so I can listen to the music. The way I have been updating my USB sticks is to blank them and make a new copy of the Master directory on them. But seeing as my music library is large (about 60GB of data) and the changes I make are only ever a small fraction of this, it seems very inefficient and copying over all that data twice takes a very long time.

    Is there a tool in Linux that would allow me to update the USB sticks so that they match the master directory. Something that would "see" the differences between the Master and the USB folder and make only those changes to the USB copies that are necessary?

    Thanks,

  2. #2
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How do I update and external USB drive to match a folder on my computer in Linux?

    Something that would "see" the differences between the Master and the USB folder and make only those changes to the USB copies that are necessary?
    You may not realise it but you hit on the correct keyword - "differences".

    Explore tools such as rsync and rdiff-backup and others designed to backup changes or differences.
    A quick search for "backup differences" will reveal articles.

  3. #3
    Join Date
    Apr 2014
    Beans
    35

    Re: How do I update and external USB drive to match a folder on my computer in Linux?

    Thanks. I should have mentioned, I'd prefer something with a GUI if possible, but can do command line if I must.
    Also, I was hoping to not get into a whole backup manager, as I only need the software for just this one purpose. Like something that could backup a whole network of files would be overkill for my purposes, so was hoping someone could suggest something simple and light. I will search for the keywords you suggested, too.

  4. #4
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    10,082

    Re: How do I update and external USB drive to match a folder on my computer in Linux?

    Rsync is a better kind of copy. Read the man page and play with it a bit. you won't be sorry.

  5. #5
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How do I update and external USB drive to match a folder on my computer in Linux?

    I'd prefer something with a GUI if possible, but can do command line if I must.
    As @Herman writes .. Rsync by command line .. but also explore Grsync the GUI version which also gives as output the rsync command line.

  6. #6
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    4,787

    Re: How do I update and external USB drive to match a folder on my computer in Linux?

    The copy command (cp) has an option (u) that will copy only files that are newer in the source folder than in the destination folder, or don't exist in the destination. Together with an 'r' option for copying subfolders as well, it's probably sufficient for what you want.

  7. #7
    Join Date
    Apr 2007
    Location
    South Carolina
    Beans
    939
    Distro
    Ubuntu Studio 16.04 Xenial Xerus

    Re: How do I update and external USB drive to match a folder on my computer in Linux?

    I would recommend putting the command you decide to use in a shell script & put it on your desktop so you can just click on it to do your backups. If all your USB stcks have the same label that would make it easy but you could use a variable like $1 instead for the path.
    Gary

    I wish I knew what I used to know before I knew what I didn't know.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •