OpenVZ Forum

Today's Messages (on)  | Unanswered Messages (on)

Forum: Support
 Topic: prlctl snapshot
prlctl snapshot [message #53700] Tue, 29 September 2020 10:08
madboyprice is currently offline  madboyprice
Messages: 4
Registered: September 2017
Junior Member
From: *
OS: OpenVZ release 7.0.14 (136)

I have created a script to backup my CTs:

if [ -z $1 ]
         echo "Usage: backupCT CTID"
         exit 1

DATETIME=$(date +%F_%H_%M)
SHORTHOSTNAME=`hostname -s`

# Get container UUID
CONTAINERUUID=$(prlctl list $CTID -o ctid --no-header | awk -F'[}{]' '{print $2}')

# Known snapshot ID
VE_PRIVATE=$(vzlist -H -o private $CTID)

# Take a snapshot without suspending a CT and saving its config

echo Creating snapshot for $CTID
SNAPSHOTID=`prlctl snapshot $CTID | awk -F'[}{]' '{print $2}'`

# Perform a backup using your favorite backup tool
# (cp is just an example)
# cp -r $VE_PRIVATE/root.hdd/* $BACKUPPATH/

cd $VE_PRIVATE/root.hdd/

# Create archive
echo Creating Archive

tar cf - . $VE_PRIVATE/ve.conf | ssh backupserver "( cd /volume1/NetBackup/$SHORTHOSTNAME ; cat > $BACKUPFILE )"

# Delete (merge) the snapshot
prlctl snapshot-delete $CTID --id $SNAPSHOTID


For small CTs this seems to work fine. On a larger CT
/dev/ploop22452p1         51G   27G   22G  55% /vz/root/4e133b45-2487-46f2-8f3e-6edd0319b051
the snapshot fails with:

(00.022974) Seized task 17775, state 0
(180.008026 Error (criu/cr-dump.c:1849): Timeout reached. Try to interrupt: 0
(180.008171 Error (compel/src/lib/infect.c:236): Unseizable non-zombie 17775 found, state D, err -1/4

What might be causing this?

I thought they may be a 180 second timeout so I tried adding --timeout 360 to the prlctl snapshot command, but the same error occurred.

Current Time: Tue Sep 29 17:37:20 GMT 2020