By that I don’t mean what program do you use, but what method do you use?
Specifically maintaining permissions etc.
I have a problem whereby I had an old computer I was running 11.1 on, and I got a newer computer to put 11.2 on. All I did was copy my documents, pictures etc onto a usb stick and then copied them back onto my new computer. However I have a lot of problems with permissions, eg saying I do not have write permissions for this folder or file or whatever. I have been able to get around by using chmod command on the specific files.
Is there another way perhaps I should have backed up my files that will maintain permissions. Or is it simply because I have restored them to a different computer with a different user name / computer name ?
What is a good simple method of backing up data to say a usb stick or perhaps CD/DVD ? Is K3B data project a good way and will it maintain permissions etc if I restore from it?
doing a file copy should work fine. The problem you may be having is that the uid of the user on the new computer you copied the files to is different then the old computer. Even if the user names are the same the file permissions are based on the uid not the name of the user. try doing a su to root then chown on all the files in the directory you copied the files to. be careful not to do a chown from the root directory many things will break if root is not the owner of the files.
Use mysqldump to copy the mysql databases to a folder in /home/user, then, as user, copy everything to DVD - no permissions problems if copying done as user (obviously, mysql permissions have to be used to make the mysqldump copy to /home/user).
Thanks guys. Barry I actually did use chown not chmod (that was my mistake/typo).
So just to clarify, I can just copy my files to a CD/DVD using K3B and there wont be any problem.
What about if I want to exchange some files between 2 openSUSE boxes, or between my openSUSE box and a windows box or vise versa? Are there any complications there with file ownership/permissions?
Someone tells me they cpio their files before copying off to media, any advantage to that?
First think over the difference of a user copying files (for himself for whatever reason, transport, backup) and of the system manager (root) doing these things (mostly for backup, but also for e.g. transferring data to a newly installed system where this is done for all the users of the system).
This is just to make you aware of the different roles one has on a Unix/Linux system and the influence that may have on what and how to do things (e.g. tar behaves differently for a normal user and for root exactly for this reason). And cpio also has the same sort of mechanism, having options about preserving ownership and behaving differently for root.
When you, as end-user, copy files to a removable medium it depends on the fs-type on that medium what is on it concerning ownership and access bits, etc. When a native Linux fs -type (like ext3) is used this is of no concern.
The ownership on a Unix/Linux fs is by uid and gid. These are the numbers as found in /etc/passwd and /etc/group. Not the username and groupnames that are mostly presented to you by tools (like CLI* ls* and GUI file managers) for of obvious reasons. But on another system uid 1002 may not be the same user as on your system. That means that when you mount your removable medium on that other system, all the files are then owned by the user with uid 1002. Not by you (you even may not have a uid on that other system at all).
The same effect often happens when tarballs are expanded on another system, uids and gids are those as on the tar creating system.
Thus, when you have more then one system in say you home LAN, it is always better to have unique uids for the whole bunch of systems.