I am having 1 tape drive and I want to take incremental backup of 5 folder to the tape drive on every Friday.But the location of the five folders are on one server and the LTO mounted on a different machine.How can I make the backups.
How to take incremental backup in tape drive
linux;shell script;backup;centos;tape
First make sure the user that you are going to use to make the backups:can read all the 5 folders and their content is able to use ssh into the server with the LTO ( lets call that 'remote') without authentication into an acount named ltouser. If necessary setup such an account.can write to the tape after doing the ssh, assume the device name is /dev/st0If all that is working you can use tar to make a backup.tar -cv -f ltouser@remote:/dev/st0  YOUR_LOCAL_DIRECTORIESOnce that works, you can add the --newer option to start making incremental backups. To that option you can provide a date, but often it is more easy to use a file as reference:cd parent/directory/of/your/stuff/to/backuptouch /var/tmp/next_dts_referencetar -cv --new dts_reference -f ltouser@remote:/dev/st0  YOUR_LOCAL_DIRECTORIESmv /var/tmp/next_dts_reference dts_referenceIt is important to create the reference file before doing the backup, but move it afterwards. That way next week you don't miss files that were created during the backup.