Dear all
I am trying to make a simple script to making
To make it look clean, I will store the ssh connection parameters, the basic backup path and the current date in variables. And then run the relevant
But I can't figure out how to combine/concenate the variables.
I have looked almost anywhere on the net and in the manual sh(1) without finding the right solution.
Lines from my not-working script:
The echo output is obviously wrong - missing the date part:
I have very limited experience in scripting so I guess the solution is straightforward.
Any help appreciated
Regards,
Jon
I am trying to make a simple script to making
rsync
incremental backups from my FreeBSD server (10.1-Release) to a FreeNAS box. Should create new subdirs named by the current date on the NAS box and run from cron
.To make it look clean, I will store the ssh connection parameters, the basic backup path and the current date in variables. And then run the relevant
rsync
command using these variables.But I can't figure out how to combine/concenate the variables.
I have looked almost anywhere on the net and in the manual sh(1) without finding the right solution.
Lines from my not-working script:
Code:
#!/bin/sh -xv
SSHCONNECT="ssh -p 9851 root@192.168.1.51"
SSHPATH="/mnt/naspool/nasstorage/backup/mflserver4/"
DATE="`date +%Y-%m-%d`"
*NEWDIR="$DATE$SSHPATH"
echo "$NEWDIR"
Code:
/mnt/naspool/nasstorage/backup/mflserver4/
Any help appreciated
Regards,
Jon