OpenVZ Forum


Home » General » Support » ploop backup question - exclude delta file (Is it OK to exclude the delta file from the backup)
Re: ploop backup question - exclude delta file [message #51407 is a reply to message #51107] Fri, 09 May 2014 15:21 Go to previous message
luzifer2222 is currently offline  luzifer2222
Messages: 2
Registered: May 2014
Location: Germany
Junior Member
Hey tomp,

I have also this problem and I hope we could get help here.
I append my snapshot script and my point of view here.

I take this script to do my snapshots:
#!/bin/bash

array_der_virtuellen_maschienen=$(/usr/sbin/vzlist -a1H)
for virtuelle_maschiene in $array_der_virtuellen_maschienen;
do

BACKUPPATH=/raid/.backup_vz/$virtuelle_maschiene/$virtuelle_maschiene-$( date +%F_%H_%M )

#create BACKUP-PATH
/bin/mkdir -p $BACKUPPATH

# Known snapshot ID
ID=$(uuidgen)
VE_PRIVATE=$(/usr/sbin/vzlist -H -o private $virtuelle_maschiene)

# Take a snapshot without suspending a CT and saving its config
/usr/sbin/vzctl snapshot $virtuelle_maschiene --id $ID

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

# Delete (merge) the snapshot
/usr/sbin/vzctl snapshot-delete $virtuelle_maschiene --id $ID

# remove old backups
/bin/rm -rf $( find /raid/.backup_vz/$virtuelle_maschiene/* -type d -name "$virtuelle_maschiene*" -exec ls -d1rt "{}" + | head -n-4  )

done

chmod 600 /raid/.backup_vz

echo "BACKUP FINISHED."

But I do not understand why I first create a snapshot then copy it to my backup path an after that I delete the snapshot.

Every time I backup my CT's I have to copy the complete root.hdd directory, but my CT Ploop devices are huge and it takes a lot of time to copy it.
Is there a opportunity to copy just the created snapshot files?

I hope anyone could help me. Thank you.
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Previous Topic: Snapshotscript Ploop/Backup
Next Topic: vzctl exec cron not working
Goto Forum:
  


Current Time: Tue Aug 19 16:01:11 GMT 2025

Total time taken to generate the page: 0.13745 seconds