LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-28-2020, 10:54 AM   #76
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591

first check ownership of the backup /mnt/sdc
Code:
ls -l /mnt/sdc
or
Code:
 ls -Rla /mnt/sdc
to check recursively plus hidden files
post the output.

Last edited by colorpurple21859; 09-28-2020 at 12:44 PM.
 
Old 09-28-2020, 12:41 PM   #77
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
maybe this way
Code:
cp -rp /mnt/sdc /mnt/sda3/home/
 
Old 09-28-2020, 03:15 PM   #78
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
So :
1 check permissions of backup files. If they're personnal files (photos, music, documents as pdf,odt,doc files) that would not matter much, you can easily correct after restoring, otherwise you will have to copy preserving ownership and write/read permissions
2 be root (really logout from user), telinit 1 at best, and backup then brand new user folder then copy the backedup user folder in home recursivly
3 check file permissions and correct them if needed
4 reboot
 
Old 09-28-2020, 07:28 PM   #79
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
What is in /mnt/sdc? home folder plus sub-directories or <user folder> plus sub-directories?

Last edited by colorpurple21859; 09-28-2020 at 07:34 PM.
 
Old 09-29-2020, 03:34 AM   #80
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
first check ownership of the backup /mnt/sdc
Code:
ls -l /mnt/sdc
or
Code:
 ls -Rla /mnt/sdc
to check recursively plus hidden files
post the output.
https://ibb.co/dJbZcYr

Quote:
Originally Posted by colorpurple21859 View Post
Code:
 ls -Rla /mnt/sdc
to check recursively plus hidden files
by using this, the list is way too long and i dont wanna use pastebin since it could exploit my real name.

Last edited by Arch4GoodieLike; 09-29-2020 at 03:36 AM.
 
Old 09-29-2020, 03:34 AM   #81
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
What is in /mnt/sdc? home folder plus sub-directories or <user folder> plus sub-directories?
https://ibb.co/wJstT3P
 
Old 09-29-2020, 05:47 AM   #82
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Your command is attempting to copy the folder /mnt/sdc which would include everything in it to /home

Code:
I had to reinstall Arch due accidentally moving the /root directly, so I did it and then I tried to replace the vanilla /home with my backup /home
If your doing this from the installer, change the cp to this:
Code:
cp -ax /mnt/sdc/home/<user directory> /mnt/sda3/home/
If not doing this from a the installer, but by booting into the installed system, don't mount /dev/sda3 to /mnt it is already mounted on /, mount your backup as you have been, it would be this
Code:
cp -ax /mnt/sdc/home/<user directory> /home/
If the system didn't work when coping all the files from the backup to the root partition was probably due to the the root files in the backup belonging to your user user instead of root root

Last edited by colorpurple21859; 09-29-2020 at 06:25 AM.
 
Old 09-29-2020, 06:26 AM   #83
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
a

Quote:
Originally Posted by colorpurple21859 View Post
If not doing this from a the installer, but by booting into the installed system, don't mount /dev/sda3 to /mnt it is already mounted on /, mount your backup as you have been, it would be this
Code:
cp -ax /mnt/sdc/home/<user directory> /home/
thx ! it works now! is there a way to add a branch from backup or so, so i havent to install all the programms again?
 
Old 09-29-2020, 06:36 AM   #84
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
If you use the chown command to change permissions on /mnt/sdc, like this
Code:
chown -hR root /mnt/sdc
chown -hR <user name> /mnt/sdc/home/<usr directory>
should allow you to copy everthing from the installer with this
Code:
cp -ax /mnt/sdc/* /mnt/sda3/
if you have to do it again
you will need to add this mount command to the list
Code:
mount /dev/sda1 /mnt/boot
before copying everything over.

Last edited by colorpurple21859; 09-29-2020 at 06:40 AM.
 
Old 09-29-2020, 06:41 AM   #85
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
if you have to do it again
what you mean by that? sorry.
 
Old 09-29-2020, 07:05 AM   #86
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
If your first problem is solved, mark the thread as solved.

New question, new thread. Thx
 
Old 09-29-2020, 07:13 AM   #87
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
If you happen to break your system like this last time, format your partitions, mount the the partitions copy files over from the back-up, chroot and reinstall grub

Last edited by colorpurple21859; 09-29-2020 at 07:14 AM.
 
1 members found this post helpful.
Old 09-29-2020, 07:17 AM   #88
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
If you use the chown command to change permissions on /mnt/sdc, like this
Code:
chown -hR <user name> /mnt/sdc/home/<usr directory>
by using this i get
Code:
 chown: invalid user: ▀myusername▀
 
Old 09-29-2020, 07:18 AM   #89
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
If you happen to break your system like this last time, format your partitions, mount the the partitions copy files over from the back-up, chroot and reinstall grub
ok thanks, noted!
 
Old 09-29-2020, 07:29 AM   #90
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
by using this i get
Quote:
Code:
chown: invalid user: ▀myusername▀
you will have to change ownership back to the user either from the chroot or after booting the system with
Code:
chown -hR <user name> /home/<usr directory>
 
  


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
Remote Backup script needed | backup every 1-2 seconds (Online/Hot backup) reda Linux - Newbie 4 04-20-2019 05:02 PM
Replacing BIOS jmh72 Linux - Laptop and Netbook 10 04-07-2018 05:59 PM
[SOLVED] Backup, shrink backup and modify MBR of backup jps1x2 Linux - General 1 12-17-2013 05:03 AM

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

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