LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-19-2020, 05:02 PM   #16
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by scasey View Post
Check out rsnapshot. It will provide the automation you seek and create and maintain multiple generations as you describe them. It uses rsync "under the hood" The documentation is extensive.
Hi Scasey,

I followed the link, it goes to Github and I have no experience in building such an app from source code.
Is there somehere a .deb installation, or a package?

It looks exactly what I am after but...

Thanks
Alex
 
Old 08-19-2020, 05:09 PM   #17
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 945

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by alex4buba View Post
Hi Scasey,

I followed the link, it goes to Github and I have no experience in building such an app from source code.
Is there somehere a .deb installation, or a package?

It looks exactly what I am after but...

Thanks
Alex
The link lead to this https://rsnapshot.org/download.html and you can get packages there. You are using Ubuntu, correct? If so, it should be in the software repositories. It is Linux Mint's.

Last edited by jkirchner; 08-19-2020 at 05:12 PM.
 
1 members found this post helpful.
Old 08-19-2020, 05:26 PM   #18
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
rsnapshot is in the major distro repositories. Just install it from Synaptic package manager, or from the command line using apt.
 
1 members found this post helpful.
Old 08-19-2020, 05:39 PM   #19
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by jkirchner View Post
The link lead to this https://rsnapshot.org/download.html and you can get packages there. You are using Ubuntu, correct? If so, it should be in the software repositories. It is Linux Mint's.
Quote:
Originally Posted by sgosnell View Post
rsnapshot is in the major distro repositories. Just install it from Synaptic package manager, or from the command line using apt.
Yes.It's in the epel for fedora/centos too. Definitely should be able to install it with the package manager.

We use it to backup the production servers on a daily, weekly and monthly basis. The last shop I worked in ran it every two hours, which was very helpful if someone accidentally blew away a bunch of files on the development server.

Last edited by scasey; 08-19-2020 at 05:41 PM.
 
Old 08-19-2020, 05:43 PM   #20
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jkirchner View Post
The link lead to this https://rsnapshot.org/download.html and you can get packages there. You are using Ubuntu, correct? If so, it should be in the software repositories. It is Linux Mint's.
Sorry, I am very new here. When I click the link, It takes me to:
https://rsnapshot.org/download.html
So, I select the Ubuntu , it takes me here:
https://packages.ubuntu.com/search?k...ll&section=all
I select focal (20.04LTS) - it takes me here:
https://packages.ubuntu.com/focal/rsnapshot

Now, I am lost... I also found the rsnapshot-1.4.3 tar.gz
When I extract, it has all the source code in it...

Nowhere I can find an installation file.
It seems anyway that it is a Terminal only app - not a GUI package

What am I missing?

Cheers
Alex
 
Old 08-19-2020, 06:52 PM   #21
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
You do not need an installation file. The link provided was just for information. Install rsnapshot with your package manager. In Ubuntu, that should be Synaptic.
 
Old 08-19-2020, 07:53 PM   #22
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 945

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by alex4buba View Post
Sorry, I am very new here. When I click the link, It takes me to:
https://rsnapshot.org/download.html
So, I select the Ubuntu , it takes me here:
https://packages.ubuntu.com/search?k...ll&section=all
I select focal (20.04LTS) - it takes me here:
https://packages.ubuntu.com/focal/rsnapshot

Now, I am lost... I also found the rsnapshot-1.4.3 tar.gz
When I extract, it has all the source code in it...

Nowhere I can find an installation file.
It seems anyway that it is a Terminal only app - not a GUI package

What am I missing?

Cheers
Alex
You can install it using apt . You do not need any installation file, just the package manger, it is in the repos
 
Old 08-20-2020, 01:26 AM   #23
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jkirchner View Post
You can install it using apt . You do not need any installation file, just the package manger, it is in the repos
I used the package manager, it is still just a Terminal / command line app

Thanks
Alex
 
Old 08-20-2020, 03:59 PM   #24
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by alex4buba View Post
I used the package manager, it is still just a Terminal / command line app

Thanks
Alex
Yes it is. As has been mentioned, if you want to automate copies/backups, you'll need to do that at the command line.

What rsnapshot provides is the wrapper to manage incremental backups using a config file, avoiding having to understand all the features of rsync or how to use cron.

The top level tree of my snapshots tree looks like this:
Code:
├── [Aug 20  1:37]  daily.0
├── [Aug 19  1:36]  daily.1
├── [Aug 18  1:36]  daily.2
├── [Aug 17  1:41]  daily.3
├── [Aug 16  1:37]  daily.4
├── [Aug 15  1:35]  daily.5
├── [Aug 14  1:36]  daily.6
├── [Aug 18  2019]  local
├── [Jun 29  1:35]  monthly.0
├── [Jun  1  1:43]  monthly.1
├── [May  4  1:36]  monthly.2
├── [Aug 10  1:38]  weekly.0
├── [Aug  3  1:37]  weekly.1
├── [Jul 27  1:44]  weekly.2
└── [Jul 20  1:37]  weekly.3

Last edited by scasey; 08-20-2020 at 04:00 PM.
 
Old 08-20-2020, 06:23 PM   #25
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Yes it is. As has been mentioned, if you want to automate copies/backups, you'll need to do that at the command line.

What rsnapshot provides is the wrapper to manage incremental backups using a config file, avoiding having to understand all the features of rsync or how to use cron.

The top level tree of my snapshots tree looks like this:
Code:
├── [Aug 20  1:37]  daily.0
├── [Aug 19  1:36]  daily.1
├── [Aug 18  1:36]  daily.2
├── [Aug 17  1:41]  daily.3
├── [Aug 16  1:37]  daily.4
├── [Aug 15  1:35]  daily.5
├── [Aug 14  1:36]  daily.6
├── [Aug 18  2019]  local
├── [Jun 29  1:35]  monthly.0
├── [Jun  1  1:43]  monthly.1
├── [May  4  1:36]  monthly.2
├── [Aug 10  1:38]  weekly.0
├── [Aug  3  1:37]  weekly.1
├── [Jul 27  1:44]  weekly.2
└── [Jul 20  1:37]  weekly.3
I can see the final result, but have no idea how to create the script for it...

I want to backup in original file format, documents, spreadsheets, pdf, images etc.... From source to destination (external drive) once a day at say 8:00pm and keep 7 versions, so there will be one backup on Sunday, one on Monday etc...

Thnaks
Alex
 
Old 08-20-2020, 09:13 PM   #26
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
You're going to have to roll up your sleeves, put your big boy pants on, and go to school. You need to learn to do this stuff for yourself. Start by reading these pages thoroughly:
https://linuxconfig.org/guide-to-rsn...ckups-on-linux
https://ubuntu.com/server/docs/tools-rsnapshot
https://linux.die.net/man/1/rsnapshot
https://ostechnix.com/a-beginners-guide-to-cron-jobs/
https://www.digitalocean.com/communi...ks-ubuntu-1804
The config file at /etc/rsnapshot.conf on your computer

Your system is different from anyone else's, and so are your preferences, so things have to be tailored to yours. There is no GUI program that can do what you want, so you have to get your hands dirty and use the command line for a few things. It ain't rocket science, and if I can do it, so can you, with some experience. That will take time, but it's worth it. You've spent years learning Windows, so a few hours for Linux isn't unreasonable. If you have specific questions on individual tasks, first read the manual or help file, use Google, and come back if you truly can't find what you need. I'm sorry to be so blunt, but I see no other options at this point.
 
Old 08-21-2020, 03:16 AM   #27
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sgosnell View Post
You're going to have to roll up your sleeves, put your big boy pants on, and go to school. You need to learn to do this stuff for yourself. Start by reading these pages thoroughly:
https://linuxconfig.org/guide-to-rsn...ckups-on-linux
https://ubuntu.com/server/docs/tools-rsnapshot
https://linux.die.net/man/1/rsnapshot
https://ostechnix.com/a-beginners-guide-to-cron-jobs/
https://www.digitalocean.com/communi...ks-ubuntu-1804
The config file at /etc/rsnapshot.conf on your computer

Your system is different from anyone else's, and so are your preferences, so things have to be tailored to yours. There is no GUI program that can do what you want, so you have to get your hands dirty and use the command line for a few things. It ain't rocket science, and if I can do it, so can you, with some experience. That will take time, but it's worth it. You've spent years learning Windows, so a few hours for Linux isn't unreasonable. If you have specific questions on individual tasks, first read the manual or help file, use Google, and come back if you truly can't find what you need. I'm sorry to be so blunt, but I see no other options at this point.
OK S, I did the following:

00 20 * * 1 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly
00 20 * * 2 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly
00 20 * * 3 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly
00 20 * * 4 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly
00 20 * * 5 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly
00 20 * * 6 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly
00 20 * * 7 rsync -a /home/alex/alexfolders /media/New-SD-512/weekly

The intention (I hope I got it right) is:
1) One backup each day at 8:00 PM
2) Each backup is done on a different day each week, this gives me 7 versions
3) Each Sunday, the previous Sunday backup is overriden...

Now, I went to Terminal, typed in crontab -e (Ubuntu 20.04) Selected the default editor - nano.
Pasted the above text into it (after clearing the text it had)
CTRL+X, the y, then accepted the name crontab and hit ENTER

Then, back to command prompt, typed crontab -l and the content I entered showed up.

Is all this correct?

Thanks for pushing me

Cheers
Alex
 
Old 08-21-2020, 09:11 AM   #28
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
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.

Last edited by sgosnell; 08-21-2020 at 09:14 AM.
 
Old 08-21-2020, 09:44 AM   #29
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by alex4buba View Post
I can see the final result, but have no idea how to create the script for it...

I want to backup in original file format, documents, spreadsheets, pdf, images etc.... From source to destination (external drive) once a day at say 8:00pm and keep 7 versions, so there will be one backup on Sunday, one on Monday etc...

Thnaks
Alex
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.

Last edited by scasey; 08-21-2020 at 09:49 AM.
 
Old 08-21-2020, 10:40 AM   #30
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
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.
 
1 members found this post helpful.
  


Reply

Tags
backup, restore



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie trying to write a simple backup script to backup a single folder Nd for school stryker759a Linux - Newbie 2 09-16-2009 08:52 AM
Permission problem with importing evolution mail from the old .evolution folder oskar Linux - Software 4 05-23-2008 08:28 PM
New installation: restoring the old home folder? Backup advices bruno321 Linux - General 4 11-18-2007 08:55 AM
weird error restoring Evolution melinda_sayang Linux - Software 4 11-08-2005 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration