[SOLVED] Restoring a single folder from an Evolution backup in Ubuntu 20.04
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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 think rsnapshot is a better option, but really it's just a front-end for rsync. Either can get the job done. And I agree that trying it and seeing what happens is the best way to go. Blowing things up and putting them back together again is an excellent way to learn things, and one tends to remember those things better through that process. I cannot count the number of times I've borked my systems over the years. Sometimes it was frustrating, but I always learned something from it. Often I learned a lot.
I agree about rsnapshot. I mostly like the directory management and linking-to-unchanged-files. It's a fairly complicated wrapper under the covers (it's written in perl), but it's very easy to setup, IMO.
While all you say is true, we are discussing making a backup. Set something up and try it. If the desired files are backed up, then it worked. If not, it didn't. Shouldn't bork anything to try.
Scheduling is a bit more to test, since one has to wait for the cron time to happen, although it's pretty easy to set up a schedule for one job to fire in 5 minutes from now to be sure the job will run.
Here's the crontab (in /etc/crontab) for my rsnapshot setup:
Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
30 1 * * * root /usr/bin/rsnapshot daily
0 3 * * 0 root /usr/bin/rsnapshot weekly
30 2 1 * * root /usr/bin/rsnapshot monthly
That will overwrite each backup, since they are all going to the same folder, /media/New-SD-512/weekly. To keep separate backups for each day, you need a separate folder for each. That's why this method gets messy, but it should work. You can put 7 subfolders under weekly, say 1, 2, 3, etc.
Code:
0 20 * * 0 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly/sunday
0 20 * * 1 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly/monday
Sunday == 0, through Saturday == 6. There is no 7, which would be the 8th day of the week. You can name the destination folders anything you like - a number, the text day of the week, whatever you can remember best. The destination folders must exist before running rsync.
OK, I understand the idea of multiple subfolders, no problem.
The "Problem" is that the job failed to run at 8pm - in the log it said that it coulnd find the destination storage device...
1) The machine switches the screen OFF after 10 minutes, but does it matter?
2) The storage device is an SD 512GB card, but the file format is Not Linux, does this matter?
You’ll need to read the documentation for rsnapshot to learn how to configure and run it. As it automagically creates a different directory for each run, it will do exactly what you’re asking. If you don’t want weekly or monthly backups, simply don’t configure them.
Another feature of rsnapshot is that if a file is the same today as it was yesterday, it links to yesterday’s copy instead of copying the file again. This saves both time and space on the backup system.
Note that you’ll need to learn one way or the other. As noted, the documentation is on the web as well as in the man pages for the tools. We tend not to repeat here what you can read for yourself.
One other thought: Rather than asking if something will work, just try it and see what happens.
I do try many things before asking, but at times, due to being new here, I am concerned to do something that can mess it up. IN the past month, since starting with Linux - I had to install and reinstall it from scartch - SIX TIMES...
I would love to see a timeshift manual - where can I find one?
I do try many things before asking, but at times, due to being new here, I am concerned to do something that can mess it up. IN the past month, since starting with Linux - I had to install and reinstall it from scartch - SIX TIMES...
Yes, that is frustrating, but as I said we're talking about a backup. It will either work or it won't. If it doesn't, no harm done.
Quote:
Originally Posted by alex4buba
I would love to see a timeshift manual - where can I find one?
Thanks
Alex
I don't use it, but there's lots of help in this search. Is there a man page or a help function in your installation?
Again, it does not appear to be the tool to backup your email, which is what we've been discussing. It's designed to make a backup of your installation such that "reinstalling" becomes a simple recovery from backup instead of what you've done six times
It does look like you can set a schedule for that...I will have to look into it for my desktop. I'm using rsnapshot for my server and copying everything so I can recover from a failure quickly.
I agree about rsnapshot. I mostly like the directory management and linking-to-unchanged-files. It's a fairly complicated wrapper under the covers (it's written in perl), but it's very easy to setup, IMO.
While all you say is true, we are discussing making a backup. Set something up and try it. If the desired files are backed up, then it worked. If not, it didn't. Shouldn't bork anything to try.
Scheduling is a bit more to test, since one has to wait for the cron time to happen, although it's pretty easy to set up a schedule for one job to fire in 5 minutes from now to be sure the job will run.
Here's the crontab (in /etc/crontab) for my rsnapshot setup:
Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
30 1 * * * root /usr/bin/rsnapshot daily
0 3 * * 0 root /usr/bin/rsnapshot weekly
30 2 1 * * root /usr/bin/rsnapshot monthly
I am gettting gradually more and more confused here... What is better "rsnapshot" as compared to what?
What is the root command and where is the command rsync?
What are all the commands in the above file in capital letters?
I am gettting gradually more and more confused here... What is better "rsnapshot" as compared to what?
What is the root command and where is the command rsync?
What are all the commands in the above file in capital letters?
You see guys, this is all new to me
Thanks for your time
Alex
I've given my opinion. I like rsnapshot's way of managing rsync backups. The rsync commands are generated by rsnapshot by the settings in the rsnapshot.conf, which has extensive documentation in it. A review of the FAQ on the website will clarify a lot of things about rsnapshot.
An example from my rsnapshot log:
That happens at rsnapshot runtime, as far as I know.
You can certainly choose to just use rsync without rsnapshot. There are probably other options. I can think of at least two more.
The capital letters are assigning values to variables to define the environment. Research Linux environment variables.
The important lines in that example are the ones that run rsnapshot. Note the different schedules. The daily entry is run by cron at 0130 every day.
rsnapshot is in the major distro repositories. Just install it from Synaptic package manager, or from the command line using apt.
Hello again,
At this point in time, I am focusing on getting a backup system working, before I can have the luxory to consider efficiency and space saving. Storage device units are cheep today, I have to first figure out WHY my backup using rsync failed with not able to find the target storage device.
I think, that following you pointing out that I need to use : 0-6 and Sun,Mon... traget folders, this I have no problem, but unless I see at least once a working backup, there is no point for me to venture further into finding better backup systems.
Can you please help me with this main question?
I have a feeling that something is wrong at my end with my BIOS setup, I have another task that fails to autostart - it is a weather desktop widget...
If I go and reset the BIOS to factory default, using a dual boot with Windows it will probably stop Linux from starting... What say you?
That will overwrite each backup, since they are all going to the same folder, /media/New-SD-512/weekly. To keep separate backups for each day, you need a separate folder for each. That's why this method gets messy, but it should work. You can put 7 subfolders under weekly, say 1, 2, 3, etc.
Code:
0 20 * * 0 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly/sunday
0 20 * * 1 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly/monday
Sunday == 0, through Saturday == 6. There is no 7, which would be the 8th day of the week. You can name the destination folders anything you like - a number, the text day of the week, whatever you can remember best. The destination folders must exist before running rsync.
I am preparing to start all over again to answer the latest question, but just want to confirm. Should this example:
0 20 * * 0 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly/sunday
Not be : 0 20 * * 0 rsync -a /home/alex/alexfolders /media/New-SD-512/sunday/weekly ?
I insereted it into the crontab file using nano through Terminal : crontab -e
Then, saved it and exited the editor, the message was : crontab: installing new crontab
Shortly after 6:00pm I looked in the logfile - please see attached, it claimed that it couldn't run the command, but I ran it mannually and the result shows below:
Can it be, that it failed executing because at the same time, There was a copy job that I ran manually to copy folders from my old external hard disk to a new one?
What am I doing wrong ? It MUST be me doing something wrong, but what?
Thank you helpers
Alex
Last edited by alex4buba; 08-22-2020 at 03:27 AM.
Reason: spelling mistake correction
I am preparing to start all over again to answer the latest question, but just want to confirm. Should this example:
0 20 * * 0 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly/sunday
Not be : 0 20 * * 0 rsync -a /home/alex/alexfolders /media/New-SD-512/sunday/weekly ?
Or is it correct the way you stated it?
Thanks
That depends on how you set up the folders on your SD card. I can't see your system to see how you did it. It should be however you set up the subfolders. That may be what stopped the rsync - you have to tell it exactly what to do and how to do it. Exactly. I said above that all the folders must exist in advance. I would probably dispense with the weekly folder, and just have 7 top-level folders, one for each day of the week. But you can do it however you want, as long as you know what you want and where everything is. You can use the file manager, whatever Ubuntu uses by default, to check the folder organization on the card, and change it if you don't like it.
Do not futz with the BIOS. One thing at a time. When you are trying to solve a problem, never try multiple fixes at the same time. You won't know which fixed it, if by chance it did get fixed, and you exponentially increase the chances for making things worse.
Remember, we're talking about a backup here. If the backup process fails, the worst case just results in no backup, which is what you already have. I don't know how timeshift got into the process. If you want to go that way, fine, but I've never used it, so I can't help.
Re: #42 crontab -l is not running anything, it's just listing the contents of the crontab.
Which user are you when you ran crontab -e?
What's in the cron log file? (/var/log/cron -- yours may be different)
Do each of those rsync commands work from the command line? If not, what do they return?
Again, please use code tags when posting commands or output. See link in my sig.
That depends on how you set up the folders on your SD card. I can't see your system to see how you did it. It should be however you set up the subfolders. That may be what stopped the rsync - you have to tell it exactly what to do and how to do it. Exactly. I said above that all the folders must exist in advance. I would probably dispense with the weekly folder, and just have 7 top-level folders, one for each day of the week. But you can do it however you want, as long as you know what you want and where everything is. You can use the file manager, whatever Ubuntu uses by default, to check the folder organization on the card, and change it if you don't like it.
Do not futz with the BIOS. One thing at a time. When you are trying to solve a problem, never try multiple fixes at the same time. You won't know which fixed it, if by chance it did get fixed, and you exponentially increase the chances for making things worse.
Remember, we're talking about a backup here. If the backup process fails, the worst case just results in no backup, which is what you already have. I don't know how timeshift got into the process. If you want to go that way, fine, but I've never used it, so I can't help.
I am with you on not doing multiple things at the same time, I just pointed out another thought.
I thought, that the word weekly at the end tells cron to run it weekly, from what you say - it is not.
So, let me see - assume I have a blank target device - will I need in this case (after I drop the word weekly) create on that target drive 7 folders : sun,mon etc... in the root of the drive? Then the comman will look like this:
0 20 * * 0 rsync -a /home/alex/alexfolders /media/New-SD-512/sun - with or without the slash / at the end?
Re: #42 crontab -l is not running anything, it's just listing the contents of the crontab.
Which user are you when you ran crontab -e?
What's in the cron log file? (/var/log/cron -- yours may be different)
Do each of those rsync commands work from the command line? If not, what do they return?
Again, please use code tags when posting commands or output. See link in my sig.
I know that crontab -l is only showing me the list
Which user I am when I run crontab -e? How can I find out?
Cron log file? Attached a screen image of my /var/log/ folder - tere is no such file in it, can you suggest which one should I look in?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.