2

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?

αғsнιη
  • 35,092
  • 41
  • 129
  • 192
  • may this can help you [How to mount an external-HDD](http://askubuntu.com/q/177825/283843) – αғsнιη Oct 12 '16 at 04:33
  • `ls /media/username/drive2` is a quick way to make sure a drive is "awake" – GrannySez Oct 12 '16 at 04:53
  • Thanks GrannySez - that might be the exact simple solution I'm looking for. – Leif Birnbaum Oct 13 '16 at 12:53
  • so listing the directory wasn't the easy solution I was looking for. Once the computer has been shutdown or restarted, I can go into the media directory and the drives are not automatically mounted on startup - I will have to dig some more... – Leif Birnbaum Nov 04 '16 at 20:50

1 Answers1

0

I think this solved it for me:

https://www.youtube.com/watch?v=-Qwr3e7oPN0

  • Please don't post link only answers. If someone deletes the youtube video, your answer will be useless. Consider summarizing the solution. – Organic Marble Nov 04 '16 at 21:18
  • Open up the Disks application, find the drive and partition you want mounted and open up the mount options. There is an option there to mount on startup. – Leif Birnbaum Dec 05 '16 at 16:32