Announcement

Collapse
No announcement yet.

Restoring a disaster - where do I put the music - a bit of a saga.......

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Restoring a disaster - where do I put the music - a bit of a saga.......

    So, problems various (initially self inflicted, with help from HP recovery software) meant a new desktop unit (I won't bore you with the details).

    I now know about how it's a nuisance to install a linux distro onto UEFI devices. My brother has configured this to put Kubuntu 18.10 on it (/boot, OS and swap on the SSD, and the /home on the HDD). So happily trying to work out what else it is that I've lost with the disaster of the previous desktop unit.

    The worst is likely to be re-ripping about 500 CD's worth of music (yes, I know, I should have had it backed up etc - that's now planned, I'll do that to an external SSD in a housing).

    This is likely (to my way of thinking) if I could put all the music in one place, but have both users set up so we can both access it for the music we want to listen to, maybe put on an mp3 player etc - I believe this shouldn't be a problem but I'm not sure of how to achieve this.

    I presume that I need a "global" location (directory or whatever I'm supposed to call it ?) so that I can put all the ripped music there. Then I need to work out how to point either user at it ?

    Any ideas or suggestions very much appreciated...
    What the large print giveth, the small print taketh away! Tom Waits.

    #2
    Well, since this is linux there are several ways to do this. Which is the best depends on your security needs. The simplest and least safe is to have a directory that has wide-open permissions: drwxrwxrwx. In about 30 seconds at least 5 people will jump on this thread and spit out a dozen reasons why this is a bad idea, but like I said it's your computer and only you know the level of security you need.

    Here's how I do it:

    Add all your users to the "users" group so you have a common group:

    sudo usermod -a -G users <username>

    Then make a folder for sharing (use whatever name you want for it) and allow all users in the "users" group to access it:

    sudo mkdir /shared
    sudo chown :users /shared
    sudo chmod g+ws /shared


    The "+ws" in chmod gives the group members write access to, and more importantly, forces any files or folders created in it to also belong to the "users" group instead of the primary group. That way all your "users" members are able to access all others files.

    The final step is to have each user create a symlink to the shared folder using their "Public" folder (assuming it's empty at this point).

    ln -s /shared ~/Public

    The only downside to this method I'm aware of is your brother will be able to delete as well as add files and folders to Public. If you don't want him to be able to add/delete files and folders, restrict the group to read-only and make yourself the owner of the folder so you can add/delete files. The advantage of this method vs. some others is when you add new users, they can "join the party."

    Another method would be to simply link your Music folder to your brother's home Music folder thus allowing him to play your music but not add or delete anything to it. He wouldn't be able to save his own music in there either using this method.
    Last edited by oshunluvr; Dec 16, 2018, 09:46 AM.

    Please Read Me

    Comment


      #3
      BTW, you might consider a second drive (if your system has room) to use as a backup device. This is usually cheaper and easier than an external device unless you need the mobility for the backup.

      Also, just some FYI;

      There's no reason to have a separate /boot partition unless you're using hardware or MDADM RAID or LVM.
      18.10 will be end-of-life in 9 months. A lot of folks new to Linux are better off sticking to an LTS (log term support) release like 18.04 because you're not upgrading in six months.

      Please Read Me

      Comment


        #4
        Hi
        I fell bad that you had the problem but please allow me to say that i had EXACTLY the same problem years ago

        I am going to gingerly suggest that before you do anything at all with the drive that you download knoppix and put it on a DVD ...NOT a usb and unplug the drive, run Knoppix, plug the drive back in and Knoppix will see it as a "storage drive", use the file search functions on Knoppix there are several, to look for your files, you really should be able to find them if the drive is able to be spun up.

        If you find them or do not find them purchase a HUGE usb and ALWAYS store your stuff on the USB, always, without fail.

        Don't try to do any kind of fancy backup or anything like that, just drag the files onto the usb using split screen and have done with it.

        I do not keep ANYTHYING on my working hard drive except for "current stuff" like the latest lectures and tests for a class but that also is on the USB in a file that I call "current" and date it.

        Anything that i have not accessed in say a month or so is COPIED to an external usb Hard Drive, I used to have a lot of small drives from back in the day but now everything is on one huge drive.

        This drive is kept attached to the work machine but I also have an indentical huge drive that i purchased at the same time that is only plugged in when files are moved "through the system so both drives have the same stuff but the second one is not connected to the work machine except when copying stuff to the first drive.

        Paranoid?

        Thare are those who would say that but I have pictures on the external drives that were taken with a Sony Mavica using the old floppy system.

        I started dong this backup routine when I had a hard drive that had file for a book on it that...CAUGHT FIRE... it was in one of those "compact" computers from a decade or more ago that would "go on a shelf".

        So, a lot of trouble but I really do not worry if a drive goes south an y more.

        woodjustsayin'smoke
        sigpic
        Love Thy Neighbor Baby!

        Comment


          #5
          Originally posted by oshunluvr View Post
          Well, since this is linux there are several ways to do this. Which is the best depends on your security needs. The simplest and least safe is to have a directory that has wide-open permissions: drwxrwxrwx. In about 30 seconds at least 5 people will jump on this thread and spit out a dozen reasons why this is a bad idea, but like I said it's your computer and only you know the level of security you need.

          Here's how I do it:

          Add all your users to the "users" group so you have a common group:

          sudo usermod -a -G users <username>

          Then make a folder for sharing (use whatever name you want for it) and allow all users in the "users" group to access it:

          sudo mkdir /shared
          sudo chown :users /shared
          sudo chmod g+ws /shared


          The "+ws" in chmod gives the group members write access to, and more importantly, forces any files or folders created in it to also belong to the "users" group instead of the primary group. That way all your "users" members are able to access all others files.

          The final step is to have each user create a symlink to the shared folder using their "Public" folder (assuming it's empty at this point).

          ln -s /shared ~/Public

          The only downside to this method I'm aware of is your brother will be able to delete as well as add files and folders to Public. If you don't want him to be able to add/delete files and folders, restrict the group to read-only and make yourself the owner of the folder so you can add/delete files. The advantage of this method vs. some others is when you add new users, they can "join the party."

          Another method would be to simply link your Music folder to your brother's home Music folder thus allowing him to play your music but not add or delete anything to it. He wouldn't be able to save his own music in there either using this method.
          Thank you for the response. I've done some reading since I posted the "Q", and figured that mostly it would come down to a permissions thing. I'm struggling to make my mind up about where to put a folder for the music. The only two users are me and my "erindoors" - I listen to mine in the PC while I'm doing something, whereas she likes to just have it there as the main location for her music that we copy to her mp3 player (I generally rip mine in .flac format, her's we tend to rip as .ogg as it doesn't matter about file size so much for mine and I prefer the lossless nature of it while she just worries about the number of tracks she can get onto her mp3 player).

          Anyway, what's confusing me, is that to have just something like a /music type directory, surely for us both to get to it (presuming it's on the system hard drive), it would need to be part of the root filesystem or we'd need a "user" called music ? I may be confusing things as while I'm not new to linux systems, I'm more user than administrator (that old adage, "I don't care how it works, I just want it to work").

          I'm now supposing that it may just be easier to sort out an external hard drive of some sort (most likely would be to "splash the cash" at an extra SSD). And just leave it connected so that generally it mounts at boot, but so that if I do need to do anything apart from move music to and from it, the system player will still know where to look for it and if anything I do might mess things up, I can just unplug it...
          Last edited by Snowhog; Dec 22, 2018, 06:28 AM.
          What the large print giveth, the small print taketh away! Tom Waits.

          Comment


            #6
            Originally posted by oshunluvr View Post
            BTW, you might consider a second drive (if your system has room) to use as a backup device. This is usually cheaper and easier than an external device unless you need the mobility for the backup.

            Also, just some FYI;

            There's no reason to have a separate /boot partition unless you're using hardware or MDADM RAID or LVM.
            18.10 will be end-of-life in 9 months. A lot of folks new to Linux are better off sticking to an LTS (log term support) release like 18.04 because you're not upgrading in six months.
            I'm thinking along the lines of a separate external drive, not really for portability, but so that I can just keep the music and any other stuff we want/need to keep and that if anything happens it's easier to unplug it from the system to prevent it's loss.

            I certainly don't have the patience to do that with an internal drive.

            As for needing the /boot part, I understand that normally that wouldn't be needed but my brother used that method as the system has some odd quirks from the UEFI thing and needing it to be allowed to do "legacy" boot - I'm trying to recall what he said about why it was the best/easiest answer at the time (basically even with the "legacy boot" thing switched on, it wouldn't boot the DVD I'd put the Kubuntu 18.10 on - the /boot option was a compromise ).

            I'm not fazed about when 18.10 becomes "end of life". Up until now, I've happily just done a full dist-upgrade when the newer "normal" version comes out - likely just lucky but those haven't been a problem doing that so far - but I'm guessing I'll have to wait and see how it goes when the next upgrade comes out...
            Last edited by Snowhog; Dec 22, 2018, 06:29 AM.
            What the large print giveth, the small print taketh away! Tom Waits.

            Comment


              #7
              Originally posted by woodsmoke View Post
              Hi
              I fell bad that you had the problem but please allow me to say that i had EXACTLY the same problem years ago

              I am going to gingerly suggest that before you do anything at all with the drive that you download knoppix and put it on a DVD ...NOT a usb and unplug the drive, run Knoppix, plug the drive back in and Knoppix will see it as a "storage drive", use the file search functions on Knoppix there are several, to look for your files, you really should be able to find them if the drive is able to be spun up.

              If you find them or do not find them purchase a HUGE usb and ALWAYS store your stuff on the USB, always, without fail.

              Don't try to do any kind of fancy backup or anything like that, just drag the files onto the usb using split screen and have done with it.

              I do not keep ANYTHYING on my working hard drive except for "current stuff" like the latest lectures and tests for a class but that also is on the USB in a file that I call "current" and date it.

              Anything that i have not accessed in say a month or so is COPIED to an external usb Hard Drive, I used to have a lot of small drives from back in the day but now everything is on one huge drive.

              This drive is kept attached to the work machine but I also have an indentical huge drive that i purchased at the same time that is only plugged in when files are moved "through the system so both drives have the same stuff but the second one is not connected to the work machine except when copying stuff to the first drive.

              Paranoid?

              Thare are those who would say that but I have pictures on the external drives that were taken with a Sony Mavica using the old floppy system.

              I started dong this backup routine when I had a hard drive that had file for a book on it that...CAUGHT FIRE... it was in one of those "compact" computers from a decade or more ago that would "go on a shelf".

              So, a lot of trouble but I really do not worry if a drive goes south an y more.

              woodjustsayin'smoke
              Thanks for the reply.

              HA knoppix ! Damn I'd forgotten about that distro. I used to have it installed onto a system when I was still routinely meddling with which distro I wanted to try etc. And yes, had a few different ones

              Sorting out backups etc, is one of those things on a "ToDo" list and now my procrastination has caught me out, not just with pictures etc, but the music files I allude to above.

              I sort of started looking into it before but whatever it was that I did got forgotten about - now, through necessity more than anything else, I want to sort this finally. I don't know of the best way to sort it - though I'd guess if you read my replies above to oshunluvr, you'll see that I am indeed leaning toward an external drive (it'd be mostly for the music, but it could also be useful to be a place for all data file backups.

              It's just something that I haven't really looked into properly or in depth, to understand how it works, let alone what, if any, kit I need to accomplish it...

              Security and/or paranoia aren't the driver behind this, just not loosing the music once I've got it all ripped again. Plus, the fact you've worked out how to keep a back up going for even old files etc, is brilliant. It's something I should have got sorted years ago...

              In truth, this is the first time I've had drive issues. I don't generally bother about warnings from "normal" software, but the BIOS warning that said about imminent possible HDD failure on the old PC "hit a cord".

              Since we bought that one, lots has changed and it's those changes that I'm having to discover and learn how to get round them...

              I'm not intending going OTT with this, and if needs be, I'll happily have our music in a directory in the /home of each user, but I still need to have somewhere to keep the original ripped files with enough permissions so that I don't lose them if the main PC has an issue. Equally if the music is on both /home and also on an external drive, I should be able to recover it from either direction (wondering if I can sort an extra "save" option so that when I or she gets new CD's etc, then I can just rip them and save them to the user side in /home but they also get saved to the main archive on the external)...
              Last edited by Snowhog; Dec 22, 2018, 06:27 AM.
              What the large print giveth, the small print taketh away! Tom Waits.

              Comment


                #8
                AFAIK, there's zero connection between UEFI boot vs. legacy boot and a boot partition. I boot legacy only as I keep Windows locked safely inside a virtual machine where it can do no harm. Boot partitions are usually used when the main file system is unreadable by the boot manager at initial bootstrapping. If you're using full disk encryption or RAID or a file system that's exotic or unsupported by the kernel (like ZFS), then you need a boot partition. EFI requires an EFI partition (type EF00) and GRUB requires a BIOS boot partition (type EF02) if you're not using EFI and are using a GPT formatted disk. If your brother is aware of something I'm not, I'd like to hear it. Regardless - this is a moot discussion and only for intellectual debate. As long as your system works, don't muck about with it - that's my motto.

                To the music, I would really be against the idea of an additional user. This would not enhance your access or ability to share and would add a level of complexity. BTW, I too rip only to flac.

                To recap my first suggestion: a special group you are both members of would allow, with proper permissions, access to a shared folder and files. Really, just a few commands and this will be in play. You could have two folders, one for ogg and one for flac if you wish.

                Briefly reading your use descriptions above it seems - given enough drive space, that two separate-but-equal storage places might be of use. What if you had all the music in your music folder as flac and she had all the music in her music folder as ogg? This would simply access considerably. Here's the idea:
                • You are responsible to rip music to flac and put it in your /music folder.
                • You backup your music folder onto the portable backup drive (could be automated with a script). No need to backup the ogg files. You can recreate them if needed.
                • You have a script that converts the contents of your music folder into ogg and puts it into her music folder
                • When you add music to your folder, you either run the script manually (from a Dolphin servicemenu if you prefer GUI usage) or the script runs and adds the music to her folder automatically (using cron or inotify)


                The hardest part would be creating the scripts, but nothing here is rocket science. I'm a big proponent of letting the system do the work for you. Isn't that why we have computers in the first place?

                Using an external drive for backups is always a good idea. You can even automate backing up and trigger it by just plugging in the drive.

                Really, what you need to focus on first is what you'd like to have your system do for you - the wildest dream scenario. If you run into a roadblock you can back down from your dream scenario a bit, but shoot for the stars and don't limit your ideas.

                Please Read Me

                Comment


                  #9
                  Fatbloke

                  a) whatever Oshunlover says is gospel, rely on it.

                  b) please consider the concept of "optimal path" or "path of least resistance".

                  This person wants this, that person wants that, you what you want.

                  Just what is it that YOu ...spend the MOST amount of time doing "this or that" and "for whom".

                  "Automated this and automated that" sound very wunnnerful in the wunnerful world of command line Linux"

                  But... just WHAT IS IT that you "want / need " to do?

                  If it takes "this amount of time to "rip" the original song"

                  and then it takes "that amount of time" to translate to "ogg" or "flac" just HOW MUCH TIME is involved in "each step"

                  going back to my original thing about how i do things.

                  If it takes "this amount of time to rip" that is the first choke point.

                  Then it take another amount of time to convert to FLAC, ( this may be your original rip but the original rip is not important).l. it will then take "another amount of time" TO RIP TO THIS OR TO THAT"

                  How much actual time is involved in ..."moving stuff" to the "partition". ?

                  a couple of minutes, ten minutes ...a half hour...

                  Me...im kinda stupid, I just keep things simple...

                  if I had to "make music" or whatever for "two people", to me...the critical juncture is...ME!

                  I make the stuff for ME on MY hard drive... that is the first bifurcation in the paths...

                  "converting" is chump change..

                  Depending on the size of YOUR hard drive...

                  a) do all the initial work on YOUR hard drive...

                  b) convert on your hard drive for person A , plug in a usb, split screens and drag to that persons usb...
                  c ) convert on your hard drive for person B , plug in a usb, split screens and drag to that persons usb...

                  d) MOVE the files to "their place" whaerever it is...

                  E) YOU still have all of the files...you can move them to another usb or another external hard drive...

                  It seems to me that you need to
                  a) spend a small amount of money or have external persons spend a small amount of money
                  b) determine the optimal path to move file to them.
                  c) determine which files need are "critical" and those need to be backed up in maybe several ways.

                  woodjustsomethoughtssmoke
                  sigpic
                  Love Thy Neighbor Baby!

                  Comment


                    #10
                    Wow! Your kind and excellent suggestions are exposing my personal shortcomings...

                    Procrastination, and when faced with choice, the inability to make a decision...😆👍

                    First I just figured that I could make a "joint" directory for all our music. That way, it should be straightforward to just re-rip the CD's to one location and set both users so that whether we open a music player or plug in her MP3 player to be able to drag/drop the tracks she wants on it.

                    I'm suspecting that my idea was too simplistic.

                    To explain where my understanding is at...

                    So a "combined" /music type idea won't work, because that would need the place to be part of the root file system ?

                    Ok, so then (again, as I understand it) it can't just be a directory in the /home area, because it would see /home/music as like an extra user ?

                    I was hoping to be able to sit there shoving CD's in and a few clicks and a wait so I could just use play lists for us to pick out the tracks we like/want (she doesn't like much of my music but there's a few of hers that we both like etc).

                    The idea was, that the one location would make it easier to keep a backup, so that if either I managed to screw things up (less likely now as we've got rid of l the windows stuff completely) or something failed (more likely because I tend to use the PC until it's basically falling apart around me) then I "should" (in theory) just be able to copy back from the backup ? We I presume that should be possible.

                    Both of you have been brilliant in trying to explain how I need to proceed, but I'm sorry to say that mostly it's going straight over my head (and making me very frustrated with myself for my own stupidity)...

                    Perhaps I should just rip the CD's to each of our accounts by genre, then work out how to back them up to an external location ? But then, isn't there still a permissions issue i.e. tracks from her account would be "owned" by her and tracks from mine, by me ?

                    Or is it that my stupidity is confusing me about how "permissions" work ?
                    What the large print giveth, the small print taketh away! Tom Waits.

                    Comment


                      #11
                      Oh and if I have to spend a bit to achieve the best solution, it shouldn't be a problem. I know I'm gonna have to get an external drive to keep the backup on (and I'm presuming that an external SSD would be best/quickest?)...
                      What the large print giveth, the small print taketh away! Tom Waits.

                      Comment


                        #12
                        Originally posted by fatbloke View Post
                        First I just figured that I could make a "joint" directory for all our music. That way, it should be straightforward to just re-rip the CD's to one location and set both users so that whether we open a music player or plug in her MP3 player to be able to drag/drop the tracks she wants on it. I'm suspecting that my idea was too simplistic.
                        Well, "simplistic" only in the sense that it doesn't accomplish what you described above. For example she wants/needs OGG while you want FLAC.

                        Originally posted by fatbloke View Post
                        So a "combined" /music type idea won't work, because that would need the place to be part of the root file system ?
                        Where you place any particular file or folder is less meaningful than HOW you make it. Ownership and permissions are totally under your control because it's your system and it's Linux. The reason to not put a folder for use like that directly under root is because you are doing something not standard. It's won't "break" anything, it just becomes hard to manage and track. It's better to put things where they "belong" so later on you can locate them and programs written by others will look in the right places. For example, the /mnt directory is intended to hold mounted file systems. If you put something else in there, a program like a file search might not look there.

                        Originally posted by fatbloke View Post
                        Ok, so then (again, as I understand it) it can't just be a directory in the /home area, because it would see /home/music as like an extra user ?
                        No, not at all true. /home is the default location for home folders, but it does not define users. You can put anything in there you like. Just like the above comment, it's not the normal location for things other than home folders, but since all the users would be sharing it it seems logical. Also, since you would want to back it up, putting it there would make backups easier. You can just make a backup of the home folder and all your home files, your other users home files, and your music files would be in the same backup.

                        Originally posted by fatbloke View Post
                        I was hoping to be able to sit there shoving CD's in and a few clicks and a wait so I could just use play lists for us to pick out the tracks we like/want (she doesn't like much of my music but there's a few of hers that we both like etc).
                        Well, since this in Linux you can make it do that, but your talking about some work to make that happen. One obstacle would be correctly identifying and tagging the music files - this doesn't always happen automagically. Also since you want both FLAC and OGG, there would be a copy-and-conversion action required also.

                        Originally posted by fatbloke View Post
                        The idea was, that the one location would make it easier to keep a backup, so that if either I managed to screw things up (less likely now as we've got rid of l the windows stuff completely) or something failed (more likely because I tend to use the PC until it's basically falling apart around me) then I "should" (in theory) just be able to copy back from the backup ? We I presume that should be possible.
                        Yes totally.

                        Originally posted by fatbloke View Post
                        Both of you have been brilliant in trying to explain how I need to proceed, but I'm sorry to say that mostly it's going straight over my head (and making me very frustrated with myself for my own stupidity)...
                        Lack of understanding and experience doesn't equal stupidity. It's simply not possible to know something you haven't been exposed to. Linux doesn't always force you to do things in a certain way so that means you're sometimes on your own to figure it out.

                        Originally posted by fatbloke View Post
                        Perhaps I should just rip the CD's to each of our accounts by genre, then work out how to back them up to an external location ? But then, isn't there still a permissions issue i.e. tracks from her account would be "owned" by her and tracks from mine, by me ? Or is it that my stupidity is confusing me about how "permissions" work ?
                        That sounds like how permissions and ownership work. This is why I suggested a special group for music or shared files in general. Then you can share files and force group membership in a specific folder. This is easy to do and keeps you from having to have a wide-open folder that anyone can access. This is how I have my server set up.

                        I suggest you first decide how you want this to work then once you've nailed that down, THEN start to figure out how to make it work they way you want. Don't let your lack of understanding what's possible define what you attempt to do. Let the ideas come, document them, then come back and ask if it can be done.

                        Many tasks can be automated or simplified by using Dolphin service menus or scripts. For example, you could have the insertion of a CD automatically cause the rip-to-flac process begin and rip the files to a shared folder. Your other user could open the shared folder with the FLAC files in it using Dolphin, select a file or group of files, and have them converted into OGG with a single click and sent to a folder that belongs to her. From there, she would have total control of those files. You could play FLAC directly from the shared folder anytime you wanted.

                        I have an extensive music collection (600-700 CDs). Another thing you need to consider is how you're going to store them (think Library filing system). I use Artist as the first folder, Album as the second folder, then the songs are labeled by track number and title. Like this;

                        Artist1
                        Album1
                        01 - Song one
                        02 - Song two
                        03 - Song three
                        Album2
                        01 - Song one
                        02 - Song two
                        03 - Song three
                        Artist2

                        and so on. This keeps the file names short and well sorted. You could easily make each song "Artist - Album - Track Number - Title" or whatever is important to you and not separate them at all with folders. I don't separate files by genre because that too subjective and many songs fit in more than one genre. I leave that to file tagging. My media software allows my to pick a genre by the tagged entries so a song might be in Rock and Classic Rock or whatever.

                        For compilation albums, I have a "Various Artists" folder, then Album, then name the files Track Number - Artist - Title.

                        Please Read Me

                        Comment


                          #13
                          Wow, look at this project: https://b3n.org/automatic-ripping-machine/

                          See? Half the work is already done!

                          Please Read Me

                          Comment


                            #14
                            Wow! more appreciation for the help etc, but that's even more over my head. I still have no understanding of how or where I could do this (it's likely quite basic for most - not me though).

                            I'm even more confused than when I first asked the question. Given the disaster I managed to create on the old PC (where I had her music in her account, and mine in mine etc), I'm trying to work out the priority in my mind as to whether it's best for all the music (irrespective of format) goes into one place so that we both just open a player in our separate accounts and the player is set up to look at one location, or whether it's just gonna be easier (but harder to manage back ups etc) to just rip her discs to wherever the system wants to put her music files and the same for my log in, then maybe just do a back up of each onto an external hard drive ?

                            I suppose I'm just a simple soul who likes an efficient, straight forward approach...
                            What the large print giveth, the small print taketh away! Tom Waits.

                            Comment

                            Working...
                            X