fixes non-functional FOSS – fast!
Q Unlocking Thunderbird
My computer is running Ubuntu 20.04.03, and Thunderbird is the latest from Ubuntu’s repositories. When I copy my home folder to an external drive I get this error message:
This is the relevant part of my backup script.
The lock file referred to is generated whenever Thunderbird runs, so deleting the lock file doesn’t solve the problem.
Bryan Mitchell
A Lock files are used by software to indicate that they’re already using a directory. In the case of this file, it tells Thunderbird that an instance is already running, so if you try to run Thunderbird again, it opens the existing instance instead. Lock files tend to be read-only, so copying one with permissions intact won’t work. In this case, Thunderbird creates a symbolic link to a non-existent file, hence the inability to copy it.
You’re not using the best tool for this job in cp. You don’t want to copy, or try to copy, everything. Even with -u it’s far from ideal. A better tool is rsync, which synchronises two directories, copying just what’s needed. It’s also able to copy only the parts of files that have changed, so a small change to a large file doesn’t need a wholesale copy. To back up your entire home directory, you only need:
Note that the trailing slashes on the directory names are important. This has an option to exclude files: