[PVE-User] Backup filename

Muhammad Yousuf Khan sirtcp at gmail.com
Mon Jul 25 22:59:14 CEST 2011

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.
any possibility?

On Mon, Jul 25, 2011 at 3:55 PM, Stefan Sänger <stsaenger at googlemail.com>wrote:

> Hi all,
> On 25.07.2011 09:33, Muhammad Yousuf Khan wrote:
>> ok my scheduled backup make files like this
>> "vzdump-qemu-101-2011_07_21-**02_00_01.tgz" and i want them to be lil
>> more
>> informative
>> like i want to add the machine name init so i can easily understand that
>> which machine it is referring to. because remembering machine ID is a
>> big headache.
>> Please guide.
> 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:
> BACKUPDIR="/var/lib/vz/backup"**; 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-**qemu/"`;
> echo "$ID $NAME $J $TNAME"; mv $J $TNAME; done
> (all this is supposed to be one-line)
> I know it is not really nice-looking, and perhaps there are better ways to
> do this, but at least it works...
> Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-user/attachments/20110726/fec7a948/attachment.htm>

More information about the pve-user mailing list