More > JRiver Media Center 29 for Linux

JRiver Media Center 29.0.18 for Debian Buster (amd64, i386, arm64 and armhf)

<< < (2/5) > >>

RemyJ:
No worries.   A short script added to "/usr/lib/jriver/Media Center xx"  that runs rsync and maybe sed to clean up any changes might be a good idea though.  Doesn't even have to be run automatically.  Just something for a user to run.

bob:

--- Quote from: RemyJ on March 11, 2022, 05:53:28 am ---No worries.   A short script added to "/usr/lib/jriver/Media Center xx"  that runs rsync and maybe sed to clean up any changes might be a good idea though.  Doesn't even have to be run automatically.  Just something for a user to run.

--- End quote ---
That's an excellent suggestion.
Thanks.

BryanC:
When is the config directory created? On first run or during package install? I'm adding migration to installJRMC (for single version increments, good enough for now).


--- Code: ---MVERSION=29
migrateLibrary() {
    debug "Running: ${FUNCNAME[0]}"

    declare mc_user_path="$HOME/.jriver"
    declare current_config_path="$mc_user_path/Media Center $MVERSION"
    declare previous_config_path="$mc_user_path/Media Center $(( MVERSION - 1 ))"

    if [[ ! -d "$current_config_path" ]] &&
    [[ -d "$previous_config_path" ]]; then
        echo "Migrating $previous_config_path to $current_config_path"
        rsync -a "$previous_config_path" "$current_config_path" &>/dev/null
    fi
}

--- End code ---

mwillems:

--- Quote from: bob on March 10, 2022, 03:32:56 pm ---That's not an automatic part of linux MC at this time.
The safest way is to do a library backup in MC28 and restore to MC29.
That will require a rebuild of the thumbnails though.

A kind of power user way to do it would be to open a terminal as the MC user (without MC28 and MC29 running)
and do:

--- Code: ---rsync -av ~/.jriver/Media\ Center\ 28/    ~/.jriver/Media\ Center\ 29
--- End code ---
Note the trailing / on the source but NOT on the destination.
If you get a rsync not found message, install it.
sudo apt-get install rsync
and retry the above.
After that's done you can run MC29 and clean up the 2 options from MC28's settings that were transferred as is:
Program Files->Library Backups
and
File Location->Cover art

Note that then MC29 will have the same settings, UUID's etc as MC28 had so you can't really run them at the same time or your Media Network will be messed up.

--- End quote ---

So a naive question:  why use rsync at all when "cp -a" does more or less the same thing and is present on every linux system by default?  I just tried migrating a few machines by running this snippet with MC closed (note lack of trailing slash, which is a syntax difference from rsync):

 
--- Code: ---cp -a ~/.jriver/Media\ Center\ 28 ~/.jriver/Media\ Center\ 29
--- End code ---

And everything just kind of worked that way.  Maybe there's a failure case I'm missing, but if you're writing a script to help users automate, it's probably better to rely on coreutils if you can. 

BryanC:
It makes no difference really. rsync just creates the missing destination directory automatically so it's one less line of code.


--- Code: ---MVERSION=29
migrateLibrary() {
    debug "Running: ${FUNCNAME[0]}"

    declare mc_user_path="$HOME/.jriver"
    declare current_config_path="$mc_user_path/Media Center $MVERSION"
    declare previous_config_path="$mc_user_path/Media Center $(( MVERSION - 1 ))"

    if [[ ! -d "$current_config_path" ]] &&
    [[ -d "$previous_config_path" ]] &&
    mkdir -p "$current_config_path"; then
        echo "Migrating $previous_config_path to $current_config_path"
        cp -a "$previous_config_path"/* "$current_config_path" &>/dev/null
    fi
}

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version