TonyGroves
Programmer
This is probably a very simple thing, but I'm new to Linux, and my shell-scripting skills are quite basic, so a little help would be appreciated.
I need a little script to completely back-up my Linux laptop to my W*****s server, so I wrote the following:
[tt]
#! /bin/sh
d=`date +'%Y%m%d-%H%M%S'`
sudo tar \
--exclude=/SAMBA \
--exclude=/var/spool \
-cvzf /SAMBA/tg/SERVER/backup/tonyslaptop/$d.tar.gz \
/bin /boot /etc /home /lib /opt /root /sbin /srv /usr /var \
1>~/backup.log \
2>~/backup.err
[/tt]
It seems to work fine, except that the 'verbose' output of directories being backed-up appears on the screen, not in the log file as intended. Can somebody tell me what I need to do?
Thanks a lot.
I need a little script to completely back-up my Linux laptop to my W*****s server, so I wrote the following:
[tt]
#! /bin/sh
d=`date +'%Y%m%d-%H%M%S'`
sudo tar \
--exclude=/SAMBA \
--exclude=/var/spool \
-cvzf /SAMBA/tg/SERVER/backup/tonyslaptop/$d.tar.gz \
/bin /boot /etc /home /lib /opt /root /sbin /srv /usr /var \
1>~/backup.log \
2>~/backup.err
[/tt]
It seems to work fine, except that the 'verbose' output of directories being backed-up appears on the screen, not in the log file as intended. Can somebody tell me what I need to do?
Thanks a lot.