I work and have to save an important file in four other locations besides a Linux HD. Instead of having to save the same file for four more times, I would like to automate the procedure through a linux script file in which the first saved file on the Linux HD can be copied simultaneously to a Windows Vista HD, an external HD and to two flash drives.
My PC has two HDs. Windows Vista is installed on one, and openSuse 11.1 is installed on the other one. Windows Vista appears on SATA 1 {/dev/sda1} while openSuse 11.1 appears on SATA 2 {/dev/sdb1}. When I wish to switch from one OS to the other I just enter directly into the BIOS setup utility to change the HD boot order leaving the Windows and the Linux installs untouched.
For the second part of a shell script repeating-line similar to
# rsync -av /home/user/project/a.file /user storage device/project
where the required storage devices are
/dev/sde1 ... that is... an external hard disk {Maxtor 3200}
/dev/sdc1 ... ..."....."... a USB flash drive ....... {usb 1}
/dev/sdd1 ... ..."....."... a USB flash drive ....... {usb 2} and
/dev/sda1 ... ..."....."... a Windows Vista hard disk
to which I want to backup simultaneously there the content of the first part on the above line in openSuse 11.1 instead of having to save the same "a.file" for four more times, I receive a series of error messages when I try to run the following "rsync" commands:
# rsync -av /home/user/project/a.file /media/Maxtor 3200/project
rsync: link_stat "/media/Maxtor" failed: No such file or directory (2)
rsync: change_dir#3 "/home/user/3200/project" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(614) [receiver=3.0.4]
rsync: connection unexpectedly closed (99 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(632) [sender=3.0.4]
# rsync -av /home/user/project/a.file /media/usb 1/project
rsync: link_stat "/media/usb" failed: No such file or directory (2)
rsync: change_dir#3 "/home/user/1" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(614) [receiver=3.0.4]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(632) [sender=3.0.4]
# rsync -av /home/user/project/a.file /media/usb 2/project
rsync: link_stat "/media/usb" failed: No such file or directory (2)
rsync: change_dir#3 "/home/user/2" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(614) [receiver=3.0.4]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(632) [sender=3.0.4]
# rsync -av /home/user/project/a.file /media/disk/user/project
rsync: link_stat "/media/disk/user/" failed: No such file or directory (2)
rsync: link_stat "/home/user/" failed: No such file or directory (2)
rsync: change_dir#3 "/home/user/project" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(614) [receiver=3.0.4]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(632) [sender=3.0.4]
In the graphical user interface (GUI) I can access and open the filesystems on all of the above storage devices. In the command line interface (CLI) however I do not know how to do it.
The backup script that I have in mind is aimed at updating simultaneously four file copies that are all on a local machine after the main "a.file" has been saved. I am not considering any actions or operations from Windows to Linux, but rather performing the whole updating process in openSuse 11.1 to keep things easier.
I will appreciate your assistance on any missing rsync options or other programming aspects that might have been overlooked.