I created a backup-shell that runs as a cron job. That's not new.... But in the command line I have the logfilename specified with a date format. All is ok, until it reaches the folder where the logfile resides. It creates a folder witha that name and it looks like rsync is copying everything in that folder, including the strange foldername, over and over again. I try to rsync to my synology where DSM 6.1 is installed. I shared a folder on the synology to /mnt/NAS2 on my server The script is
/root/backup/backup_daily.sh
it is set to run once a day. the command line in the script is basically:
rsync -avzr --stats --progress --log-file=$(date +'%Y%m%d') --exclude-from=$EXCLUDE / /mnt/NAS2/backup
(I use some vars for the options, but for clarity replaced by the strings. I have tried to do in the script as well, does not make any difference.) In the exclude file are some folders, including /root/backup/
Here is what happens, see after the file 'xx':
2017/04/03 20:51:09 [1669] >f+++++++++ lib/xtables/libxt_time.so
2017/04/03 20:51:09 [1669] >f+++++++++ lib/xtables/libxt_tos.so
2017/04/03 20:51:09 [1669] >f+++++++++ lib/xtables/libxt_u32.so
2017/04/03 20:51:09 [1669] >f+++++++++ lib/xtables/libxt_udp.so
2017/04/03 20:51:09 [1669] cd+++++++++ lib64/
2017/04/03 20:51:09 [1669] cL+++++++++ lib64/ld-linux-x86-64.so.2 -> /lib/x86_64 -linux-gnu/ld-2.23.so
2017/04/03 20:51:09 [1669] cd+++++++++ opt/
2017/04/03 20:51:09 [1669] cd+++++++++ root/
2017/04/03 20:51:09 [1669] >f+++++++++ root/.bash_history
2017/04/03 20:51:09 [1669] >f+++++++++ root/.bashrc
2017/04/03 20:51:09 [1669] >f+++++++++ root/.profile
2017/04/03 20:51:09 [1669] >f+++++++++ root/.selected_editor
2017/04/03 20:51:09 [1669] >f+++++++++ root/20170403
2017/04/03 20:51:09 [1669] >f+++++++++ root/xx
2017/04/03 20:51:09 [1669] cd+++++++++ root/+"%Y%m%d").log/
2017/04/03 20:51:09 [1669] cL+++++++++ root/+"%Y%m%d").log/initrd.img -> boot/in itrd.img-4.4.0-71-generic
2017/04/03 20:51:09 [1669] cL+++++++++ root/+"%Y%m%d").log/initrd.img.old -> boo t/initrd.img-4.4.0-70-generic
2017/04/03 20:51:09 [1669] cL+++++++++ root/+"%Y%m%d").log/vmlinuz -> boot/vmlin uz-4.4.0-71-generic
[This goes on and on.]
I must do something obviously thing wrong... Hope I supplied enough info and did use the correct rules/indents, as it is first post on this forum.