How to unrar multiple .rar files in OMV 5

  • I have a file that I'm trying to extract that was broken up into multiple .rar files (.rar, .r00, .r01, etc). I've tried dtrx, unrar-free and unp but all three failed. I also tried installing unrar, but it couldn't install. I ended up using 7zip over the network to get my file extracted.

    I've copied down what the terminal outputs for each program I've tried on the same file, and also what happened when i tried to install unrar via terminal. I installed the other three programs through the apttool plug in.


    dtrx


    unrar-free

    Code
    Extracting <filename> Failed
    1 Failed


    unp - not sure why it failed because unrar-free was installed when I ran it

    Code
    unrar 0.0.1 Copyright (C) 2004 Ben Asselstine, Jeroen Dekkers
    Extracting from <filepath.rar>
    Extracting <file> Failed
    1 Failed
    Error, following packages must be installed in order to proceed:
    rar or unrar or unrar-free


    unrar


    Any suggestions on how to fix my issue?

    Bonus points if you can suggest a way to auto unrar files in a folder once a download finishes or if that is not possible, to run a command once on a directory and have it extract from all sub directories.

  • Don't use unrar-free.


    Instead use unrar-nonfree. Then you can unrar multipart rar files, as expected.


    sudo apt install unrar-nonfree


    As for automatically unrar files, when a download finish, it depends on what you download and with what. Most likely the software can trigger something when a download is done. If not, use another downloader. There are many, many solutions to your problem. It has been solved thousands of times already. And in a thousand different ways...

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • I'll check out unrar-nonfree and report back with my results tomorrow.


    I'm currently using filezilla FTP to download the files, and as far as I can tell it is unable to trigger upon download completion. I've been googling around, and not having much luck on finding a solution that works for me. Any suggestions?

  • You could use inotify. It is a catch-all solution.


    It can trigger events when a file appear. It could start a script that checks if a download is complete and if so unrar.


    Or simply brute-force it: Try to unrar everything that looks like a valid rar file every X minutes, again and again. Setup a cron task. And if/when the unrar is successful, have the script move the unrared files away.


    Or slightly more finesse: Have a script check modified times or sizes of files in the download folder. When a file hasn't been changed in X minutes, try to unrar it. Try again after some other file has finished downloading.


    Instead of brute-force unraring, try check files for completeness. Look for missing parts and only try to unrar if all files seem to be there.


    Have a sensor detect when you approach the computer to look to see if it is done. Then have the software try to unrar everything. Then everything that can be unrared will be unrared as you are by the computer to check.


    There are many, many other methods. What decide what method to use and if you succeed is only you and your automating/programming/scripting ability.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • so i tried installing unrar-nonfree and got the same error as when I tried to install unrar. I'm guessing that means I need to add a repo?


  • I guess you need to enable nonfree.


    Google: "how do i enable nonfree packages in Debian" for details.


    I use p7zip-rar with rar files. But it is far between them...

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • Is there a way to do it within the OMV webgui? I'm not seeing anything that refers to non-free in apt tool, OMV Extras or update management . Just want to make sure before I jump into command line.

    Not any more. The ability to add additional repos in the GUI was removed.


    I have the below in my /etc/apt/sources.list


    Code
    deb http://security.debian.org/ buster/updates main contrib non-free
    deb-src http://security.debian.org/ buster/updates main contrib non-free
    deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free
    deb-src http://ftp.us.debian.org/debian/ buster-updates main contrib non-free

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • hotsauce

    Added the Label resolved
  • gderf  Adoby Do you guys know what the difference between unrar e and unrar x is supposed to be? It seems to behave the same way when I run the command, in that the unrar'd file ends up in the directory the command was called in.

    e - Extract files to current directory.
    x - Extract files with full path.

  • I think that you get different results if the compressed files were a folder structure with subfolders. Then x would recreate the folder structure but e wouldn't.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • Not any more. The ability to add additional repos in the GUI was removed.


    I have the below in my /etc/apt/sources.list


    Code
    deb http://security.debian.org/ buster/updates main contrib non-free
    deb-src http://security.debian.org/ buster/updates main contrib non-free
    deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free
    deb-src http://ftp.us.debian.org/debian/ buster-updates main contrib non-free


    I editet the text in /etc/apt/sources.list using nano to match your code-box, and tried sudo apt install unrar-nonfree afterwords. (After I sudo apt-get update)


    Still gets

    Code
    root@debian:/# sudo apt-get install unrar-nonfree
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package unrar-nonfree is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package 'unrar-nonfree' has no installation candidate

    OMV 5 on Debian 10

  • Something with the repos changed since I posted that back in April. What I posted then was working.


    You could just download the unrar package and install it by hand. You don't say what hardware platform you are on, so you will need to track down the correct package if different than amd64.


    Code
    wget http://ftp.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_5.6.6-1_amd64.deb
    sudo dpkg -i unrar_5.6.6-1_amd64.deb

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!