New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
COPY from backup
COPY from backup
Hi, now I updated my B2 with Bubba 2 software version 2.4.1. I made a fresh new install. Before I backuped everything in the data partition. I have 3 different users. Now I want to copy the data back to the users directories. How can I do that.
I made the backup with rsync so properties and user rights are still kept from the old installation.
L.
I made the backup with rsync so properties and user rights are still kept from the old installation.
L.
Re: COPY from backup
Ok, just to make it more detail.
I made the backup using which preserves the user rights and time stamps. Now I want to copy them back to the new user directory. I am not very familiar with rsync, but it seems that he userrights are preserved also, when I copy the data back. This leads to not beeing able to delete or copy or even access the files. So what parameters do I need to set If I just want to preserve time-stamp?
L.
I made the backup using
Code: Select all
rsync --rav
L.
Re: COPY from backup
The issue may be that your users are not the same. The owner and group that are assigned to folders are registered as integer numbers that are matched against the PAM database (in most cases, including Bubba, the passwd, shadow and group file).
-
- Posts: 904
- Joined: 09 Oct 2009, 18:49
Re: COPY from backup
Code: Select all
man rsync
Re: COPY from backup
ok I think will do. I am copying with root anyway. If I sync into the users folder are the rights assigned of the users?
L
Code: Select all
rsync -rltgov
L
Re: COPY from backup
No
The rights are kept like they were; e.g. if a file originally belonged to user 1001 then it will be restored as belonging to user 1001 regardless of whether this user exists on the system where it is restored to. Similarly if on the original system the files belonged to user Sven but on the target system user 1001 is named Anna, then Sven's restored files will belong to Anna.
The rights are kept like they were; e.g. if a file originally belonged to user 1001 then it will be restored as belonging to user 1001 regardless of whether this user exists on the system where it is restored to. Similarly if on the original system the files belonged to user Sven but on the target system user 1001 is named Anna, then Sven's restored files will belong to Anna.
Re: COPY from backup
ok. what to do then?
I can plug the hdd to my linux computer and assign new rights. Meaning read, edit and so on for all users. Would that do?
I mean, whats the use of doing rsync for backup if I can not copy the files back?
L.
I can plug the hdd to my linux computer and assign new rights. Meaning read, edit and so on for all users. Would that do?
I mean, whats the use of doing rsync for backup if I can not copy the files back?
L.
Re: COPY from backup
I named the users the same. Now how can I check whats the user id on bubba and on my files?
L.
L.
Re: COPY from backup
The shell command `getent passwd` will show you the users and their numerical ID. Of course since the original system does not exist anymore, that will not give you the information you need because there's nothing to compare it to.
A dead giveaway if you restore to a new system is to verify the owner of each folder in /home; obviously you want each of those folders to belong to a user with the same name. Every mismatch you see there will also count for other files and folders of that user.
A dead giveaway if you restore to a new system is to verify the owner of each folder in /home; obviously you want each of those folders to belong to a user with the same name. Every mismatch you see there will also count for other files and folders of that user.
Re: COPY from backup
Ok. Then I am left with resetting the user rights to all users and distribute the files as they belong to each user.
L.
L.
Re: COPY from backup
In my experience it always works if you simply create your new users in the same order as you created the old ones. And of course, don't remove or add any new ones.
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
Re: COPY from backup
I will give it a try. If it not works I just will set up the server as third time. However I already have folders and files which are without user and thus can not be deleted. They belong technically to the third user I created. However after syncing the storage folder for test end tried to delete the content I realized they stay. I can only read the content but not write into the folder and so on. Although storage must be accessible to all users, theoretically. So this is strange.
This just tells me that my third user has a different ID compared to the first installation.
What I do not understand is that apart from admin the users have the following ID
We will see.
This just tells me that my third user has a different ID compared to the first installation.
What I do not understand is that apart from admin the users have the following ID
Code: Select all
user2 1001
user3 1002
We will see.
Re: COPY from backup
you can change the user id by editing /etc/passwd. It's not really the way it's meant to be used, but it's effective