LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-08-2018, 07:13 PM   #1
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Rep: Reputation: 175Reputation: 175
Can't copy Home folder with grsync


When I try to copy my Home folder via the commands in the screenshot (via grsync), my usb drive (my destination) fills up with Config stuff, including a ton of LibreOffice stuff. I can copy individual folders in the Home folder just fine, but when I attempt to do the whole Home folder, I get all the config stuff. What am I doing wrong? Thanks.
Attached Thumbnails
Click image for larger version

Name:	Selection_079.png
Views:	18
Size:	11.0 KB
ID:	27851  
 
Old 06-08-2018, 07:22 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 4,835

Rep: Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765
Please look at - in a terminal - (and post if you want to)
Code:
ls -la /home/gregg
I suspect the files you're asking about are in hidden folders, i.e.: .ssh/ or .desktop or .cache (just guessing at some of the names)
The -a parameter to ls will show them to you.
 
1 members found this post helpful.
Old 06-09-2018, 06:29 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
grsync is the lamest-a**ed program. Just use from a terminal
Code:
rsync -av /home/user_name/* /destination_directory/
That will transfer everything that isn't hidden, ie, beginning with '.', the 'config' stuff.
 
1 members found this post helpful.
Old 06-09-2018, 07:11 PM   #4
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by scasey View Post
Please look at - in a terminal - (and post if you want to)
Code:
ls -la /home/gregg
I suspect the files you're asking about are in hidden folders, i.e.: .ssh/ or .desktop or .cache (just guessing at some of the names)
The -a parameter to ls will show them to you.
Thanks scasey. Yes, they are all hidden files that are being copied, beginning with . but the thing is there are none of my Home folders (well, the ones that aren't hidden, that is) being copied.
 
Old 06-09-2018, 07:13 PM   #5
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by AwesomeMachine View Post
grsync is the lamest-a**ed program. Just use from a terminal
Code:
rsync -av /home/user_name/* /destination_directory/
That will transfer everything that isn't hidden, ie, beginning with '.', the 'config' stuff.
Thanks Awesome, that's perfect. Except what would the command be if the destination_directory is a usb drive?
 
Old 06-09-2018, 09:53 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by Gregg Bell View Post
Thanks Awesome, that's perfect. Except what would the command be if the destination_directory is a usb drive?

/mount_point/destination_directory/


If you run 'mount', you'll see all your mount points. df -h will show you all your file systems. Between the two of those you should be able to find the mount point of the USB drive.
 
1 members found this post helpful.
Old 06-09-2018, 11:06 PM   #7
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by AwesomeMachine View Post
/mount_point/destination_directory/


If you run 'mount', you'll see all your mount points. df -h will show you all your file systems. Between the two of those you should be able to find the mount point of the USB drive.
Thanks Awesome.

I ran mount and it showed my usb drive info as:

/dev/sdb1 on /media/gregory/elvis2

So my command would be?

Code:
rsync -av /home/gregory/* /dev/sdb1/media/gregory/elvis2/

And using rsync in the terminal is going to take some getting used to. (I'm afraid of accidentally deleting my hard drive or something.) Until I get comfortable with rsync, I noticed this (screenshot) about grsync. Is there something I could enter there that would eliminate copying the hidden files?

And what command would I use if I just wanted to copy an individual folder in the Home folder (via rsync)?

Thanks
Attached Thumbnails
Click image for larger version

Name:	Selection_083.png
Views:	6
Size:	27.2 KB
ID:	27856  

Last edited by Gregg Bell; 06-09-2018 at 11:07 PM.
 
Old 06-10-2018, 06:26 AM   #8
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29
You may invest some time in reading the basics. Still the same since slackware 96

Shell, permissions, FHS, mounting.

i also assume linux from scratch, a gentoo installation will also bring you that knowledge
 
Old 06-10-2018, 11:17 AM   #9
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,705
Blog Entries: 13

Rep: Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922
Quote:
Originally Posted by _roman_ View Post
You may invest some time in reading the basics. Still the same since slackware 96

Shell, permissions, FHS, mounting.

i also assume linux from scratch, a gentoo installation will also bring you that knowledge
_roman_

You've been warned several times to not post off topic or to insert information matching some personal agenda.
 
3 members found this post helpful.
Old 06-10-2018, 09:40 PM   #10
ChuangTzu
Senior Member
 
Registered: May 2015
Location: Where ever needed
Distribution: Slackware/Salix while testing others
Posts: 1,643

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
https://www.howtogeek.com/135533/how...data-on-linux/
https://www.techrepublic.com/blog/li...r-with-grsync/

backintime is another option if you want an rsync frontend
https://backintime.readthedocs.io/en...ainwindow.html
https://www.howtogeek.com/110138/how...-back-in-time/
 
Old 06-10-2018, 10:23 PM   #11
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
From the screen shot it doesn't look like you can do much with the actual command. If you want to copy just on directory
Code:
$ rsync -rv /home/user/directory /mount_point/directory/
I have faith in you that you won't overwrite your hard drive. It's really pretty difficult to do. You can also exclude things with the '--exclude' switch. For example, to explicitly exclude all hidden files and directories,
Code:
$ rsync -rv --exclude=".*" /home/user/* /mount_point/directory/
 
Old 06-11-2018, 02:23 AM   #12
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 4,835

Rep: Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765
...and if you add -n (so -rvn), for "dry run", rsync will show you what its going to do without actually doing it.
Code:
man rsync
rsync is a little daunting, but not very difficult once you've learned how to use it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Ubuntu server16.04 copy folder from mounted usb to home folder fillister Linux - Newbie 3 05-31-2017 09:24 AM
How do I use the command line to copy a home folder to a new location sydneyleb Linux - Newbie 7 09-30-2016 07:25 PM
want to copy an inode folder from acdrom to a home directory (folder). nhbob Linux - Newbie 8 12-20-2009 11:12 AM
Copy Home Folder seashell11 Ubuntu 3 08-11-2006 12:39 PM

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

All times are GMT -5. The time now is 08:37 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration