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 11-24-2020, 09:36 PM   #1
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Rep: Reputation: 176Reputation: 176
I need a simple backup for Home folder


I had Back In Time and it works great until it doesn't. Free File Sync seems like it would be good but it often finds files it can't sync for some reason. I tried Kbackup. They said it was easy. It's not. At least not for me. I ran it for hours and when the Home folder was finally copied the screen froze. Then I finally learned how to untar the tar file and there was nothing in the file. (Admittedly, I may have done something wrong.)Grsync seems powerful but I get confused with "verbose" and all that stuff. Anyway, there's got to be something simple. All I would ask is that it be able to do incremental changes. I don't need old versions or anything like that. Thank you.
 
Old 11-24-2020, 09:55 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
I use rsync with the -a (for archive) argument. Here's my little script:

Code:
rsync -a [/path/to/home] /media/sdb1/backups

I understand that Back in Time is a front end for rsync, So it might help it you told us more about how Back in Time has misbehaved.
 
1 members found this post helpful.
Old 11-24-2020, 10:12 PM   #3
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by frankbell View Post
I use rsync with the -a (for archive) argument. Here's my little script:

Code:
rsync -a [/path/to/home] /media/sdb1/backups
I understand that Back in Time is a front end for rsync, So it might help it you told us more about how Back in Time has misbehaved.
Thanks Frank. Back In Time will just throw errors at me sometimes. It's a really good program, though. I don't mean to dis it. The latest thing was it was saying the receiving usb didn't have enough space.

Anyway, I was looking over the directions for grsync and I'm starting to think that might work for me. (It's not as complicated as it seems.)

So in your command sdb1 is a usb drive? What does your command actually do? (I'm still not real comfortable doing stuff like that in the terminal, though.)
 
Old 11-24-2020, 11:49 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by Gregg Bell View Post
Thanks Frank. Back In Time will just throw errors at me sometimes. It's a really good program, though. I don't mean to dis it. The latest thing was it was saying the receiving usb didn't have enough space.
Well, that last one sounds like a fairly straight forward error to understand.

Quote:
Originally Posted by Gregg Bell View Post
Anyway, I was looking over the directions for grsync and I'm starting to think that might work for me. (It's not as complicated as it seems.)

So in your command sdb1 is a usb drive? What does your command actually do? (I'm still not real comfortable doing stuff like that in the terminal, though.)
It is wherever you want to backup your files to - so in your case probably a usb drive.

If you were mostly happy with Back In Time, perhaps people here could help you with whatever problems you had with it.
Rolling your own backup solution if you're not comfortable with the commandline could be a bit of a headache.

Evo2.
 
1 members found this post helpful.
Old 11-25-2020, 12:13 AM   #5
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Gregg Bell View Post
Back In Time will just throw errors at me sometimes. It's a really good program, though. I don't mean to dis it. The latest thing was it was saying the receiving usb didn't have enough space.
What did "df <receiving-usb-device>" return after that message was seen?

I've never used "Back In Time" so I wonder: does it save copies of the source trees in point-in-time directories? (Ah... I checked the documentation and it looks like this may very well be the case.) If so, perhaps there's too many of the older snapshots and insufficient space for another. Did that error message appear immediately or early in the backup process? (Perhaps BIT scanned your hard disk and determined that the number of files to be backed up exceeded the remaining space on the USB drive and threw up its hands before doing anything.) After it had been running for a while? (It was backing up but simply ran out of space while performing the backup.)

All of that would be helpful to know.

Also, I'd try cleaning up old cruft like browser caches and thumbnails and trying again. If that works, perhaps BIT allows you to specify "backup up everything except that... and that... and..." (You get the idea.)

HTH...
 
1 members found this post helpful.
Old 11-25-2020, 12:29 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Gregg Bell View Post
I had Back In Time and it works great until it doesn't. Free File Sync seems like it would be good but it often finds files it can't sync for some reason. I tried Kbackup. They said it was easy. It's not. At least not for me. I ran it for hours and when the Home folder was finally copied the screen froze. Then I finally learned how to untar the tar file and there was nothing in the file. (Admittedly, I may have done something wrong.)Grsync seems powerful but I get confused with "verbose" and all that stuff. Anyway, there's got to be something simple. All I would ask is that it be able to do incremental changes. I don't need old versions or anything like that. Thank you.
All this sounds like you need to solve the problems you listed instead of dismissing them.
In other words, what if we recommend "something else" and it "works until it doesn't" (great problem description btw)?
 
1 members found this post helpful.
Old 11-25-2020, 11:37 AM   #7
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by evo2 View Post
Hi,

Well, that last one sounds like a fairly straight forward error to understand.
Thanks Evo2. Yeah, it seems that way but it wasn't. There was plenty of room on the USB drive. What happened is as soon as I took another "snapshot" these black squares started filling the computer screen saying there wasn't enough room. I'd run into that problem before, and as I recall I had to go to the dev in Github to solve it.

Quote:
Originally Posted by evo2 View Post


It is wherever you want to backup your files to - so in your case probably a usb drive.

If you were mostly happy with Back In Time, perhaps people here could help you with whatever problems you had with it.
Rolling your own backup solution if you're not comfortable with the commandline could be a bit of a headache.

Evo2.
Yeah, I'm staying away from the commandline. It's like Universal replace in LO or Word. Too risky. (Too much power in the hands of somebody as impatient as me.)
 
Old 11-25-2020, 11:43 AM   #8
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by rnturn View Post
What did "df <receiving-usb-device>" return after that message was seen?

I've never used "Back In Time" so I wonder: does it save copies of the source trees in point-in-time directories? (Ah... I checked the documentation and it looks like this may very well be the case.) If so, perhaps there's too many of the older snapshots and insufficient space for another. Did that error message appear immediately or early in the backup process? (Perhaps BIT scanned your hard disk and determined that the number of files to be backed up exceeded the remaining space on the USB drive and threw up its hands before doing anything.) After it had been running for a while? (It was backing up but simply ran out of space while performing the backup.)

All of that would be helpful to know.

Also, I'd try cleaning up old cruft like browser caches and thumbnails and trying again. If that works, perhaps BIT allows you to specify "backup up everything except that... and that... and..." (You get the idea.)

HTH...
Thanks rnturn. I was definitely short on trying to figure it out. There was only one snapshot on the USB so there was plenty of room (I've had up to seven). I had run into the problem before and knew that the fix was pretty involved and just wasn't up for it. The thing is I don't really need anything more than the current Home folder backed up. In fact, when BIT gets a few snapshots on it it gets really slow. I'm trying Grsync right now. I think this might be my answer.
 
Old 11-25-2020, 11:46 AM   #9
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by ondoho View Post
All this sounds like you need to solve the problems you listed instead of dismissing them.
In other words, what if we recommend "something else" and it "works until it doesn't" (great problem description btw)?
LOL You mean you needed a better description than that?

I'm running Grsync right now. All I need is one backup. BIT specialized in going back in time. I just want now. We'll see how this goes. I can go back (no pun intended) and figure out BIT if I need to.
 
Old 11-25-2020, 12:52 PM   #10
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
I've been using Duplicity globally by the root crontab. It works fine and I've been able to do simple restorations. My problem is how to restore if I lose the existing directory /home/"$USER"/.cache/duplicity folder. Here is my script.

Code:
#!/bin/sh

desktop_home_dir_func() {
	if [ ! -z "$POOLLOC" ] ; then
		TARGET="$POOLLOC"/backups/homebackups
		if [ "$USER" = root ] ; then
			HOSTNAME=$(uname -n)
			for user in /home/* ; do
				BUSER=$(basename "$user")
				if [ ! -d "$TARGET"/"$HOSTNAME"/"$BUSER}" ] ; then
					mkdir -p "$TARGET"/"$HOSTNAME"/"$BUSER" && chown -R \
					"$BUSER":"$BUSER" "$TARGET"/"$HOSTNAME"/"$BUSER"
				fi
				su -c "duplicity \
				--exclude-if-present .nobackup \
				--no-encryption \
				--full-if-older-than 1M \
				/home/${BUSER} file://${TARGET}/${HOSTNAME}/${BUSER}" "$BUSER"
				su -c \
				"duplicity remove-all-but-n-full 4 --force \
				file://${TARGET}/${HOSTNAME}/${BUSER}" "$BUSER"
			done
		else
			lsblk | head -n 2 | grep ltsp && HOSTNAME=server || HOSTNAME=$(uname -n)
			RESTFOLDER=/home/"$USER"/Desktop/RESTORE_DELETE_ASAP
			duplicity \
			--no-encryption \
			--progress \
			file://"$TARGET"/"$HOSTNAME"/"$USER"/ "$RESTFOLDER"
			touch "$RESTFOLDER"/.nobackup
		fi
	fi
}

Last edited by jmgibson1981; 11-25-2020 at 12:55 PM.
 
Old 11-25-2020, 03:13 PM   #11
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
Putting a backup of /home in /home is totally useless, just a waste of time and storage space. Backups should go to an external drive, either local, network, or cloud, preferably more than one. I know nothing about duplicity.
 
Old 11-25-2020, 03:29 PM   #12
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Quote:
Putting a backup of /home in /home is totally useless, just a waste of time and storage space.
If directed at me might you point out the problem in my script. I'd like to it to be perfect. My "$POOLLOC" is an nfs mounted directory from my server.
 
Old 11-25-2020, 03:44 PM   #13
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
.cache should not be considered as permanent. Anything there is subject to loss. I suggest backing up /home/"$USER"/.cache/duplicity to someplace external to /home. That could be done separately or as part of the normal backup.
 
  


Reply



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
Store ecryptfs files inside home folder when enabling full home folder encryption in Linux Murz Linux - Security 4 10-27-2018 03:57 AM
Simple Slackware vs simple Arch vs simple Frugalware punchy71 Linux - Distributions 2 08-28-2012 02:30 PM
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
A script within a folder to delete the folder, script, and the folder's contents Cyberman Programming 15 10-17-2007 07:32 AM
Home folder icon does not open home folder CiscoGeek Linux - Newbie 3 12-18-2006 07:00 AM

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

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