[lftp] --size-range=RANGE examples?

2016-06-13 Thread Steven Dennis
Hello.  I would like to limit the size of files that are mirrored but I am
unsure of the format that I should use.  I would like to mirror all files
that at 0-200 MB in size.

Would this work?

--size-range=*0MB-200MB*



Thanks


Steven Dennis
nzdreame...@gmail.com
805.699.6462 (txt + voice)
805.903.3237 (voice)
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp not removing files from local directory

2016-05-18 Thread Steven Dennis
What about the -e here

lftp -u user,pass *-e* "set sftp:connect-program 'ssh

Is this in the wrong place?  Where should not be?

Again thanks.
On May 18, 2016 4:04 AM, "Alexander V. Lukyanov" <l...@netis.ru> wrote:

> On Tue, May 17, 2016 at 06:36:16AM -0700, Steven Dennis wrote:
> > Thanks for taking a look at my code.  I thought that the -e enabled lftp
> to
> > delete files.  If I remove the --newer-than what option should I use and
> > where should I put it to delete files on the target side when not on the
> > remote side?
>
> I don't see -e either.
>
> I was wrong about --newer-than option, it should not limit files to be
> removed.
> Add -vvv options to see the files to be deleted.
>
> --
>Alexander.
>
> > On May 16, 2016 11:33 PM, "Alexander Lukyanov" <lavv...@gmail.com>
> wrote:
> >
> > > Also --newer-than limits the file sets on the target side too, so older
> > > files won't be deleted.
> > >
> > > вт, 17 мая 2016, 9:31 Alexander Lukyanov <lavv...@gmail.com>:
> > >
> > >> I don't see the --delete option in your command line.
> > >>
> > >> пн, 16 мая 2016, 19:30 Steven Dennis <nzdreame...@gmail.com>:
> > >>
> > >>> Hello everyone,
> > >>>
> > >>> I am trying get lftp to make my local folders match my remote folder.
> > >>> When I delete a file/folder on the remote I want lftp to remove it
> on the
> > >>> local as well.  The man page says I can use the -e or --delete or
> > >>> --delete-first
> > >>>
> > >>> This is what I have been using and am not sure why it isn't deleting
> > >>> local files and folders that have been removed from the remote site.
> > >>>
> > >>> lftp -u user,pass -e "set sftp:connect-program 'ssh -a -x -T -c
> arcfour
> > >>> -o Compression=no'; mirror -v -c --newer-than=now-4hours --loop
> > >>> --use-pget-n=3  /home/user/finished/TV /home/pi/usrmnt/Target/; quit"
> > >>> sftp://XXX.XXX.XXX.XXX:XXX
> > >>>
> > >>> Any help is greatly appreciated.
> > >>>
> > >>> Thanks
> > >>>
> > >>> Steve
> > >>> ___
> > >>> lftp mailing list
> > >>> lftp@uniyar.ac.ru
> > >>> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
> > >>>
> > >>
>
> > ___
> > lftp mailing list
> > lftp@uniyar.ac.ru
> > http://univ.uniyar.ac.ru/mailman/listinfo/lftp
>
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp not removing files from local directory

2016-05-17 Thread Steven Dennis
Thanks for taking a look at my code.  I thought that the -e enabled lftp to
delete files.  If I remove the --newer-than what option should I use and
where should I put it to delete files on the target side when not on the
remote side?

Thanks again for your time.
On May 16, 2016 11:33 PM, "Alexander Lukyanov" <lavv...@gmail.com> wrote:

> Also --newer-than limits the file sets on the target side too, so older
> files won't be deleted.
>
> вт, 17 мая 2016, 9:31 Alexander Lukyanov <lavv...@gmail.com>:
>
>> I don't see the --delete option in your command line.
>>
>> пн, 16 мая 2016, 19:30 Steven Dennis <nzdreame...@gmail.com>:
>>
>>> Hello everyone,
>>>
>>> I am trying get lftp to make my local folders match my remote folder.
>>> When I delete a file/folder on the remote I want lftp to remove it on the
>>> local as well.  The man page says I can use the -e or --delete or
>>> --delete-first
>>>
>>> This is what I have been using and am not sure why it isn't deleting
>>> local files and folders that have been removed from the remote site.
>>>
>>> lftp -u user,pass -e "set sftp:connect-program 'ssh -a -x -T -c arcfour
>>> -o Compression=no'; mirror -v -c --newer-than=now-4hours --loop
>>> --use-pget-n=3  /home/user/finished/TV /home/pi/usrmnt/Target/; quit"
>>> sftp://XXX.XXX.XXX.XXX:XXX
>>>
>>> Any help is greatly appreciated.
>>>
>>> Thanks
>>>
>>> Steve
>>> ___
>>> lftp mailing list
>>> lftp@uniyar.ac.ru
>>> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
>>>
>>
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp not removing files from local directory

2016-05-16 Thread Steven Dennis
Hello everyone,

I am trying get lftp to make my local folders match my remote folder.  When
I delete a file/folder on the remote I want lftp to remove it on the local
as well.  The man page says I can use the -e or --delete or --delete-first

This is what I have been using and am not sure why it isn't deleting local
files and folders that have been removed from the remote site.

lftp -u user,pass -e "set sftp:connect-program 'ssh -a -x -T -c arcfour -o
Compression=no'; mirror -v -c --newer-than=now-4hours --loop --use-pget-n=3
 /home/user/finished/TV /home/pi/usrmnt/Target/; quit"
sftp://XXX.XXX.XXX.XXX:XXX

Any help is greatly appreciated.

Thanks

Steve
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] Excluding list of files?

2016-02-29 Thread Steven Dennis
Hello,

I want to create a list of all the files that lftp has d/l to my local
computer and then use that list to have the next run exclude them from
being d/l again.  I cannot find anything specific in the man page that
allows you to use a file with stuff to exclude.

I did come across this post

https://multimerch.com/blog/rsync-lftp-and-exclude-lists/

"I searched for an ftp alternative to rsync and stumbled upon lftp in this
post. It looked really nice until I found out lftp doesn't support exclude
lists, which means you can't make it read exclude patterns from a file. The
good news is, lftp does allow you to specify multiple --exclude switches at
once, so I modified the command to make use of my exclude-list.txt like
this:


lftp -u username,password -e "mirror --only-newer sed 's/^/--exclude /'
exclude-list.txt | tr 'n' ' ' --reverse /path/to/local/dir
/path/to/public_html" server.com

This way, sed prepends every line with an --exclude switch and tr replaces
newlines so in the end we have our lftp mirror command with all necessary
excludes in it."

but am not sure if there is a more simple approach as this seems
complicated to a beginner in linux.

Please let me know if this is the best way to exclude files from d/l from a
file.

Thanks
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] D/L files that are 24hr old?

2016-02-22 Thread Steven Dennis
Thanks again for the help.  So I think that I got it working with the
following

lftp -u user,pass -e "set sftp:connect-program 'ssh -a -x -T -c arcfour -o
Compression=no'; mirror -v -c --newer-than=now-4hours --loop --use-pget-n=3
-P 2 /home/user/finished/TV /home/pi/usrmnt/Target/; quit"
sftp://XXX.XXX.XXX.XXX:XXX

The strange thing is that it will mirror the folders with in the source
directory no matter when they were created, but it won't mirror any other
type of file unless it is 4 hours or younger (I think.  It might be looking
at the modification time and not the creation time)

Why would it mirror folders that are older than 4 hours?

Steven Dennis
nzdreame...@gmail.com
805.699.6462 (txt + voice)
805.903.3237 (voice)

On Sat, Feb 20, 2016 at 9:24 PM, Alexander Lukyanov <lavv...@gmail.com>
wrote:

> Lftp tries to get the file modification time in UTC. So the comparison
> does not depend on the server's timezone. Sometimes it fails due to ftp
> server limitations or bugs
>
> вс, 21 февр. 2016, 8:03, Steven Dennis <nzdreame...@gmail.com>:
>
>> Thanks for the help.  I was able to use the --newer-than, but now I am
>> wondering how this time is determined if my server where the files are
>> located is 9 hours ahead of where I am.  Does it use the time on the server
>> and the times that are on the files or does it use the time on the files on
>> the server but use my local time to figure out what is 24hr from now?
>>
>> Steven Dennis
>> nzdreame...@gmail.com
>> 805.699.6462 (txt + voice)
>> 805.903.3237 (voice)
>>
>> On Thu, Feb 18, 2016 at 11:32 PM, Lars Viklund <z...@acc.umu.se> wrote:
>>
>>> On Thu, Feb 18, 2016 at 09:10:01PM -0800, Steven Dennis wrote:
>>> > Hello,
>>> >
>>> > I would like to d/l files and folders from a directory on my web server
>>> > that have been put there or modified in the last 24 hours.
>>> >
>>> > I have read the man page and came across the --newer-than option.
>>> >
>>> > "For option --newer-than you can either specify a file or time
>>> specification
>>> > like that used by *at*(1) command, e.g. `now-7days' or `week ago'. If
>>> you
>>> > specify a file, then modification time of that file will be used."
>>> >
>>> > Can you tell me if this would be correct?
>>> >
>>> > lftp open -u user,pass sftp://XXX.XXX.XXX.XXX -P mirror -c
>>> --newer-than
>>> > 24hrs /remote/directory/ /local/directory/
>>>
>>> Did you look at the referenced manual page, and the specification that
>>> it cites?
>>>
>>> at(1) (and by extension this feature) takes absolute timepoints as
>>> argument, constructed from relative phrasing.
>>>
>>> Both "now-7days" and "week ago" describe absolute points in time.
>>>
>>> See https://github.com/lavv17/lftp/issues/21 for a discussion mirroring
>>> your question, http://linux.die.net/man/1/at for the manpage. Note that
>>> the at(1) spec mostly cares about future timepoints and thus doesn't
>>> mention the "ago" flavor.
>>>
>>> Your argument should probably be along the lines of "24 hours ago" or
>>> "day ago".
>>>
>>> > Also can you tell me if there are other time parameters that can be
>>> used as
>>> > well as the "grammar" that should be used when putting this together?
>>> >
>>> > Thanks
>>> >
>>> > Steven
>>>
>>> > ___
>>> > lftp mailing list
>>> > lftp@uniyar.ac.ru
>>> > http://univ.uniyar.ac.ru/mailman/listinfo/lftp
>>>
>>>
>>> --
>>> Lars Viklund | z...@acc.umu.se
>>> ___
>>> lftp mailing list
>>> lftp@uniyar.ac.ru
>>> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
>>>
>>
>> ___
>> lftp mailing list
>> lftp@uniyar.ac.ru
>> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
>>
>
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] D/L files that are 24hr old?

2016-02-18 Thread Steven Dennis
Hello,

I would like to d/l files and folders from a directory on my web server
that have been put there or modified in the last 24 hours.

I have read the man page and came across the --newer-than option.

"For option --newer-than you can either specify a file or time specification
like that used by *at*(1) command, e.g. `now-7days' or `week ago'. If you
specify a file, then modification time of that file will be used."

Can you tell me if this would be correct?

lftp open -u user,pass sftp://XXX.XXX.XXX.XXX -P mirror -c --newer-than
24hrs /remote/directory/ /local/directory/

Also can you tell me if there are other time parameters that can be used as
well as the "grammar" that should be used when putting this together?

Thanks

Steven
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] Setting up FTPS connection question...

2015-12-01 Thread Steven Dennis
Hello,

I am trying to set up a server with vsftpd and use lftp to move files from
it.  I have been able to make a connection with lftp via SFTP (SSH File
Transfer Protocol) but would like to use FTPS as I think it will be
faster.  I have access to the server and the client but I think I have not
set up something correct.  I have posted a lot of the details here

http://ubuntuforums.org/showthread.php?t=2304605=newpost

When I try to connect I get this


pi@raspberrypi ~/Scratch/MT $ lftplftp :~> debug 5
lftp :~> open ftps://@XX.XX.XX.XX -p21201
Password:
 Resolving host address...
 1 address found: XX.XX.XX.XX
lftp @XX.XX.XX.XX:~> ls
 Connecting to XX.XX.XX.XX (XX.XX.XX.XX) port 21201
 gnutls_handshake: An unexpected TLS packet was received.
ls: Fatal error: gnutls_handshake: An unexpected TLS packet was received.

I have removed the IP and user name.

Can someone help me find what I am doing incorrectly?
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Setting up FTPS connection question...

2015-12-01 Thread Steven Dennis
Thanks so much for the reply.  Would you know how to configure vsftpd to
use encryption from the very beginning?

On Tue, Dec 1, 2015 at 3:00 AM, Alexander V. Lukyanov <l...@netis.ru> wrote:

> On Tue, Dec 01, 2015 at 02:46:16AM -0800, Steven Dennis wrote:
> > lftp :~> open ftps://@XX.XX.XX.XX -p21201
> >  gnutls_handshake: An unexpected TLS packet was received.
> > ls: Fatal error: gnutls_handshake: An unexpected TLS packet was received.
>
> ftps expects the connection to be encrypted from the very beginning. Most
> probably you have set up ftp server so that the connection is plain text.
> Use plain ftp:// and "set ftp:ssl-force yes" to make sure you are using
> encrypted connection.
>
> --
>Alexander.
>
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Setting up FTPS connection question...

2015-12-01 Thread Steven Dennis
Thanks so much. Got a little further but ran into this.

pi@raspberrypi ~ $ lftp
lftp :~> set ftp:ssl-force yes
lftp :~> debug 5
lftp :~> open ftp://@XX.XX.XX.XX -p21201
Password:
 Resolving host address...
 1 address found: 37.48.65.81
lftp @XX.XX.XX.XX:~> ls
 Connecting to XX.XX.XX.XX (XX.XX.XX.XX) port 21201
<--- 500 OOPS: prctl PR_SET_SECCOMP failed
---> FEAT
Interrupt

On Tue, Dec 1, 2015 at 3:00 AM, Alexander V. Lukyanov <l...@netis.ru> wrote:

> On Tue, Dec 01, 2015 at 02:46:16AM -0800, Steven Dennis wrote:
> > lftp :~> open ftps://@XX.XX.XX.XX -p21201
> >  gnutls_handshake: An unexpected TLS packet was received.
> > ls: Fatal error: gnutls_handshake: An unexpected TLS packet was received.
>
> ftps expects the connection to be encrypted from the very beginning. Most
> probably you have set up ftp server so that the connection is plain text.
> Use plain ftp:// and "set ftp:ssl-force yes" to make sure you are using
> encrypted connection.
>
> --
>Alexander.
>
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp