Aleksandersen
July 10th, 2008, 12:16 AM
I want to automate a backup process using rsync, ssh, and compression. (At least I believe these are the best tools.)
I am going to explain how I picture this system, and I hope someone will find the time to help me with this. I guess this needs to be setup as a bash script that will be run daily from /etc/cron.daily/.
I do not want to take a backup copy of every files on my system. But rather, I would like to create a text file listing files and directories that should be backed up. I imagine one path per line. For example:
/etc/apt/sources.list
/home/daniel/.lynxrc
The local copy ought not need to be transmitted to the backup location if the local file has not been modified. (I presume this is where rsync come in handy.) Secondly, the remote copy should be compressed. (.gz for single files and .tar.gz for directories.)
The first backup location is not always available, it is an USB hard drive located at /media/terabyte/ when it is available. The script should check whether the device is mounted (it is if the directory exist) before continuing with making the backup. The second location is an Apache server from a service provider available trough SSH, for secure file transfers.
I really hope someone will help me make this system. Thanks in advance!
I am going to explain how I picture this system, and I hope someone will find the time to help me with this. I guess this needs to be setup as a bash script that will be run daily from /etc/cron.daily/.
I do not want to take a backup copy of every files on my system. But rather, I would like to create a text file listing files and directories that should be backed up. I imagine one path per line. For example:
/etc/apt/sources.list
/home/daniel/.lynxrc
The local copy ought not need to be transmitted to the backup location if the local file has not been modified. (I presume this is where rsync come in handy.) Secondly, the remote copy should be compressed. (.gz for single files and .tar.gz for directories.)
The first backup location is not always available, it is an USB hard drive located at /media/terabyte/ when it is available. The script should check whether the device is mounted (it is if the directory exist) before continuing with making the backup. The second location is an Apache server from a service provider available trough SSH, for secure file transfers.
I really hope someone will help me make this system. Thanks in advance!