CloneVM snapshot dont use all disks

Discussions related to using VirtualBox on Linux hosts.

CloneVM snapshot dont use all disks

Postby bopfi68 » 29. Jan 2020, 08:18

hello

i wand to take an online backup of some vms by
take snapshot
clone snaphot
remove snapshot
create compressed copy on external storage
remove clone

1st problem
i didnt register the cloned vm
but i have errors in the virtual disk manger

2nt problem
in the first tests it worked fine with all attached disk
but now he only clones the first disk

any idea ?

here is the script

-------------------
DATUM=`date +%Y-%m-%d_%H-%M-%S`

/usr/bin/vboxmanage snapshot $VM delete SnapClone

sleep 10

/usr/bin/vboxmanage snapshot $VM take SnapClone --live

sleep 10

#test
#/usr/bin/vboxmanage clonevm $VM --name="$VM-bak" --snapshot="SnapClone" --options keepallmacs --options keephwuuids --keepdisknames --basefolder=/home/vboxuser/VMClone
#active
/usr/bin/vboxmanage clonevm $VM --name="$VM-bak" --snapshot="SnapClone" --options keepallmacs --basefolder="/home/vboxuser/VMClone"

sleep 10

/usr/bin/vboxmanage snapshot $VM delete SnapClone

sleep 10

/usr/bin/vboxmanage snapshot $VM delete SnapClone

sleep 10

trickle -d 51200 -u 51200 /usr/bin/tar -czf /mnt/backupall/vclone/$VM-bak-$DATUM.tgz /home/vboxuser/VMClone/$VM-bak

sleep 10

rm -fr /home/vboxuser/VMClone/$VM-bak

sleep 10
-------------------
bopfi68
 
Posts: 1
Joined: 29. Jan 2020, 08:07

Re: CloneVM snapshot dont use all disks

Postby scottgus1 » 29. Jan 2020, 17:53

Taking a backup of the Virtualbox guest from the host side while the guest is running is not a good backup. The guest backup will be left in a still-running state and when it is restored the guest will start up thinking it crashed the last time. Databases may be corrupted, data in the caches may be lost, etc. Data loss = bad backup.

If you must do a backup while the guest is running, use in-the-guest backup software that is fully compatible with the guest OS and all other software running in the guest, and write the image out via a real shared folder to the host drives or networked storage.

Virtualbox cannot provide a completely reliable guest backup while the guest is running.

And remember, any backup scheme that does not restore completely isn't a backup scheme.

The best backup is with the guest off. A simple file-copy of the guest folders is restorable by just overwriting the original folder with the copy. And the backup can be 'FC' file-compared for onsite storage or SHA256/512/Tiger/Whirlpool hashed to quite-likely-confirm the backup on offsite storage.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
Volunteer
 
Posts: 6214
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 18 guests