For years I've backed up my system to an external hard drive using a shell script with a simple copy command like
cp -uvR Documents/* "/media/myUserName/MyBackupDevice/Documents/"
After upgrading from Ubuntu 18 to Ubuntu 20.04.1, my script will only update files that already exist on the backup device. Where the destination file does not yet exist, no file is created and the copy fails with a message like:
cp: cannot create regular file '/media/myUserName/MyBackupDevice/Documents/Rest/of/Path/FileName.pdf': Invalid argument
Depending on which files I've modified, sometimes a directory to which the script could not write a new file is the same directory in which it could update a pre-existing file.
Any suggestions on how to adapt my script?
0 Answers