I have been running rsync to backup one drive to another drive:
sudo rsync -av --delete /media/username/drive1/ /media/username/drive2/
the problem is, if I do not intentionally access drive2 first, it seems to be sleeping and when I run this script, it creates a new directory called drive2 on my local drive which can't handle the amount of data that is backing up so it crashes during the rsync process and my local disk is out of space. If I first access drive2 and then run the script, no problem. Is there an additional flag or command to wake the drive2 before running rsync to avoid this catastrophe? Why is drive2 only sleeping and drive1 is not?
ls /media/username/drive2
is a quick way to make sure a drive is "awake" – GrannySez Oct 12 '16 at 04:53