Backup to dropbox

Hey everyone, looking for some advice.

I do regular backups. But I would hat to lose my mail for sure. So I was thinking of doing a secondary backup of just my Thunderbird config to dropbox as an extra precaution.

I was wondering if anyone had a tool or script that would be useful for backing up my Thunderbird configs on a regular basis to dropbox.

Thanks ahead of time.

Maybe I am too naive but would it not be as simple as creating a cronjob:

crontab -e

to regularly synchronize ~/.thunderbird to Dropbox, e.g. every hour?

0 * * * * rsync -a --delete ~/.thunderbird/ ~/Dropbox/thunderbird

(note the trailing slash at the end of ~/.thunderbird/ matters for rsync syntax: in this case the content of the directory is copied otherwise it would be the directory itself).

I will give that a try @Spleenico . I have never messed with cron or rsync before. But no time like the present to learn.

@parzzix Let me try on my machine first. I am not sure whether relative paths work in crontab.
I would not like you to have an issue because of a bad code of mine.

@parzzix I just tried the following code in a crontab and it seems to work fine:

* * * * * rsync -a --delete ~/.thunderbird/ ~/Dropbox/thunderbird

Note that this one executes every minute.
You would probably prefer

0 * * * * rsync -a --delete ~/.thunderbird/ ~/Dropbox/thunderbird

for every hour, or

0 12 * * * rsync -a --delete ~/.thunderbird/ ~/Dropbox/thunderbird

for once a day at noon.
Hope it works fine for you too!

Thanks so much @Spleenico. It worked like a charm. I need to educate myself on using cron and rsync. Both are tools I have never actually used in the almost 15 years i’ve used linux.

1 Like