I have a central CentOS 7 backup server, where I run the following rsync
command in a script to pull the Application logs from 100's of Linux machines and then delete them.
rsync --remove-source-files --include-from=/tmp/$MACHINE_file.lst \
-v -a -l -K --rsh=ssh --stats $MACHINE:/ $BACKUPDIR/$MACHINE
I generate /tmp/file.lst
on the central backup machine for each machine using other script; It contains the following directories and files to be backed up.
+ /data1/
+ /data2/
+ /data2/sample/
- *
But recently I encountered a big problem where the /tmp
partition on the central backup server became full due to some other problem and hence /tmp/$MACHINE_file.lst
could not be created. This created a problem where rsync
started deleting the files from /
partition on the source machines. Any idea why?