Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread Larry Brigman
Sorry. There are reasons for multiple mounts. Bind for one.
On Jul 9, 2016 7:48 PM, "John Jason Jordan"  wrote:

> On Sat, 9 Jul 2016 19:08:40 -0700
> Bill Barry  dijo:
>
> >> Whew! Hooray!
> >>
> >> Now on to trying to figure out rsync.
>
> >Excellent! Next time maybe try --diplomatic before --force.
>
> Even better, next time try not stupidly mounting the filesystem
> twice. :)
>
> That might be a good feature request for mount. If the filesystem is
> already mounted someplace, don't allow it to be mounted again, with an
> error message to umount the other one first.
> ___
> PLUG mailing list
> PLUG@lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Rsync user confusion: Who is user 1026?

2016-07-09 Thread John Jason Jordan
Having finally (!) mounted my new NAS drive I am working on rsync. I
have a prototype command:

rsync -rpt --delete /media/jjj/Movies/* /media/jjj/Synology

But to test it I created a 0 byte file 'test' in the source folder, and
changed the * to test in the above command. At first the command failed
with a permissions error (although I thought I had read that rsync does
not require sudo), so I executed the command with sudo. This worked
without error and the file appeared in the destination. To make sure I
still owned it I right-clicked on it with Thunar, then Properties >
Permissions. All the permissions are grayed out and the owner is listed
as 1026. Checking users and permissions I am user 1000. Yet, in spite
of the fact that some strange user owns the file, as jjj I can delete
it, rename it, etc.

So where did user 1026 come from?
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Sat, 9 Jul 2016 19:08:40 -0700
Bill Barry  dijo:

>> Whew! Hooray!
>>
>> Now on to trying to figure out rsync.

>Excellent! Next time maybe try --diplomatic before --force.

Even better, next time try not stupidly mounting the filesystem
twice. :)

That might be a good feature request for mount. If the filesystem is
already mounted someplace, don't allow it to be mounted again, with an
error message to umount the other one first.
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread Bill Barry
On Sat, Jul 9, 2016 at 7:03 PM, John Jason Jordan 
wrote:

> On Sat, 9 Jul 2016 18:49:52 -0700
> Bill Barry  dijo:
>
> >> I'm afraid to reboot. Rebooting will umount everything, except /
> >> and /home will be remounted, so that should clear up part of the
> >> problem with /mnt. But what about the missing permissions and other
> >> stuff?
>
> Guess what? Ubuntu repaired itself. I did nothing. But suddenly /mnt
> appears properly with ls -la, and Thunar displays the filesystem again.
> I don't know how this happened, but I'm not questioning it.
>
> Whew! Hooray!
>
> Now on to trying to figure out rsync.
>

Excellent! Next time maybe try --diplomatic before --force.
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Sat, 9 Jul 2016 18:49:52 -0700
Bill Barry  dijo:

>> I'm afraid to reboot. Rebooting will umount everything, except /
>> and /home will be remounted, so that should clear up part of the
>> problem with /mnt. But what about the missing permissions and other
>> stuff?

Guess what? Ubuntu repaired itself. I did nothing. But suddenly /mnt
appears properly with ls -la, and Thunar displays the filesystem again.
I don't know how this happened, but I'm not questioning it. 

Whew! Hooray!

Now on to trying to figure out rsync. 
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread Bill Barry
On Sat, Jul 9, 2016 at 6:32 PM, John Jason Jordan 
wrote:

> On Sat, 9 Jul 2016 18:00:19 -0700
> Bill Barry  dijo:
>
> >On Sat, Jul 9, 2016 at 5:51 PM, John Jason Jordan 
> >wrote:
>
> >> From the command line the ls -la command shows /mnt as a directory,
> >> but the permissions are just d??, followed by ? for all the
> >> other attributes. I can see the attributes it is supposed to have by
> >> looking at it on my desktop computer (also Xubuntu 14.04), which
> >> shows it as owned by root. So I tried 'sudo chown root:root /mnt',
> >> but got 'No such device. I also tried rmdir, but got 'Device or
> >> resource busy.'
>
> >It did not take well to your forced umount. Everything still thinks
> >there is something mounted at /mnt
> >Don't really know  how to solve this, but you can try
> >umount -i /media/jjj/Synology
> >umount -i /mnt
> >See if thunar is ok, then try to mount again where you want it.
>
> umount -i /media/jjj/Synology
> umount: /media/jjj/Synology is not in the fstab (and you are not root)
>
> I got the same message when I tried it on /mnt.
>
> The only things in fstab are / and /home.
>
> I'm afraid to reboot. Rebooting will umount everything, except /
> and /home will be remounted, so that should clear up part of the problem
> with /mnt. But what about the missing permissions and other stuff?
>

It might even have trouble rebooting.
I am just stabbing in the dark at this point but you can try
umount --lazy /media/jjj/Synology
umount --lazy /mnt

Bill
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Sat, 9 Jul 2016 18:00:19 -0700
Bill Barry  dijo:

>On Sat, Jul 9, 2016 at 5:51 PM, John Jason Jordan 
>wrote:

>> From the command line the ls -la command shows /mnt as a directory,
>> but the permissions are just d??, followed by ? for all the
>> other attributes. I can see the attributes it is supposed to have by
>> looking at it on my desktop computer (also Xubuntu 14.04), which
>> shows it as owned by root. So I tried 'sudo chown root:root /mnt',
>> but got 'No such device. I also tried rmdir, but got 'Device or
>> resource busy.'

>It did not take well to your forced umount. Everything still thinks
>there is something mounted at /mnt
>Don't really know  how to solve this, but you can try
>umount -i /media/jjj/Synology
>umount -i /mnt
>See if thunar is ok, then try to mount again where you want it.

umount -i /media/jjj/Synology
umount: /media/jjj/Synology is not in the fstab (and you are not root)

I got the same message when I tried it on /mnt.

The only things in fstab are / and /home. 

I'm afraid to reboot. Rebooting will umount everything, except /
and /home will be remounted, so that should clear up part of the problem
with /mnt. But what about the missing permissions and other stuff? 
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread Bill Barry
On Sat, Jul 9, 2016 at 5:51 PM, John Jason Jordan 
wrote:

> On Sat, 9 Jul 2016 17:26:34 -0700
> John Jason Jordan  dijo:
>
> >I solved this problem with the -f (force) option. That umounted it from
> >both places. Then I remounted it just in /media/jjj/Synology. I thought
> >all was solved but now Thunar won't display the filesystem. The error
> >message is
> >
> >Failed to open directory "Filesystem"
> >Error when getting information for file '/mnt': No such device.
> >
> >I tried mkdir /mnt, but I got 'cannot create directory '/mnt': File
> >exists.'
>
> >From the command line the ls -la command shows /mnt as a directory, but
> the permissions are just d??, followed by ? for all the other
> attributes. I can see the attributes it is supposed to have by looking
> at it on my desktop computer (also Xubuntu 14.04), which shows it as
> owned by root. So I tried 'sudo chown root:root /mnt', but got 'No such
> device. I also tried rmdir, but got 'Device or resource busy.'
>

It did not take well to your forced umount. Everything still thinks there
is something mounted at /mnt
Don't really know  how to solve this, but you can try
umount -i /media/jjj/Synology
umount -i /mnt
See if thunar is ok, then try to mount again where you want it.

Bill


> ___
> PLUG mailing list
> PLUG@lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Sat, 9 Jul 2016 17:26:34 -0700
John Jason Jordan  dijo:

>I solved this problem with the -f (force) option. That umounted it from
>both places. Then I remounted it just in /media/jjj/Synology. I thought
>all was solved but now Thunar won't display the filesystem. The error
>message is 
>
>Failed to open directory "Filesystem"
>Error when getting information for file '/mnt': No such device.
>
>I tried mkdir /mnt, but I got 'cannot create directory '/mnt': File
>exists.'

>From the command line the ls -la command shows /mnt as a directory, but
the permissions are just d??, followed by ? for all the other
attributes. I can see the attributes it is supposed to have by looking
at it on my desktop computer (also Xubuntu 14.04), which shows it as
owned by root. So I tried 'sudo chown root:root /mnt', but got 'No such
device. I also tried rmdir, but got 'Device or resource busy.'
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread Don Buchholz
Make sure any stale entries have been cleared from /etc/fstab and then reboot.

On July 9, 2016 5:26:34 PM PDT, John Jason Jordan  wrote:
>On Sat, 9 Jul 2016 16:53:54 -0700
>John Jason Jordan  dijo:
>
>>On Sat, 9 Jul 2016 16:40:02 -0700
>>Bill Barry  dijo:
>>
>>>Check to see if the cifs-utils package is installed.
>
>Not quite solved. After installing cifs-utils I ran the command, but I
>didn't realize that the last time I ran the mount command I was trying
>to mount it in /mnt - so that is where it mounted it. Realizing my
>error I ran the command again and mounted it in /media/jjj/Synology. So
>then I needed to umount it from /mnt, but the umount command didn't
>like that:
>
>jjj@Devil-Bonobo:/media/jjj$ umount //synology.local/synology/
>   umount: it seems //synology.local/synology/ is mounted multiple
>   times
>
>I solved this problem with the -f (force) option. That umounted it from
>both places. Then I remounted it just in /media/jjj/Synology. I thought
>all was solved but now Thunar won't display the filesystem. The error
>message is 
>
>Failed to open directory "Filesystem"
>Error when getting information for file '/mnt': No such device.
>
>I tried mkdir /mnt, but I got 'cannot create directory '/mnt': File
>exists.'
>
>Now what?
>___
>PLUG mailing list
>PLUG@lists.pdxlinux.org
>http://lists.pdxlinux.org/mailman/listinfo/plug

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NOT QUITE SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Sat, 9 Jul 2016 16:53:54 -0700
John Jason Jordan  dijo:

>On Sat, 9 Jul 2016 16:40:02 -0700
>Bill Barry  dijo:
>
>>Check to see if the cifs-utils package is installed.

Not quite solved. After installing cifs-utils I ran the command, but I
didn't realize that the last time I ran the mount command I was trying
to mount it in /mnt - so that is where it mounted it. Realizing my
error I ran the command again and mounted it in /media/jjj/Synology. So
then I needed to umount it from /mnt, but the umount command didn't
like that:

jjj@Devil-Bonobo:/media/jjj$ umount //synology.local/synology/
umount: it seems //synology.local/synology/ is mounted multiple
times

I solved this problem with the -f (force) option. That umounted it from
both places. Then I remounted it just in /media/jjj/Synology. I thought
all was solved but now Thunar won't display the filesystem. The error
message is 

Failed to open directory "Filesystem"
Error when getting information for file '/mnt': No such device.

I tried mkdir /mnt, but I got 'cannot create directory '/mnt': File
exists.'

Now what?
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] SOLVED Re: Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Sat, 9 Jul 2016 16:40:02 -0700
Bill Barry  dijo:

>Check to see if the cifs-utils package is installed.

Voilà! 
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Bill Barry
On Sat, Jul 9, 2016 at 4:33 PM, John Jason Jordan 
wrote:

> On Sat, 9 Jul 2016 13:39:54 -0700
> Bill Barry  dijo:
>
> >With that knowledge the mount command would be closer to
> >
> >mount -t cifs //synology.local/synology/  /mnt --verbose -o
> >user=username
> >
> >where I still don't know the username and /mnt should already exist or
> >you need to create it.
>
> I don't want it in /mnt; I created a folder 'Synology' for it
> in /media/jjj. And my username is jjj, so here is what I tried:
>
> jjj@Devil-Bonobo:/media/jjj$ sudo mount -t
> cifs //synology.local/synology/  /media/jjj/Synology/ --verbose
> -o user=jjj
> mount: wrong fs type, bad option, bad superblock
> on //synology.local/synology/, missing codepage or helper
> program, or other error (for several filesystems (e.g. nfs,
> cifs) you might need a /sbin/mount. helper program) In
> some cases useful info is found in syslog - try dmesg | tail
> or so
>
>
Check to see if the cifs-utils package is installed.

Bill
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Sat, 9 Jul 2016 13:39:54 -0700
Bill Barry  dijo:

>With that knowledge the mount command would be closer to
>
>mount -t cifs //synology.local/synology/  /mnt --verbose -o
>user=username
>
>where I still don't know the username and /mnt should already exist or
>you need to create it.

I don't want it in /mnt; I created a folder 'Synology' for it
in /media/jjj. And my username is jjj, so here is what I tried:

jjj@Devil-Bonobo:/media/jjj$ sudo mount -t
cifs //synology.local/synology/  /media/jjj/Synology/ --verbose
-o user=jjj 
mount: wrong fs type, bad option, bad superblock
on //synology.local/synology/, missing codepage or helper
program, or other error (for several filesystems (e.g. nfs,
cifs) you might need a /sbin/mount. helper program) In
some cases useful info is found in syslog - try dmesg | tail
or so

Here is dmesg | tail:

jjj@Devil-Bonobo:/media/jjj$ dmesg |tail
[1712384.173773] FAT-fs (loop0): Can't find a valid FAT filesystem
[1712384.173880] UDF-fs: warning (device loop0): udf_load_vrs: No VRS
found 
[1712384.173883] UDF-fs: warning (device loop0): udf_fill_super:
No partition found (2) 
[1712485.836659] EXT4-fs (loop0): VFS: Can't
find ext4 filesystem 
[1712712.077709] EXT4-fs (loop0): VFS:
Can't find ext4 filesystem 
[1714942.416884] FS-Cache: Netfs
'cifs' registered for caching 
[1714942.416936] Key type
cifs.spnego registered 
[1714942.416941] Key type cifs.idmap
registered 
[1722458.249354] Unable to determine destination
address. 
[1722529.390614] Unable to determine destination
address.

Because of the destination address error messages I tried
just /media/jjj, then just /media, and still got the destination error
messages. But then I tried /mnt and the destination error messages from
the mount command went away (although still generated in dmesg and
syslog). What is up with that? Why can't I mount it where I want to
mount it? 

And even trying /mnt I still got these error messages from the mount
command:

mount: wrong fs type, bad option, bad superblock
on //synology.local/synology/, missing codepage or helper
program, or other error (for several filesystems (e.g. nfs,
cifs) you might need a /sbin/mount. helper program)
   In some cases useful info is found in syslog - try
   dmesg | tail  or so

And dmesg still adds an error message about the destination, which is
also echoed in syslog. (Syslog is easier to read because it gives you a
human-readable date/time.)
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Slackware-14.2

2016-07-09 Thread King Beowulf
On 07/08/2016 02:28 PM, Rich Shepard wrote:
>Pat and crew released Slackware-14.2 last week (1 July). For those of us
> with supporting subscriptions, the disks are in production and will be
> shipped toward the end of the month. This is the penultimate release that
> will be available on CDs as well as on a DVD.
> 
> Patience, grasshopper,
> 
> Rich

The Slackware community is celebrating this stellar release of the
oldest, most stable and most functional of all Linux distributions.

I've already updated since I volunteer on Slackbuilds.org for a number
of software packages and needed to perform testing. Sometimes a VM just
isn't good enough!  I purchased some clothing swag at
store.slackware.com to celebrate (needed a new cap to keep the sun off
the ol' balding noggin...).  Most of my installs go via USB thumb drive
or PXE/NFS these days but DVD iso and torrents can be accessed via the
announcement:
http://www.slackware.com/

So far so good.  Plug and play, ready of the desktop:
1. MSI MS-N033 (U123) atom netbook (x86)
2. ASUS x200CA notebook w/ bluetooth (x86_64)
3. Dell Latitude e7440 (x86-64)
4. custom desktop (MSI X99 i7-5820k, GTX660, 16GB RAM, 2TB HD)
5. HP Intel P4 server vintage 2000 - pending. lots of security
customization since it is open to the World.  Slackware is one of the
best distros if you need to set up a hardened system and/or server.

For the curious, you can now test drive Slackware-14.2 Live:
http://bear.alienbase.nl/mirrors/slackware/slackware-live/

gory source details here:
http://bear.alienbase.nl/mirrors/people/alien/liveslak/

Just burn the iso to a DVD, or consult the documentation to make a
bootable USB stick:
http://docs.slackware.com/slackware:liveslak

Slackware ships with the classic desktops: KDE, Xfce, fluxbox, blackbox,
windowmaker, fvwm, and tbm

The Slackware community as added Live edition desktop versions for Mate
and Plasma5, as well as a Xfce edition that fits onto a 1GB USB stick.

If you are getting tired of the shenanigans in the Debian derived world,
give Slackware a try. You will be glad you did.

-Ed






___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Rich Shepard
On Sat, 9 Jul 2016, John Jason Jordan wrote:

> Then I decided to just move ahead to rsync and forget about cp, but I
> couldn't get rsync to see the Synology. I gave up for the time being.

John,

   You need to mount it so the kernel sees it. As suggested by others, create
an entry for it in /etc/fstab and use the mount command. All done as root,
of course.

   On my server I have a USB-connected external hard drive used for backups.
In /etc/fstab is this entry:

UUID=da596a77-2fb4-41ed-881c-a3f8bb0ab437 /media/hd0  auto defaults  0 0

You'll need to find the UUID for your NAS hard drive. And, you might want to
add users after auto and a comma.

   I run backups from a script which is invoked daily at 00:30 from crontab.
You'll probably want to put the mount command for your Synology system in
the equivalent of Slackware's /etc/rc.d/rc.local which runs commands when
the system boots; I've no idea how the ubuntus do this.

Rich
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Bill Barry
On Sat, Jul 9, 2016 at 1:39 PM, Bill Barry  wrote:

>
>
> On Sat, Jul 9, 2016 at 1:34 PM, John Jason Jordan 
> wrote:
>
>>
>>
>> I note that both rsync and mount are not seeing the Synology. It seems
>> to me that my big problem is giving the command line the right syntax
>> to specify it. It's IP address is 192.168.0.101 and Thunar shows it in
>> the location bar as smb://synology.local/synology/, and in its shortcut
>>
>
> With that knowledge the mount command would be closer to
>
> mount -t cifs //synology.local/synology/  /mnt --verbose -o user=username
>
> where I still don't know the username and /mnt should already exist or you
> need to create it.
>
>
And you should be root or use sudo.
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Bill Barry
On Sat, Jul 9, 2016 at 1:34 PM, John Jason Jordan 
wrote:

>
>
> I note that both rsync and mount are not seeing the Synology. It seems
> to me that my big problem is giving the command line the right syntax
> to specify it. It's IP address is 192.168.0.101 and Thunar shows it in
> the location bar as smb://synology.local/synology/, and in its shortcut
>

With that knowledge the mount command would be closer to

mount -t cifs //synology.local/synology/  /mnt --verbose -o user=username

where I still don't know the username and /mnt should already exist or you
need to create it.

Bill
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Sat, 09 Jul 2016 11:35:46 -0700
Tomas Kuchta  dijo:

>That (smb://..) will not work. you will need to mount your NAS
>into empty real directory on the filesystem - either on command line
>using mount (as root) or by adding it to /etc/fstab and letting the
>system mount it at boot for you.
>
>I understand from google that Thunar is some GUI file manager which
>interprets smb://. and create its own temporary SMB mount at run
>time. This is unfortunately not usable by any command line commands as
>they are not able to interpret smb://... URL the same way.

Wow, a lot of suggestions. 

Then I decided to just move ahead to rsync and forget about cp, but I
couldn't get rsync to see the Synology. I gave up for the time being. 

Back to the cp command, I decided to mount the Synology locally, but I
couldn't get mount to see it either:

jjj@Devil-Bonobo:/media/jjj/Movies$ sudo mount -t ext4
192.168.0.101 /media/jjj/Synology/ 
mount: special device 192.168.0.101 does not exist

jjj@Devil-Bonobo:/media/jjj/Movies$ sudo mount -t ext4
smb://synology.local/synology/ /media/jjj/Synology/ 
mount: special device smb://synology.local/synology/ does
notexist 

I also changed '-t ext4' to '-t cifs,' but got more error messages.

Then I tried df -k, but it didn't see the Synology. Looking at the df
man page I see why - apparently df looks only at the local filesystem.

I note that both rsync and mount are not seeing the Synology. It seems
to me that my big problem is giving the command line the right syntax
to specify it. It's IP address is 192.168.0.101 and Thunar shows it in
the location bar as smb://synology.local/synology/, and in its shortcut
panel Thunar calls it '/synology/ on synology.local.' I've tried all of
those, plus some variations that I thought of, but so far I haven't hit
on the right combination.

If rsync doesn't need it to be mounted locally, then I should just
forget about cp and mounting it. But I still need the proper command
line syntax for rsync to see it.
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Bill Barry
On Sat, Jul 9, 2016 at 11:00 AM, John Jason Jordan 
wrote:

>
> I'm out of ideas. Suggestions?
>

If you want to use cp you will have to mount the filesystem. The regular
mount command will do this.  The filesystem type you want is called cifs.
The man page for the requisite options is here
man mount.cifs
A typical command would look like
mount -t cifs //server/share /mnt --verbose -o user=username

Bill
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread David Fleck
On Sat, 2016-07-09 at 11:59 -0700, Rich Shepard wrote:
> On Sat, 9 Jul 2016, John Meissen wrote:
> 
> > That's because 'cp' doesn't understand URL-style paths. 'cp' only deals
> > with local filesystems. If you want to use 'cp' you'll have to mount the
> > remote filesystem locally.
> 
>Doesn't smb, like nfs, make the remote partitions accessible like local
> partitions? It's been about a decade since I had nfs partitions on a
> separate server, but it seems to me that I could cd, cp, and otherwise treat
> them like those on the local workstation.

NFS, sure, because they generally get mounted explicitly in /etc/fstab
or similar.  I think that's an extra step that is missing here *if* the
original poster wants to use simple operations like 'cp' -- as noted,
that only works on locally-mounted file systems.  

However, what the original poster really wants to do doesn't depend on
opening that particular can of worms. He should concentrate on figuring
out the right rsync command (shouldn't be that hard) or the right scp
command (as also mentioned earlier).



___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Rich Shepard
On Sat, 9 Jul 2016, John Meissen wrote:

> That's because 'cp' doesn't understand URL-style paths. 'cp' only deals
> with local filesystems. If you want to use 'cp' you'll have to mount the
> remote filesystem locally.

   Doesn't smb, like nfs, make the remote partitions accessible like local
partitions? It's been about a decade since I had nfs partitions on a
separate server, but it seems to me that I could cd, cp, and otherwise treat
them like those on the local workstation.

Rich
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Tomas Kuchta
That (smb://..) will not work. you will need to mount your NAS into empty 
real directory on the filesystem - either on command line using mount (as root) 
or by adding it to /etc/fstab and letting the system mount it at boot for you.

I understand from google that Thunar is some GUI file manager which interprets 
smb://. and create its own temporary SMB mount at run time. This is 
unfortunately not usable by any command line commands as they are not able to 
interpret smb://... URL the same way.

I suggest that you look at using nfs again as it is easier to work with, 
without publishing your SMB password in /etc/fstab

Here is an example of nfs mount line for /etc/fstab
192.168.1.10:/volume1   /nfs  nfs4defaults,noauto,users 0 0

1. you need to: mkdir /nfs
2. with user you will be able to mount and umount as user on demand if your 
NAS is not guaranteed to be always available.
3. the mount command with the above in place: mount /nfs
4. umount as above: umount /nfs

Best luck, Tomas

On Saturday, July 09, 2016 11:00:17 AM John Jason Jordan wrote:
> On Fri, 08 Jul 2016 23:55:16 -0700
> 
> Tomas Kuchta  dijo:
> >if you add rsync --delete option then rsync will delete remote files
> >as you describe. For the safety of your files, maybe you should
> >consider enabling snapshots or do some safeguarding with your mirror
> >scripts.
> >
> >It would be unfortunate to loose all the NAS backup files just because
> >you accidentally deleted your USB drive or forgot to mount it or
> >something.
> 
> I can see I'm going to have to spend a lot of time studying rsync. But
> for starters I decided to use cp to see if I know how to specify the
> destination. Thunar displays a window with files in the destination and
> at the top of the window is a location bar. It says
> 'smb://synology.local/synology/.' So from the command line in the
> directory where the USB drive is mounted I did
> 
> cp  smb://synology.local/synology/
> cp: cannot create regular file ‘smb://synology.local/synology/’: No
> such file or directory
> 
> I also tried it without the trailing slash and again with a slash
> in front and got the same results. Then I tried adding http:// in
> front, but still no joy. For my last effort I specified the destination
> by the ip address of the Synology (192.168.0.101), and this time I got
> no error message, but it also failed to copy the file. However, when I
> added a slash in front of the ip address I got 'cp: cannot create
> regular file ‘/192.168.0.101’: Permission denied.' This reminds me that
> before Thunar would show the contents of the Synology I had to log into
> the share.
> 
> I'm out of ideas. Suggestions?
> ___
> PLUG mailing list
> PLUG@lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Dale Snell
On Sat, 9 Jul 2016 11:00:17 -0700, in message
20160709110017.3280e2bf@Devil-Bonobo, John Jason Jordan wrote:

> I can see I'm going to have to spend a lot of time studying rsync. But
> for starters I decided to use cp to see if I know how to specify the
> destination. Thunar displays a window with files in the destination
> and at the top of the window is a location bar. It says
> 'smb://synology.local/synology/.' So from the command line in the
> directory where the USB drive is mounted I did
> 
> cp  smb://synology.local/synology/
> cp: cannot create regular file ‘smb://synology.local/synology/’: No
> such file or directory
> 
> I also tried it without the trailing slash and again with a slash
> in front and got the same results. Then I tried adding http:// in
> front, but still no joy. For my last effort I specified the
> destination by the ip address of the Synology (192.168.0.101), and
> this time I got no error message, but it also failed to copy the
> file. However, when I added a slash in front of the ip address I got
> 'cp: cannot create regular file ‘/192.168.0.101’: Permission denied.'
> This reminds me that before Thunar would show the contents of the
> Synology I had to log into the share. 
> 
> I'm out of ideas. Suggestions?

cp does not understand remote copying, which is what you're trying
to do here.  You'll need to use scp, assuming that ssh is in the
Synology's software suite.  If it is, and you don't have them,
you'll need to generate a set of keys.  It's not hard, but I never
remember how to do it.  The man pages are complete, but rather
dry.  In fact, they're downright desiccated.

Anyway, I hope this helps.

--Dale

-- 
Excess on occasion is exhilarating.  It prevents moderation from
acquiring the deadening effect of a habit.
-- W. Somerset Maugham


___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread John Meissen

joh...@comcast.net said:
> cp  smb://synology.local/synology/ cp: cannot create regular
> file ‘smb://synology.local/synology/’: No such file or directory 


That's because 'cp' doesn't understand URL-style paths. 'cp' only deals with 
local filesystems. If you want to use 'cp' you'll have to mount the remote 
filesystem locally.



___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread David Fleck
On Sat, 2016-07-09 at 11:00 -0700, John Jason Jordan wrote:
> cp  smb://synology.local/synology/
> cp: cannot create regular file ‘smb://synology.local/synology/’: No
> such file or directory
> 
> I also tried it without the trailing slash and again with a slash
> in front and got the same results. Then I tried adding http:// in
> front, but still no joy. For my last effort I specified the destination
> by the ip address of the Synology (192.168.0.101), and this time I got
> no error message, but it also failed to copy the file. However, when I
> added a slash in front of the ip address I got 'cp: cannot create
> regular file ‘/192.168.0.101’: Permission denied.' This reminds me that
> before Thunar would show the contents of the Synology I had to log into
> the share. 
> 
> I'm out of ideas. Suggestions?
> ___
> PLUG mailing list
> PLUG@lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug


I've never used Thunar or a NAS, but...  
the first thing I'd do is run the command 
df -k
and see what it reported.


___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread John Jason Jordan
On Fri, 08 Jul 2016 23:55:16 -0700
Tomas Kuchta  dijo:

>if you add rsync --delete option then rsync will delete remote files
>as you describe. For the safety of your files, maybe you should
>consider enabling snapshots or do some safeguarding with your mirror
>scripts.
>
>It would be unfortunate to loose all the NAS backup files just because
>you accidentally deleted your USB drive or forgot to mount it or
>something.

I can see I'm going to have to spend a lot of time studying rsync. But
for starters I decided to use cp to see if I know how to specify the
destination. Thunar displays a window with files in the destination and
at the top of the window is a location bar. It says
'smb://synology.local/synology/.' So from the command line in the
directory where the USB drive is mounted I did

cp  smb://synology.local/synology/
cp: cannot create regular file ‘smb://synology.local/synology/’: No
such file or directory

I also tried it without the trailing slash and again with a slash
in front and got the same results. Then I tried adding http:// in
front, but still no joy. For my last effort I specified the destination
by the ip address of the Synology (192.168.0.101), and this time I got
no error message, but it also failed to copy the file. However, when I
added a slash in front of the ip address I got 'cp: cannot create
regular file ‘/192.168.0.101’: Permission denied.' This reminds me that
before Thunar would show the contents of the Synology I had to log into
the share. 

I'm out of ideas. Suggestions?
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NAS System suggestions

2016-07-09 Thread Rich Shepard
On Fri, 8 Jul 2016, John Jason Jordan wrote:

> For my next exercise I am going to see if I can set up rsync to keep the
> contents of my external USB 3.0 drive synced with the Synology. I have
> never figured out rsync, so I am going to start a new thread.

John,

   Probably the only rsync options you need are -avz (archive, verbose,
compress the transfer). That's what I use for my daily dirvish backups and
when synchronizing subdirectories on my laptop with those on my workstation.

   Many years ago Paul Heinlein taught me to be very careful of the one
potential gotcha': how the destination directory is specified. It's well
explained in the man page, but you gotta' pay attention while reading it.
Using the man page examples:

rsync -avz *.c foo:src/

This would transfer all files matching the pattern *.c from the
current directory to the directory src on the machine foo. If any of
the files already exist on the remote system then the rsync
remote-update protocol is used to update the file by sending only the
differences.

   This is most likely what you want to specify in your shell script. In your
case it might be something like

rsync -avz /path/to/source/directory :/path/to/destination/

   Terminating slash required.

   If, for example, you're using your NAS partition as the source and your
workstation as the destination and use

rsync -avz foo:src/bar /data/tmp
or
rwync -avz :/path/to/source /path/to/destination

your destination will contain the files in /path/to/destination/source

Happy transferring,

Rich


___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Rsync to a NAS drive

2016-07-09 Thread Tomas Kuchta
if you add rsync --delete option then rsync will delete remote files as you 
describe. For the safety of your files, maybe you should consider enabling 
snapshots or do some safeguarding with your mirror scripts.

It would be unfortunate to loose all the NAS backup files just because you 
accidentally deleted your USB drive or forgot to mount it or something 

Hope it helps, T


On Friday, July 08, 2016 11:46:24 PM John Jason Jordan wrote:
> I have just successfully set up a Synology DiskStation NAS device with
> one 6TB  drive on my home ethernet. This was not a trivial matter, as
> I had never done this before and I know little about networking.
> 
> I also have a 5TB USB 3.0 drive attached to my laptop with presently
> ~3TB of files on it. I wish to sync the USB drive to the NAS drive
> nightly. During the day files are frequently added to and sometimes
> deleted from the USB drive. My goal is for the NAS drive to be like a
> mirror; if a file is deleted from the USB drive it should be deleted
> from the NAS drive. I am thinking that rsync is the tool for this, but
> maybe not. Rsync keeps old files even if deleted from the source
> because it is designed for backups, but that is not what I want.
> 
> Is rsync the right tool for this, or not? If not, what? Maybe just use
> cp command with options not to copy files if they are already there?
> Suggestions welcome.
> ___
> PLUG mailing list
> PLUG@lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug