<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">thanks man it is a big big line :) but cant we change it to auto? or may be we should use schedule and utilize vzdump command with our own backup script except the one on console.<br>
any possibility?</span><br><br><div class="gmail_quote">On Mon, Jul 25, 2011 at 3:55 PM, Stefan Sänger <span dir="ltr"><<a href="mailto:stsaenger@googlemail.com">stsaenger@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<div><div></div><div class="h5"><br>
<br>
On <a href="tel:25.07.2011%2009" value="+12507201109" target="_blank">25.07.2011 09</a>:33, Muhammad Yousuf Khan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ok my scheduled backup make files like this<br>
"vzdump-qemu-101-2011_07_21-<u></u>02_00_01.tgz" and i want them to be lil more<br>
informative<br>
like i want to add the machine name init so i can easily understand that<br>
which machine it is referring to. because remembering machine ID is a<br>
big headache.<br>
Please guide.<br>
</blockquote>
<br></div></div>
I had a quick look at this and came up with a one-liner to rename the files. Just replace "/var/lib/vz/backup" with your backup directory and run this after your backup-job has finished:<br>
<br>
BACKUPDIR="/var/lib/vz/backup"<u></u>; for J in $(find $BACKUPDIR | grep "qemu"); do ID=`echo "$J" |awk -F "qemu-" '{print $2}' | awk -F "-" '{print $1}'`; NAME=`cat /etc/qemu-server/$ID.conf | grep "name: " | awk -F ": " '{print $2}' `; TNAME=`echo "$J" | sed -e "s/vzdump-qemu-/$NAME-vzdump-<u></u>qemu/"`; echo "$ID $NAME $J $TNAME"; mv $J $TNAME; done<br>
<br>
(all this is supposed to be one-line)<br>
<br>
I know it is not really nice-looking, and perhaps there are better ways to do this, but at least it works...<br><font color="#888888">
<br>
<br>
<br>
Stefan<br>
</font></blockquote></div><br>