LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-30-2015, 03:53 PM   #16
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511

I use a backup utility to write to an internal disk - convenient but not ideal.
So I use rsync to copy my backups to an external disk every few days.

There are many free backup utilities you could use, from the very simple to extremely complex enterprise solutions.
If you just have a bunch of documents a really simple way to back them up would be to use that rsync command to copy your documents to a USB key.

See attached for the grsync (GUI) interface to rsync.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2015-03-30 21:40:38.png
Views:	22
Size:	40.6 KB
ID:	17947  
 
1 members found this post helpful.
Old 03-31-2015, 01:02 AM   #17
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by JeremyBoden View Post
I use a backup utility to write to an internal disk - convenient but not ideal.
So I use rsync to copy my backups to an external disk every few days.

There are many free backup utilities you could use, from the very simple to extremely complex enterprise solutions.
If you just have a bunch of documents a really simple way to back them up would be to use that rsync command to copy your documents to a USB key.

See attached for the grsync (GUI) interface to rsync.
Thanks Jeremy. I'm saving to a USB key now. What's got me worried is if the key goes I've got stuff on there that I don't have on the computer.

The grsync GUI looks easy. But when you back things up with it where does it get stored? And would you backup when you were done working?

I think the ultimate thing for me would be if something would back my stuff up automatically.
 
Old 03-31-2015, 07:49 AM   #18
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Quote:
Originally Posted by Gregg Bell View Post
What's got me worried is if the key goes I've got stuff on there that I don't have on the computer.
Are these files in the same directory that you back up to? If so, then you do NOT want to use "--delete" (the "Delete on destination" option in grsync), as it will erase those files. If you have a dedicated directory for backups, and those files are in separate directories, then the backup won't affect them.

If you're worried about losing those files, then you should probably have a backup of them, too.

Quote:
Originally Posted by Gregg Bell View Post
The grsync GUI looks easy. But when you back things up with it where does it get stored?
It backs it up to wherever you set the destination field. So if your flash drive is mounted on /media/FLASH_DRIVE and you want have a directory named "backup" there, then you would put "/media/FLASH_DRIVE/backup/" there. You should be able to use the "Browse..." button to the right to select it if you don't want to have to type it.

Quote:
Originally Posted by Gregg Bell View Post
And would you backup when you were done working?
Personally, I usually run backups after I've finished what I'm doing. However, if you want to back up while you're working, that shouldn't be an issue. The only problem that I can think of is temporary files (I know that some programs, namely LibreOffice, use temp files in the same directory as the file you're using), but if you use "--delete" and run it again once you're finished, then you should be good.

Quote:
Originally Posted by Gregg Bell View Post
I think the ultimate thing for me would be if something would back my stuff up automatically.
Once you figure out which settings for grsync you like, you can use those settings to write a command using "plain" command-line rsync. When you hover your cursor over each check-box, it should tell you what flag it represents. Once you have that, you can setup a cron job to schedule it to run whenever you want.

Hope this helps!

Last edited by maples; 03-31-2015 at 07:58 AM.
 
1 members found this post helpful.
Old 03-31-2015, 08:09 AM   #19
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Auto backup is what I use. It's also where some of the complexity of clever backup systems comes from.

But first - is your USB stick formatted with a Linux file system or with the common FAT32 file system?
Ideally, your backup will store permissions and file owner etc - FAT32 won't do all that.

In grsync you specify the from-directory on the first line and the to-directory on the second line.
When you plug the USB stick in, it probably gets automounted.
You can find all the mounted devices by entering the command
Code:
df -h
For example if I do this I see a line saying
Code:
/dev/sdc1       7.5G  605M  6.9G   8 /media/jeremy/Lexar
That /media/jeremy/Lexar is the top level of the files/directories on the USB stick.

You should be aware though:-
One of the options on grsync or rsync can instruct the backup to synchronise - i.e. delete files from the stick which no longer exist on your PC.

Investigate crontab to run rsync automatically as a background job - but do you want to do this if a file is open for editing?

[Sorry - that's mostly duplication of maples comments]

Last edited by JeremyBoden; 03-31-2015 at 08:12 AM.
 
1 members found this post helpful.
Old 03-31-2015, 02:17 PM   #20
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by maples View Post
Are these files in the same directory that you back up to? If so, then you do NOT want to use "--delete" (the "Delete on destination" option in grsync), as it will erase those files. If you have a dedicated directory for backups, and those files are in separate directories, then the backup won't affect them.

If you're worried about losing those files, then you should probably have a backup of them, too.
Yes, I think that's a big part of it. Funny how I overlooked that. Thanks for pointing it out. Somehow that brought it home to me.
Quote:
Originally Posted by maples View Post


It backs it up to wherever you set the destination field. So if your flash drive is mounted on /media/FLASH_DRIVE and you want have a directory named "backup" there, then you would put "/media/FLASH_DRIVE/backup/" there. You should be able to use the "Browse..." button to the right to select it if you don't want to have to type it.


Personally, I usually run backups after I've finished what I'm doing. However, if you want to back up while you're working, that shouldn't be an issue. The only problem that I can think of is temporary files (I know that some programs, namely LibreOffice, use temp files in the same directory as the file you're using), but if you use "--delete" and run it again once you're finished, then you should be good.



Once you figure out which settings for grsync you like, you can use those settings to write a command using "plain" command-line rsync. When you hover your cursor over each check-box, it should tell you what flag it represents. Once you have that, you can setup a cron job to schedule it to run whenever you want.

Hope this helps!
Yeah, it helps a lot. I'm going to have to go slow because it seems like a lot but that grsync is manageable. I'll experiment with it with contrived data for a bit before I use it on my real stuff.
 
Old 03-31-2015, 03:21 PM   #21
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Maybe first and foremost: Before playing around with any of the mentioned tools, make a backup copy of your data with a procedure that you are confident with. Like, use a usb drive and copy the data to it in a file browser.
Put that backup in a safe place, and only then start playing with grsync etc.

As said, e.g. the delete option has pitfalls. Make sure that you understand what it does when using it. It's worth reading up a bit on this topic.

Backup seems like a boring topic that nobody wants to be bothered with, but the day it goes wrong people tend to regret that attitude.

Cloud services are a definitive no-go for me due to the privacy issues, but that's a matter of taste. As far as the "crashing cloud risk" I can't speak to copy.com, but I would assume that e.g. dropbox is reasonably safe. The idea of the cloud is that the data is spread on several servers, which provides good protection against data loss...
 
1 members found this post helpful.
Old 03-31-2015, 03:29 PM   #22
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by joe_2000 View Post
Maybe first and foremost: Before playing around with any of the mentioned tools, make a backup copy of your data with a procedure that you are confident with. Like, use a usb drive and copy the data to it in a file browser.
Put that backup in a safe place, and only then start playing with grsync etc.

As said, e.g. the delete option has pitfalls. Make sure that you understand what it does when using it. It's worth reading up a bit on this topic.

Backup seems like a boring topic that nobody wants to be bothered with, but the day it goes wrong people tend to regret that attitude.

Cloud services are a definitive no-go for me due to the privacy issues, but that's a matter of taste. As far as the "crashing cloud risk" I can't speak to copy.com, but I would assume that e.g. dropbox is reasonably safe. The idea of the cloud is that the data is spread on several servers, which provides good protection against data loss...
Thanks joe. But see, what do you mean by 'use a usb drive and copy the data to it in a file browser.' Does that just mean displaying the files in a browser before copying them and pasting them to a usb drive?
 
Old 03-31-2015, 03:33 PM   #23
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by Gregg Bell View Post
Thanks joe. But see, what do you mean by 'use a usb drive and copy the data to it in a file browser.' Does that just mean displaying the files in a browser before copying them and pasting them to a usb drive?
Sorry, I probably should have said file manager, like Thunar. But in fact what I was trying to say was "use the method your are most confident with to get the data to a safe place that is NOT your computer."
You want to make sure that if you make a mistake with the tools you play with you can always recover everything from an external backup.
 
1 members found this post helpful.
Old 03-31-2015, 04:40 PM   #24
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
You could use multiple USB keys e.g. "Monday", "Tuesday" etc

This allows you to recover a file version from several days ago.
 
1 members found this post helpful.
Old 04-01-2015, 12:46 AM   #25
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by joe_2000 View Post
Sorry, I probably should have said file manager, like Thunar. But in fact what I was trying to say was "use the method your are most confident with to get the data to a safe place that is NOT your computer."
You want to make sure that if you make a mistake with the tools you play with you can always recover everything from an external backup.
Thanks joe. Yeah, I couldn't agree more. Just get it off the computer period.
 
Old 04-01-2015, 12:49 AM   #26
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by JeremyBoden View Post
You could use multiple USB keys e.g. "Monday", "Tuesday" etc

This allows you to recover a file version from several days ago.
Thanks Jeremy. I don't have the discipline to do that. But someone suggested something called Cronopete which takes "snapshots" so if a file becomes corrupted or accidentally deleted you can recover it.

Then I heard of something called Crash Plan for the physical backup (not the cloud stuff).

Ever hear of those?

I don't know--there are so many options!
 
Old 04-01-2015, 02:59 AM   #27
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Not sure what distro you are using --but--
I searched for backup in synaptic and it said there are 253 different backup packages...

A "relatively simple" one is backup2l - which I use.
It has the nice property that it saves backups as compressed .gz files,
which can be read directly by any version of linux;
so you don't need any special software for recovery (although it helps).

You are going to need something that takes a full backup, followed by daily differential backups.
backup2l does this, automatically.

An example of my backup...
Code:
jeremy@hector:~$ sudo backup2l -s
backup2l v1.5 by Gundolf Kiefer

Summary
=======

Backup       Date       Time  |  Size   | Skipped  Files+D |  New  Obs. | Err.
------------------------------------------------------------------------------
all.1        2014-12-01 00:00 |   16.9G |      56    19729 |19729     0 |    8
all.11       2014-12-29 02:11 |    1.7G |      56    43139 |24265   855 |    0
all.12       2015-01-28 02:21 |   62.2M |      56    43982 | 1595   752 |    0
all.13       2015-02-26 06:38 |  689.8M |      56    43871 | 1393  1504 |    0
all.131      2015-03-04 02:59 |  311.1M |      56    43921 |  568   518 |    0
all.132      2015-03-08 05:35 |   54.6M |      56    43978 |  422   365 |    0
all.133      2015-03-13 20:32 |    1.3G |      56    44014 |  498   462 |    0
all.134      2015-03-18 05:31 |  204.7M |      56    44072 |  476   418 |    4
all.135      2015-03-22 03:41 |   56.6M |      56    44067 |  347   352 |    2
all.14       2015-03-26 11:17 |  505.7M |      56    44084 |  917   704 |   10
all.141      2015-03-30 01:27 |    2.8G |      56    44170 |  441   355 |    0
all.1411     2015-03-30 13:10 |   16.3M |      56    44183 |  173   160 |    0
all.1412     2015-03-30 20:41 |    3.0G |      56    44186 |  221   218 |    0
all.1413     2015-03-31 10:06 |    8.2G |      56    44197 |  203   192 |    0
all.1414     2015-03-31 14:48 |   15.9M |      56    44191 |  134   140 |    0
all.1415     2015-03-31 21:28 |   19.5M |      56    44204 |  113   100 |    0
all.142      2015-03-31 21:28 |    3.1G |      56    44204 |  347   313 |    0
all.1421     2015-04-01 00:47 |   15.0M |      56    44193 |   64    75 |    0
all.1422     2015-04-01 08:38 |   17.0M |      56    44211 |  215   197 |    0

Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb2        88G   40G   45G  47% /backup
 
1 members found this post helpful.
Old 04-01-2015, 09:46 PM   #28
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by JeremyBoden View Post
Not sure what distro you are using --but--
I searched for backup in synaptic and it said there are 253 different backup packages...

A "relatively simple" one is backup2l - which I use.
It has the nice property that it saves backups as compressed .gz files,
which can be read directly by any version of linux;
so you don't need any special software for recovery (although it helps).

You are going to need something that takes a full backup, followed by daily differential backups.
backup2l does this, automatically.

An example of my backup...
Code:
jeremy@hector:~$ sudo backup2l -s
backup2l v1.5 by Gundolf Kiefer

Summary
=======

Backup       Date       Time  |  Size   | Skipped  Files+D |  New  Obs. | Err.
------------------------------------------------------------------------------
all.1        2014-12-01 00:00 |   16.9G |      56    19729 |19729     0 |    8
all.11       2014-12-29 02:11 |    1.7G |      56    43139 |24265   855 |    0
all.12       2015-01-28 02:21 |   62.2M |      56    43982 | 1595   752 |    0
all.13       2015-02-26 06:38 |  689.8M |      56    43871 | 1393  1504 |    0
all.131      2015-03-04 02:59 |  311.1M |      56    43921 |  568   518 |    0
all.132      2015-03-08 05:35 |   54.6M |      56    43978 |  422   365 |    0
all.133      2015-03-13 20:32 |    1.3G |      56    44014 |  498   462 |    0
all.134      2015-03-18 05:31 |  204.7M |      56    44072 |  476   418 |    4
all.135      2015-03-22 03:41 |   56.6M |      56    44067 |  347   352 |    2
all.14       2015-03-26 11:17 |  505.7M |      56    44084 |  917   704 |   10
all.141      2015-03-30 01:27 |    2.8G |      56    44170 |  441   355 |    0
all.1411     2015-03-30 13:10 |   16.3M |      56    44183 |  173   160 |    0
all.1412     2015-03-30 20:41 |    3.0G |      56    44186 |  221   218 |    0
all.1413     2015-03-31 10:06 |    8.2G |      56    44197 |  203   192 |    0
all.1414     2015-03-31 14:48 |   15.9M |      56    44191 |  134   140 |    0
all.1415     2015-03-31 21:28 |   19.5M |      56    44204 |  113   100 |    0
all.142      2015-03-31 21:28 |    3.1G |      56    44204 |  347   313 |    0
all.1421     2015-04-01 00:47 |   15.0M |      56    44193 |   64    75 |    0
all.1422     2015-04-01 08:38 |   17.0M |      56    44211 |  215   197 |    0

Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb2        88G   40G   45G  47% /backup
Thanks Jeremy. 253 backup packages for Cronopete or Crashplan?

I never heard of Backup 2l. I don't know. I'm kind of swamped with TMI at this point. I've got Copy.com and that doesn't have all the files and folders on the website (cloud) that I put into it on my computer. And I've got two computers so it is nice to have things sycnced. I've got Mediafire. Which I like. But when I tried to upload a big folder it refused saying there was a 300 file limit (and it didn't even show the folders within the folder). I have Google Drive but that insists on uploading the entire file (or folder), not just what's been changed, and uploading is ridiculously slow.

I Googled Backup 2l and couldn't find anything. Where can I find some info on it? Thanks.
 
Old 04-02-2015, 07:37 AM   #29
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Something with a 300 file limit is a bit pointless.

You should install linux applications by installing them from your distro's repositories.
This allows automatic updates if a new version comes out + other benefits.

You can download from Googled sites - but you have no assurance that it doesn't contain malware...

However, here is a link to a backup procedure where the plan is to
1. Run backup2l to write to a backup directory.
2. Use rsync to transfer that backup directory to a remote machine.
Everything could be easily automated.

Although the example given looks like it requires a lot of configuration, this is not actually true as the bulk of the source is provided.
You just choose a few lines to alter and leave the rest.
Any line that starts with a # is treated as a comment.

https://www.bytemark.co.uk/support/d...backupexample/
 
1 members found this post helpful.
Old 04-02-2015, 12:24 PM   #30
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by Gregg Bell View Post
And I've got two computers so it is nice to have things sycnced.
Sorry for bringing up yet another alternative, but if the syncing between two computers part is important to you, consider using unison. It has a reasonably straightforward graphical frontend and it does just that - keeping two computers in sync.
It is smart enough to figure out which change is more recent, so you can basically make changes on either machines, and unison will typically do the right thing.
In case of conflicts it will ask you, or skip the conflicting file, depending on the mode in which you run it.
If you keep all your data on both computers they would serve as backups for each other - no need to put anything in the cloud only for backup purposes...
 
2 members found this post helpful.
  


Reply

Tags
back-up, sync, xubuntu



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
[SOLVED] Please explain how this Read Command works murali2489 Linux - Newbie 10 01-30-2015 01:00 AM
Could somebody explain how this line of code works... trist007 Programming 2 05-12-2009 01:50 PM
Can someone explain how this script works? Sanborn Programming 18 06-15-2007 08:53 AM
Please explain the way the program works. Gins Programming 7 03-22-2006 06:17 PM
Please explain how dd works and what it does ohovus Linux - Newbie 4 12-13-2005 08:48 AM

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

All times are GMT -5. The time now is 03:27 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