OpenVZ Forum

Home » General » Support » prlctl snapshot (CT snapshot failing)
prlctl snapshot [message #53700] Tue, 29 September 2020 10:08
madboyprice is currently offline  madboyprice
Messages: 4
Registered: September 2017
Junior Member
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.

Update 1:

Instead of using 'prlctl snapshot' I tried 'vzctl snapshot' with the --skip-suspend option, this created a snapshot almost instantly.

[Updated on: Tue, 29 September 2020 19:15]

Report message to a moderator

Read Message
Previous Topic: Ploop Incremental backups strategy
Next Topic: disk softlimit exceeded during CT creation
Goto Forum:

Current Time: Fri Mar 24 10:26:54 GMT 2023

Total time taken to generate the page: 0.00821 seconds