Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
/media/my_external/Backup should be the right one if it is mounted to /media
What filesystem is on that drive? (I ask because probably all of them come formated as "vfat" - which will not work)
If it is a linux filesystem: how is it mounted?
What was the error?
well you need to mount the drive somewhere before you can use it with rsync. so forget about rsync for now and just check where it's mounted with the mount command itself.
I'm lost about mounting it. Don't understand at all. I plug in the USB cable, the icon is on the desktop. I can drag and drop or copy paste files. But not rsync. How do I mount it, and where? Confused.
Results of mount:
rich@rich-laptop:~$ mount my_external
[mntent]: warning: no final newline at the end of /etc/fstab
mount: can't find /home/rich/my_external in /etc/fstab or /etc/mtab
OK. It seems to be mounted. Here's the result of mount. I see it in the last line.
rich@rich-laptop:~$ mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-17-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/scd0 on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev,user=rich)
/dev/sdb1 on /media/my_external_ type ext3 (rw,nosuid,nodev)
rich@rich-laptop:~$
The mount options seem to be the problem. It is mounted automatically for you with options: "nosuid" and "nodev"
"nosuid" likely beeing the problem.
Mount it "by hand".
Code:
# first unmount it from /media
sudo umount /media/my_external_
# then make the mountpoint
sudo mkdir /mnt/my_mountpoint
# mount it
sudo mount /dev/sdb1 /mnt/my_mountpoint/
# and then try:
sudo rsync -avz --delete /home/rich/Test.odt /mnt/my_mountpoint/
Be sure what you write: you wrote:
my_external_
but also
my_external
obviously only one is correct
I made several mistakes. One is that I did a right-click > Create Folder within the USB drive browser window. And I did some copy-paste and drag-drop to the USB. Then messing around more, I seem to have mounted it twice, which caused the duplicate folders:
my_external
my_external_
Looks like I need to add everything to the USB via tar, rsync, or such - to maintain permissions, etc. NO copy-paste, and NO right-click > Create Folder from the USB browser window.
I used nautilus to delete everything. Then WAS able to write files on the drive with tar, and also with rsync.
But deleting everything like that also removed the lost+found folder. So, I did a fresh reformat to ext3 for a clean start.
I'd like to do more testing, by adding archives, folders, files to the USB drive, can I "correctly" delete them by right-click > Move to Trash from within the USB drive browser window? Or do I need to use tar or rsync to remove them?
If you just wanted to copy something to the drive - drag&drop would be a good way.
To use rsync you need the permissions to be different than they are when it is automatically mounted (when you plug it in).
The lost+found folder is not important at all - it will be recreated everytime you fsck (check) the drive.
to remove:
Nautilus preferences --> behaviour --> trash: provide a delete command circumventing the trash
I think it will just alert you that it cannot move to trash and offer deleting instead.
I need help again !! My machine crashed this morning (another topic for later) and I need to restore things.
On the USB drive, in a folder named 07_31_2008 I placed the following:
rich (home dir)
etc
var
usr
I need to get those on to my laptop hard drive. I have tried different combinations of the rsync command to copy from the USB to sda1, but none of them work. I don't know how to issue the rsync command to restore those files back to my laptop FROM the USB drive.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.