Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to keep my externall HDD connected and have my HOME directory and my email setttings (I use Thunderbird) backed up automatically. Is this possible?
However, I would recommend setting up a script with rsync. Here's an example based on my own backup script, which backs up across my home network to my file server:
Modifying the target path appropriately should make it work to an external drive.
I don't run it as a cron job because, on my home system, I don't make significant changes that often; I run it when I have made changes worth backing up.
Also, when you say script, do you mean it will copy files from my HOME directory to the external HDD? So if I were to take the HDD with me to another computer, all I would see is an exact copy of my HOME directory and not a backup file?
rsync stands for remote sync. It's a file copy utility that goes one step further and compares the files at the source and destination before copying. This makes it perfect for backup applications, because the first time you run it it will take forever copying everything over, but any subsequent time you run it it will just copy over those files that have changed since the last copy.
cron is like Windows' Scheduled Tasks. It's a way to schedule programs/commands, such as running your backup utility at 4am every tuesday, or whatever you might want to do.
Yes if you plugged the external hard drive into another computer you would see all of your files as expected.
I perform my backups using rsync on a cron job to copy to two external USB drives. Works great.
The rsync program worked great! Two additional questions....
1) I would like to back up my email program, Thunderbird. Is the data stored in my HOME directory? If so, does simply copying the files act as my backup or do I need to take additional steps?
2) I did a comparison between the destination copy and the source directory. There is a large difference in both file count and size. I found the difference to be in the directories that start with a dot, for example, ".themes" or ".ssh". Why didn't these files transfer over?
I thought from your post that you had used rsync, in which case I would have been able to provide some suggestions. I know nothing about that backup utility, however.
I thought from your post that you had used rsync, in which case I would have been able to provide some suggestions. I know nothing about that backup utility, however.
I am sorry. I wanted to use rsync. But when I went to my package manager, all I found was Luck Back Up. :-) In fact, I just went in to take a screen shot for you, but I cannot even find it. I did find a grsync. How do I find regular rsync?
I am sorry. I wanted to use rsync. But when I went to my package manager, all I found was Luck Back Up. :-) In fact, I just went in to take a screen shot for you, but I cannot even find it. I did find a grsync. How do I find regular rsync?
99.999% chance it was already installed on your system before you even went looking for a backup utility. I have never seen a modern Linux distro that didn't come with rsync pre-installed.
Last edited by suicidaleggroll; 04-20-2014 at 09:57 PM.
99.999% chance it was already installed on your system before you even went looking for a backup utility. I have never seen a modern Linux distro that didn't come with rsync pre-installed.
You're right. I typed rsync in the terminal. What command do I type to copy everything from my home directory to my external hard drive.
Also, what about backing up my email program, Thunderbird?
Replacing /home/user with your home directory, and replacing /mnt/drive with the location of your external hard drive.
rsync is very particular when it comes to trailing slashes on the source though, so bear that in mind.
/home/user means sync user and all of its contents to the destination location
/home/user/ means sync user's contents, but not the directory user itself, to the destination location
A subtle, but important difference
/home/user/* would sync every visible directory in user to the destination (directories with a leading . are "hidden" and skipped by the "*" wildcard).
As for Thunderbird, I'm not sure. All of Thunderbird's files are stored in the /home/user/.thunderbird directory, but I'm not sure if simply making a copy of this directory is sufficient or how you would recover the data.
rsync is likely already installed on your system; it's a basic Linux command that ships with most distros--every one that I've ever used. If you open a terminal, enter man rsync, and see a man page, it's already there.
When I back up my home folder with rsync with the command in post #4 above, it captures all the hidden files and directories, where configuration data, mail store, and so on, are stored.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.