Re: [Off] Remote backup

2017-09-11 Thread Ronald Rosell via 4D_Tech
Thanks for the suggestion Jeff!

I looked into this, and it’s a bit of overkill for our situation (I’ll explain 
why) and I have come up with an approach that works for us, which I’ll describe 
below for those who are interested.

First, regarding the overkill, the main thing that’s being circumvented by 
using a mirror backup is the nightly brief pause while a full backup is done.  
Instead, the mirror setup involves sending log files every few minutes to the 
mirror server, which get integrated into that running database. Then the log is 
tossed and a new log is created, sent, and so on. So you end up with a fully 
replicated, running database (lagging only by the interval you’ve set for the 
journal files) which can be further backed up to the cloud by enabling full 
backups on the mirror site.

The nightly pause to do a full backup on our main server isn’t a big issue for 
us;  the three distinct databases on this server are mostly used during working 
hours.  One system, used for corporate training, is often used late at night 
but a lot of the time people are logged in they’re watching 30-minute long 
videos, so having database transactions pause for 20 seconds or so in the 
middle of the night is unlikely to be noticed even by people who are online.  

Also, the mirror-via-new-journals setup only works with 4D Server;  we’re 
running web licenses on regular 4D installs, and all user access is via 
browsers.  (You’ll never see me post on here about glitches in list boxes, etc. 
but I do write a lot of Javascript for the interface.)  We would need to be 
running at least two 4D Server licenses to do this, including a “running” 
instance on the backup site.

The problem I was running into yesterday, and the approach I’ve taken to get 
around it, is that cloud backup services (I tried a few) will copy the .journal 
log file during a scheduled backup but will ignore that file if you implement a 
Continuous Data Protection (CDP) plan.  So, the log file wasn't getting backed 
up remotely throughout the day.  The solution in our case involved creating a 
script that does the following (you can do this with shell scripts, Python, 
etc. … we took advantage of Automator since we’re running on MacOS):

1) Every ten minutes, our script duplicates the log file.  So, if your db is 
called mydatabase, you end up with something like mydatabase copy.journal 
alongside mydatabase.journal
2) The script then renames the duplicate Log file, changing the .journal to 
.txt.  That gives you mydatabase copy.txt.  That’s the secret to tricking the 
backup software into not seeing this as a temporary system file.
3) To keep from having lots of copies of the log stored locally, the script 
moves mydatabase copy.txt to a separate folder that’s being monitored for CDP, 
overwriting any previous version of mydatabase copy.txt that’s in there.  (We 
could also have left it in the main backup folder, and simply deleted the old 
mydatabase copy.txt before creating the new log duplicate.)
4) The CDP happily notices the .txt file and immediately uploads it to the 
remote storage site.   The service we’re using keeps multiple versions of files 
with the same name (mydatabase copy.txt) for 30 days, although we should only 
need the latest one, since it represents a full log since the last full backup.
5) Full backups take place around 3 AM Eastern time, and those are moved to the 
remote server right away.

The above is done for all three databases.

All static files (web pages, SSL certs, etc.) are replicated in advance on the 
remote disaster recovery server; we’re actually doing this in a partition on 
one of our video servers, which are mostly used to run Wowza video software. In 
the event that our main server goes offline for any extended period (i.e. 
hurricane, earthquake, etc.) all we need to do is fire up 4D instances on the 
disaster recovery system, input our licenses, and download the last full backup 
and last log from the remote backup.  Restore, integrate, and voila we’re back 
online.  

There are several domain names pointing to our IP (beyond the three distinct 
systems, different training customers like to have “vanity” URLs).  We only 
control the DNS for some of them.  For now, we recommend to our customers that 
when a hurricane is anticipated they shorten the time-to-live on their DNS 
records to 5 minutes;  that way, if we have to change IPs the effects will be 
picked up at the DNS level almost immediately.  I’m looking into whether 
there’s a way to do that part centrally, so that traffic to our IP is 
automatically rerouted to the backup site without changing individual DNS 
entries.

Ron
__

Ron Rosell
President
StreamLMS



> On Sep 11, 2017, at 7:26 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> You should look into setting up a mirror backup. You could write code to 
> create a new journal file every 10 minutes (one line of code, not counting 
> the scheduling loop), and then a 

Re: v12 server - can not connect

2017-09-11 Thread Randy Jaynes via 4D_Tech
Firewall?

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com  • 845.687.3741 • PrintPoint, Inc 
• 57 Ludlow Lane • Palisades, NY 10964 





> On Sep 11, 2017, at 11:44 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com 
> > wrote:
> 
> I am trying to move an older v12 database from one Mac to another
> The current mac is running 10.9.5, and v12.6 server - everything is 
> fine.
> 
> I am setting up a new server to handle the lab's file sharing needs 
> (old file server is a G5)
> The new Mac is running 10.9.5 Server. I have the v12 database copied, 
> and the server application starts.
> It claims to be running.
> 
> I attempt to connect from another Mac (10.9.5 OS), from which I have 
> connected to the old v12 database in the past. Up on connecting to the 
> new v12 server, I get connection has been disrupted or the connection 
> could not be established. Error -10002
> 
> Any clues?
> Thanks
> Chip
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html 
> Archive:  http://lists.4d.com/archives.html 
> 
> Options: http://lists.4d.com/mailman/options/4d_tech 
> 
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
> 
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Server Process "Frozen"-ish

2017-09-11 Thread Cannon Smith via 4D_Tech
Old network layer on the Windows platform. That’s where most of it is 
happening. There is about 35 servers involved.

New network layer on the Mac platform (different product). Just one server—it’s 
just an in house database.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On Sep 10, 2017, at 11:34 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> New network layer on both platforms?

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [Off] Remote backup

2017-09-11 Thread Jeffrey Kain via 4D_Tech
You should look into setting up a mirror backup. You could write code to create 
a new journal file every 10 minutes (one line of code, not counting the 
scheduling loop), and then a (.bat/python/vba) script to transfer that journal 
file to the mirror server. On the mirror, integrate the journal and then copy 
it to a journal archive folder, which gets backed up safely to a remote site, 
Amazon S3, wherever.

Schedule a nightly 4D backup to run on the mirror, and ship it off site as 
well, and you'll be able to completely recover to within 10 minutes of the 
disaster, even if your entire data center gets destroyed.

Jeff

--
Jeffrey Kain
jeffrey.k...@gmail.com




> On Sep 10, 2017, at 3:28 PM, Ronald Rosell via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Ideally we’d like the log files to be backed up remotely far more frequently 
> than the once-a-day full backups.  Every ten minutes should do it.  That way, 
> in the event of a catastrophic failure we could use the previous night’s 
> backup and the log file to reconstruct almost all of our data (up to the 
> 10-minute window).  

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

[Off] Remote backup

2017-09-11 Thread Ronald Rosell via 4D_Tech
Hi all,

I’m looking for ways to improve my off-site backup strategy and was wondering 
if any of you found an online service that reliably backs up the log (.journal) 
file on a high-frequency basis … without disrupting that file.

We have several servers (Macs) in two colocation data centers … one of which is 
in Florida, so you can imagine what’s on my mind.  Historically I’ve been using 
iBackup / iDrive to move our full backups and log files every night to "the 
cloud” (you know, where computers and angels live).  We also have local 
redundancy in the data centers (external RAID 1, or mirrored, arrays for the 
running database, with backups and the current log file on another drive that’s 
not part of the RAID array).  That protects us against the most common 
problems:  1) individual hard drive failure, 2) server failure, or 3) even 
failure of the RAID system.  We can quickly recover from all three of those.  
Catastrophic failure of the data center is the one thing that local backups 
don’t help with.  These data centers are telco bunkers that won’t blow away in 
a storm, but they could go offline for an extended period, hence the remote 
backups.

Ideally we’d like the log files to be backed up remotely far more frequently 
than the once-a-day full backups.  Every ten minutes should do it.  That way, 
in the event of a catastrophic failure we could use the previous night’s backup 
and the log file to reconstruct almost all of our data (up to the 10-minute 
window).   

I’ve tried iDrive’s “Continuous Data Protection” service, but it’s not working 
for this file and so far they can’t explain why.  I also tried Google’s new 
Backup & Sync app to sync the file to Google Drive, but similarly it’s not 
working; it doesn’t recognize the file as changing.  I suspect this is because 
these services may be relying upon the Finder’s modification date & time, which 
is also not updating as the system writes to the log (and the file grows).  
Haven’t tried iCloud for this yet, but that’s next.  

Has anyone come up with a mechanism for high-frequency remote backups of the 
logs that a) works and b) doesn’t somehow disrupt the log’s ability to receive 
new entries from the running database?
__

Ron Rosell
President
StreamLMS

301-3537 Oak Street
Vancouver, BC V6H 2M1
Canada

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [OFF] PCI/DSS compliance

2017-09-11 Thread Chip Scheide via 4D_Tech
FREEZE your credit at all credit reporting agencies!

> On Sep 8, 2017, at 4:23 PM,Chip Scheide wrote:
> 
>> I find the idea that it is necessary to implement PCI ironic, when 
>> Equifax just lost the SS numbers, and other personal data of over 
>> 140,000,000 people.
> 
> I checked the website they published and it says my information was 
> stolen. So now I have to wait until 9/12/17 and then go back to the 
> website and enroll in their free identity theft coverage. 
> 
> The company that reports how good your credit is will now be the one 
> that destroys your credit rating. And there’s nothing you can do 
> about it. Isn’t this nice. 
> 
> Tim
> 
> 
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.com
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

Hell is other people 
 Jean-Paul Sartre
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: OBJECT get variable type

2017-09-11 Thread Chip Scheide via 4D_Tech
maybe -
ON BEFORE KEYSTROKE
test the current entered length vs expected/desired maximum (255, 4000 
etc)


On Mon, 11 Sep 2017 20:30:21 +1000, David Adams via 4D_Tech wrote:
>> Tested with v16R4. Unfortunately this does not work nicely.
> 
> No idea who thought this one up, but it wasn't me. I've seen and heard
> plenty of 4D developers who keep a table with fields of various lengths. In
> your case, an alpha 255 and a text field. Then, you use that field on your
> form and 4D automatically controls the maximum length for you with zero
> coding. For that matter, you could test what the object is, find it's a
> field, get it's type and length. I think.
> 
> The idea is not that you save the field data - the table ends up with zero
> records. It's just using a field as a temporary container instead of using
> a variable as a temporary container.
> 
> Maybe that's enough for you if all you're needing to distinguish is 255 and
> text? It obviously does not automatically trim your text fields at 4,000
> characters.
> 
> What would be very nice indeed is if 4D could add a custom dictionary to
> every object (Cannon Smith put in an excellent feature request about
> this...it was popular) and for every structure object, like a field (Jeff
> Kain applied Cannon's idea to structure objects and started another popular
> feature request.)
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Server Process "Frozen"-ish

2017-09-11 Thread Dani Beaubien via 4D_Tech
Hi, 

We have run into issues where the server is running on windows 64bit and it is 
producing PDFs using PDF Creator directly. Our solution was to move away from 
doing that and using php and FPDF to create the PDFs instead.

Dani


> On Sep 11, 2017, at 12:43 AM, Bernd Fröhlich via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Cannon Smith:
> 
>> I’ve seen something odd since upgrading our customers to v16.1 a few months 
>> ago. This is on 64-bit server, both platforms. There are a few background 
>> processes that continually run on the servers, waking up every few seconds 
>> to see if there is work to be done. This has worked without problem for a 
>> decade now, but starting with v16.1 we occasionally have a process the just 
>> sort of quits.
>> 
>> By occasionally, I mean maybe once in 2-3 months per server. Little enough 
>> that I didn’t pay much attention at first—just relaunched the server. But 
>> cumulatively (across all servers) it has happened probably 20-30 times in 
>> the last few months.
>> 
>> By the process sort of quitting, I mean that the tasks it is supposed to 
>> take care of just stop getting taken care of. The activity monitor shows the 
>> process is still there and nothing I have noticed seems out of the ordinary. 
>> It’s like the code just quit executing in that process.
>> 
>> I know I need to get more detailed information and will start trying to do 
>> that, but wonder if anyone has experienced anything similar that might give 
>> me a starting place to look?
> 
> 
> Same here. 4D V16.1 32 Bit on OS X 10.11.6.
> A background process does some reporting, sends and receives mails, etc.
> Every once in a while it just stops. No idea why. At least I am not the only 
> one.
> Now we just have to find what is common on all our servers...
> 
> Greetings from Germany,
> Bernd Fröhlich
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: OBJECT get variable type

2017-09-11 Thread David Adams via 4D_Tech
> Tested with v16R4. Unfortunately this does not work nicely.

No idea who thought this one up, but it wasn't me. I've seen and heard
plenty of 4D developers who keep a table with fields of various lengths. In
your case, an alpha 255 and a text field. Then, you use that field on your
form and 4D automatically controls the maximum length for you with zero
coding. For that matter, you could test what the object is, find it's a
field, get it's type and length. I think.

The idea is not that you save the field data - the table ends up with zero
records. It's just using a field as a temporary container instead of using
a variable as a temporary container.

Maybe that's enough for you if all you're needing to distinguish is 255 and
text? It obviously does not automatically trim your text fields at 4,000
characters.

What would be very nice indeed is if 4D could add a custom dictionary to
every object (Cannon Smith put in an excellent feature request about
this...it was popular) and for every structure object, like a field (Jeff
Kain applied Cannon's idea to structure objects and started another popular
feature request.)
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: OBJECT get variable type

2017-09-11 Thread Keisuke Miyako via 4D_Tech
thank you for sharing.

to be honest,
I have never used the "filter" feature since it is not compatible with Japanese 
by design (we don't use a keyboard with 10,000 keys, so before/after keystroke 
doesn't make sense).

I was hopeful it might work with filtering ASCII by length,
well, apparently not.

> 2017/09/11 18:54、Koen Van Hooreweghe via 4D_Tech <4d_tech@lists.4d.com> のメール:
> Tested with v16R4. Unfortunately this does not work nicely.




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: OBJECT get variable type

2017-09-11 Thread Koen Van Hooreweghe via 4D_Tech
Hi Keisuke,

Tested with v16R4. Unfortunately this does not work nicely.
The entry is indeed limited to the number of chars given. But…
1. when continuously typing, the cursor wraps around from the last char to the 
first and the already entered text is overwritten
2. you cannot select more than 1 character

A new property for a string or text object limiting the number of entered 
characters (like on an alpha field) would indeed be nice to have.
Just like numeric variable objects where you can enter a minimum and maximum 
value.

@Piotr: can you report this in the 4D forum as feature request? So I can vote.

Kind regards,
Koen

> Op 11 sep. 2017, om 11:25 heeft Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> het volgende geschreven:
> 
> OBJECT SET FILTER(*;"__object_name_here";"! &@"+("#"*$maxlen))




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: OBJECT get variable type

2017-09-11 Thread Keisuke Miyako via 4D_Tech
you can set a (rather simplistic) length limit to a variable by code.

OBJECT SET FILTER(*;"__object_name_here";"! &@"+("#"*$maxlen))

http://doc.4d.com/4Dv15/4D/15.4/OBJECT-SET-FILTER.301-3273846.en.html
http://doc.4d.com/4Dv15/4D/15.4/Filter-and-format-codes.300-3285353.en.html

but I still don't understand how knowing the variable type would help.
you would have gotten "text" whether the definition on the Oracle side was 255, 
4000.

> 2017/09/11 16:13、Piotr Chabot Stadhouders  のメール:
> When I know the "subtype", I can then handle typing in the "On before 
> keystroke"
> Off course setting a max length field as property for an object would be the 
> ideal world.



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: OBJECT get variable type

2017-09-11 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

Thank you for clarifying this.

My reason for asking is this :
We are using 4D for OCI to interact with an Oracle database
In our tables we have text columns (VARCHAR2) with length 255, text columns 
with length 4000 and CLOBs
I was hoping that I could use the variable type property to determine if I am 
dealing with a 255 or 4000 variable for example so I can prevent the user from 
typing more characters than possible for the corresponding column

I know I can solve this with object naming for example "my_text_field", 
"my_string_field" but I was thinking of another way
When I know the "subtype", I can then handle typing in the "On before keystroke"

Off course setting a max length field as property for an object would be the 
ideal world.

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako [mailto:keisuke.miy...@4d.com]
> Verzonden: zaterdag 9 september 2017 2:18
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: OBJECT get variable type
> 
> Hello,
> 
> the variable type property serves two purposes:
> 
> to filter the display in the property list, and to declare the data source
> variable type in case no variable name is defined.
> 
> otherwise, you only need to know OBJECT Get type which is constant for the
> object, and OBJECT Get pointer which tells you the type of the current bound
> variable.
> 
> notice the term "current".
> 
> the bound variable can change at runtime (see OBJECT SET DATA SOURCE),
> so the initial "variable type" has no real value in code.
> 
> > 2017/09/09 3:18、Piotr Chabot Stadhouders via 4D_Tech
> > <4d_tech@lists.4d.com> のメール:
> >
> > How can I get the value of this property?
> > I can retrieve the type of the attached variable, but how can I get the
> "Variable Type" property?
> 
> 
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Server Process "Frozen"-ish

2017-09-11 Thread Bernd Fröhlich via 4D_Tech
Cannon Smith:

> I’ve seen something odd since upgrading our customers to v16.1 a few months 
> ago. This is on 64-bit server, both platforms. There are a few background 
> processes that continually run on the servers, waking up every few seconds to 
> see if there is work to be done. This has worked without problem for a decade 
> now, but starting with v16.1 we occasionally have a process the just sort of 
> quits.
> 
> By occasionally, I mean maybe once in 2-3 months per server. Little enough 
> that I didn’t pay much attention at first—just relaunched the server. But 
> cumulatively (across all servers) it has happened probably 20-30 times in the 
> last few months.
> 
> By the process sort of quitting, I mean that the tasks it is supposed to take 
> care of just stop getting taken care of. The activity monitor shows the 
> process is still there and nothing I have noticed seems out of the ordinary. 
> It’s like the code just quit executing in that process.
> 
> I know I need to get more detailed information and will start trying to do 
> that, but wonder if anyone has experienced anything similar that might give 
> me a starting place to look?


Same here. 4D V16.1 32 Bit on OS X 10.11.6.
A background process does some reporting, sends and receives mails, etc.
Every once in a while it just stops. No idea why. At least I am not the only 
one.
Now we just have to find what is common on all our servers...

Greetings from Germany,
Bernd Fröhlich
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**