mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-02 02:53:58 +01:00
Update pms-copy-data.sh
This commit is contained in:
parent
70c2e726f6
commit
b6f17836b0
@ -80,13 +80,8 @@ whiptail --defaultno --title "$TITLE" --yesno \
|
||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||
Version: 2022.01.24" 13 50 || exit
|
||||
info "Plex Media Server Data from '$CTID_FROM' to '$CTID_TO'"
|
||||
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
||||
msg "Stopping '$CTID_TO'..."
|
||||
pct stop $CTID_TO
|
||||
fi
|
||||
msg "Mounting Container Disks..."
|
||||
DATA_PATH=var/lib/plexmediaserver/Library/Application Support/Plex Media Server/
|
||||
mkdir ${CTID_TO_PATH}${DATA_PATH}
|
||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
|
||||
die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
|
||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \
|
||||
@ -97,7 +92,7 @@ CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
|
||||
die "Plex Media Server directories in '$CTID_TO' not found."
|
||||
|
||||
#rm -rf ${CTID_TO_PATH}${DATA_PATH}
|
||||
#mkdir ${CTID_TO_PATH}${DATA_PATH}
|
||||
mkdir ${CTID_TO_PATH}${DATA_PATH}
|
||||
|
||||
msg "Copying Data Between Containers..."
|
||||
RSYNC_OPTIONS=(
|
||||
|
Loading…
Reference in New Issue
Block a user