Naming VM folder with date

2 views
Skip to first unread message

Dominique C.F.

unread,
Sep 11, 2009, 3:57:54 PM9/11/09
to vmsbackup
Hi again.

I'm using the script with the parameters "-s hot -f copy"
It's working all right, but i need put the date at the folder name of
the VM that is being backed up.

I tried to put the following:

BACKPATH='/backup/$DATE'

where $DATE is a variable (DATE=`date +%d-%m-%Y-%H.%M`)

I made a script that get's the date and creates the directory with
that name, then i call the vmsbackup like decribed.

when I run the script, all goes rigth except for the fact that the
$BACKPATH returns only the '/backup'

How can I solve that? Is there another way to do it?

10nico

unread,
Sep 19, 2009, 4:24:33 AM9/19/09
to vmsbackup
Hello Dominique.

Could it be that you have defined the $DATE variable *after* the
BACKPATH='/backup/$DATE' declaration?
This way the $DATE variable would still have no value and the
$BACKPATH would obviously contain only the /backup value

Regards,

Michele

On 11 Set, 21:57, "Dominique C.F." <dominiquecarva...@gmail.com>
wrote:

Dominique C.F.

unread,
Sep 19, 2009, 10:45:37 AM9/19/09
to vmsbackup
Hi Michele,

Tryed to put the variable in the midle of the path and i get an error
saying tha the BACKPATH doesn't exists.

Tryed things like (obviously i set the script for creating this
directories):
BACKPATH='/backup/bkp-"$DATE"'
BACKPATH='/backup/$DATE/vm'

Any oh them worked.

Have anyone tried any thing like this?
> > How can I solve that? Is there another way to do it?- Ocultar texto das mensagens anteriores -
>
> - Mostrar texto das mensagens anteriores -

Pär Tojkander

unread,
Sep 19, 2009, 11:58:48 AM9/19/09
to vmsb...@googlegroups.com
Try using ${DATE}.

/ Pär

Dominique C.F.

unread,
Sep 20, 2009, 1:16:45 PM9/20/09
to vmsbackup
Yet the same problem.

Have anyone tryed something like this?
> >> - Mostrar texto das mensagens anteriores -- Ocultar texto das mensagens anteriores -

Dominique C.F.

unread,
Sep 20, 2009, 1:17:24 PM9/20/09
to vmsbackup
Yet the same problem
Have anyone tryed so,ething like this?

On 19 set, 12:58, Pär Tojkander <par.tojkan...@gmail.com> wrote:
> >> - Mostrar texto das mensagens anteriores -- Ocultar texto das mensagens anteriores -
Reply all
Reply to author
Forward
0 new messages