Recovering temporary files

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Recovering temporary files

Javier Figueroa
Experts in spss

A cordial greeting, I have a problem and I think more than once has happened to some of you and is to use the SELECT IF command without prior TEMPORARY. To filter records in my database and inadvertently save the file without having any copies, I would like to know if spss saves temporary files of the database that is modified from time to time. If anyone could help me, I will be very grateful.

Sincerely,

Careless, (Javier Figueroa)

--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

David Marso
Administrator
No.  Once you overwrite the file it is forever modified.
You might want to get into the habit of usingn the FILTER command rather than SELECT IF.

Javier Figueroa wrote
Experts in spss

A cordial greeting, I have a problem and I think more than once has
happened to some of you and is to use the SELECT IF command without prior
TEMPORARY. To filter records in my database and inadvertently save the file
without having any copies, I would like to know if spss saves temporary
files of the database that is modified from time to time. If anyone could
help me, I will be very grateful.

Sincerely,

Careless, (Javier Figueroa)

--

*Javier FigueroaProcesamiento y Análisis de bases de datos*
*Cel: 5927-4748 / 4970-1940*


*Casa: 2289-0184*

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

Jon Peck
In reply to this post by Javier Figueroa
Sorry.  There are no intermediate files that would be of any use.  Your OS, however, might have a backup or generation-retention system that might help.

You might also be interested in a scheme that would save your files with a date stamp as part of the name.  One way to do this would be to use the spssaux2.CreateFileNameWDate function.  For example,
begin program.
import spss, spssaux2

spss.Submit(r"""SAVE OUTFILE="%s".""" % spssaux2.CreateFileNameWDate() )
end program.

This saves the active data file in its current location with a datetime stamp.  Running it right now on employee data.sav, which is in c:\spss24001\samples\english, resulted in
employee data_2017-04-04_15-00.sav
in that directory.

If the active file doesn't already have a path, it can be specified as the argument to the CreateFileNameWDate function.

The date/time stamp is created sortably so if you view the directory contents sorted by name, the versions will be in date/time order.

This bit of code could be easily made into an extension command, say, STATS SAVEDATED, so using it would be just like using SAVE.



On Tue, Apr 4, 2017 at 11:16 AM, Javier Figueroa <[hidden email]> wrote:
Experts in spss

A cordial greeting, I have a problem and I think more than once has happened to some of you and is to use the SELECT IF command without prior TEMPORARY. To filter records in my database and inadvertently save the file without having any copies, I would like to know if spss saves temporary files of the database that is modified from time to time. If anyone could help me, I will be very grateful.

Sincerely,

Careless, (Javier Figueroa)

--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

Art Kendall
In reply to this post by Javier Figueroa
Unfortunately you have shot your self in the foot.

There may some rare circumstance that does not occur to me, when it is okay to write over a file without assurance that you can go back and recreate it.

WRT data analysis: Remember Murphy was an optimist.





Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

Bruce Weaver
Administrator
This post was updated on .
In reply to this post by David Marso
Further to David's point, here is some advice from ftp://public.dhe.ibm.com/software/analytics/spss/documentation/statistics/23.0/en/client/Manuals/IBM_SPSS_Statistics_Core_System_User_Guide.pdf.

Protecting original data

To prevent the accidental modification or deletion of your original data, you can mark the file as read-only.

1. From the Data Editor menus choose:

File > Mark File Read Only

If you make subsequent modifications to the data and then try to save the data file, you can save the data only with a different filename, so the original data are not affected.

You can change the file permissions back to read-write by choosing Mark File Read Write from the File menu.

EDIT:  See also the Protecting the Original Data section in Chapter 2 of http://www.helsinki.fi/~komulain/Tilastokirjat/IBM-SPSS-ProgDataMgmt.pdf.
 

David Marso wrote
No.  Once you overwrite the file it is forever modified.
You might want to get into the habit of usingn the FILTER command rather than SELECT IF.

Javier Figueroa wrote
Experts in spss

A cordial greeting, I have a problem and I think more than once has
happened to some of you and is to use the SELECT IF command without prior
TEMPORARY. To filter records in my database and inadvertently save the file
without having any copies, I would like to know if spss saves temporary
files of the database that is modified from time to time. If anyone could
help me, I will be very grateful.

Sincerely,

Careless, (Javier Figueroa)

--

*Javier FigueroaProcesamiento y Análisis de bases de datos*
*Cel: 5927-4748 / 4970-1940*


*Casa: 2289-0184*

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

Javier Figueroa
Thank you very much for your help. I tell you; I'm doing a validation job and I use the SELECT IF command a lot and I put the TEMPORARY command in front of it. Then ready the records that indicates me with the required conditions, eg.

TEMPORARY.
SELECT IF p12_alguno_de_viajes_con_p = 2 and p29_Excursion_exports = 2 and p10_Ha_realizado_viaje = 1.
LIST Phone number.

Everything was fine, but someone asked me something and in an oversight I moved the mouse and accidentally hit the click just to run and I did not notice the action, then I returned to see my screen and save my file without knowing that I had executed the Instructions without the TEMPORARY command.

It is an accident of those that rarely happen, but they happen and that is why the menu Edit> Options> File Location exists a section of autosave with a time of 10 min. Or which one considers appropriate.

I thank sinmenteamente all his contributions, today I will have to start again my file from 0, had records 3,221 and with the filter I was left with 173, go if it was lost, but it happened to me. A SERIOUS ERROR.

Sincerely,

2017-04-04 15:11 GMT-06:00 Bruce Weaver <[hidden email]>:
Further to David's point, here is some advice from
ftp://public.dhe.ibm.com/software/analytics/spss/documentation/statistics/23.0/en/client/Manuals/IBM_SPSS_Statistics_Core_System_User_Guide.pdf.

*Protecting original data*

To prevent the accidental modification or deletion of your original data,
you can mark the file as read-only.

1. From the Data Editor menus choose:

*File > Mark File Read Only*

If you make subsequent modifications to the data and then try to save the
data file, you can save the data only with a different filename, so the
original data are not affected.

You can change the file permissions back to read-write by choosing *Mark
File Read Write* from the File menu.




David Marso wrote
> No.  Once you overwrite the file it is forever modified.
> You might want to get into the habit of usingn the FILTER command rather
> than SELECT IF.
> Javier Figueroa wrote
>> Experts in spss
>>
>> A cordial greeting, I have a problem and I think more than once has
>> happened to some of you and is to use the SELECT IF command without prior
>> TEMPORARY. To filter records in my database and inadvertently save the
>> file
>> without having any copies, I would like to know if spss saves temporary
>> files of the database that is modified from time to time. If anyone could
>> help me, I will be very grateful.
>>
>> Sincerely,
>>
>> Careless, (Javier Figueroa)
>>
>> --
>>
>> *Javier FigueroaProcesamiento y Análisis de bases de datos*
>> *Cel: 5927-4748 / 4970-1940*
>>
>>
>> *Casa: 2289-0184*
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to

>> LISTSERV@.UGA

>>  (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Recovering-temporary-files-tp5734038p5734042.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

PRogman
From similar bitter experience my scipts nowadays begin with something like:

FILE HANDLE fpData     /NAME='%userprofile%\Documents\Reseach\Project\Data'.
FILE HANDLE fnDataFile /NAME='fpData\Master Data.sav'.

DATASET CLOSE ALL.
GET         FILE = fnDataFile.
PERMISSIONS FILE = fnDataFile /PERMISSIONS READONLY.
*Following 2 lines activated manually and date in name set,*to keep a copy of current file MasterData.
*PERMISSIONS FILE = fnDataFile /PERMISSIONS WRITEABLE.
*SAVE OUTFILE = 'fpData/Master Data 2017-03-31.sav'.
DATASET NAME MasterData WINDOW=FRONT.


I always use MasterData and keeps a copy with a dated name indicating the version.
A command like STATS SAVEDATED would be nice.
/PR

  <quote author="Javier Figueroa">
Thank you very much for your help. I tell you; I'm doing a validation job
and I use the SELECT IF command a lot and I put the TEMPORARY command in
front of it. Then ready the records that indicates me with the required
conditions, eg.

TEMPORARY.
SELECT IF p12_alguno_de_viajes_con_p = 2 and p29_Excursion_exports = 2 and
p10_Ha_realizado_viaje = 1.
LIST Phone number.

Everything was fine, but someone asked me something and in an oversight I
moved the mouse and accidentally hit the click just to run and I did not
notice the action, then I returned to see my screen and save my file
without knowing that I had executed the Instructions without the TEMPORARY
command.

It is an accident of those that rarely happen, but they happen and that is
why the menu Edit> Options> File Location exists a section of autosave with
a time of 10 min. Or which one considers appropriate.

I thank sinmenteamente all his contributions, today I will have to start
again my file from 0, had records 3,221 and with the filter I was left with
173, go if it was lost, but it happened to me. A SERIOUS ERROR.

Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

MLIves
In reply to this post by Javier Figueroa
Javier,
Sounds like you have rerun the file.

As another possibility...

Windows 10 (maybe other versions?) has an option to "Restore previous version" of files.

Just find the file, right click it, select Restore previous version and wait for the computer to find any prior versions.  Select the version you wish to restore (view details to see dates and times), and click Restore.


Melissa Ives
DMHAS Research Division
410 Capitol Ave., MS#14RSD
Hartford, CT 06106
860-418-6729 (phone)
860-418-6692 (fax)
860-778-5445 (cell)
________________________________
From: SPSSX(r) Discussion <[hidden email]> on behalf of Javier Figueroa <[hidden email]>
Sent: Tuesday, April 4, 2017 1:16 PM
To: [hidden email]
Subject: [SPSSX-L] Recovering temporary files

Experts in spss

A cordial greeting, I have a problem and I think more than once has happened to some of you and is to use the SELECT IF command without prior TEMPORARY. To filter records in my database and inadvertently save the file without having any copies, I would like to know if spss saves temporary files of the database that is modified from time to time. If anyone could help me, I will be very grateful.

Sincerely,

Careless, (Javier Figueroa)

--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

===================== To manage your subscription to SPSSX-L, send a message to [hidden email]<mailto:[hidden email]> (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

________________________________

This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

Rick Oliver
I think the Windows restore feature might be contingent on having set up an automatic backup with the built-in Windows backup utility.

There is similar built-in backup functionality on Mac OS.

In any event, if you need to keep the original file in it's original state, the safest way is to make the original file read-only. You can even do this from SPSS Statistics: File menu, Mark File Read Only.


On Mon, Apr 10, 2017 at 1:16 PM, Ives, Melissa L <[hidden email]> wrote:
Javier,
Sounds like you have rerun the file.

As another possibility...

Windows 10 (maybe other versions?) has an option to "Restore previous version" of files.

Just find the file, right click it, select Restore previous version and wait for the computer to find any prior versions.  Select the version you wish to restore (view details to see dates and times), and click Restore.


Melissa Ives
DMHAS Research Division
410 Capitol Ave., MS#14RSD
Hartford, CT 06106
<a href="tel:860-418-6729" value="+18604186729">860-418-6729 (phone)
<a href="tel:860-418-6692" value="+18604186692">860-418-6692 (fax)
<a href="tel:860-778-5445" value="+18607785445">860-778-5445 (cell)
________________________________
From: SPSSX(r) Discussion <[hidden email]> on behalf of Javier Figueroa <[hidden email]>
Sent: Tuesday, April 4, 2017 1:16 PM
To: [hidden email]
Subject: [SPSSX-L] Recovering temporary files

Experts in spss

A cordial greeting, I have a problem and I think more than once has happened to some of you and is to use the SELECT IF command without prior TEMPORARY. To filter records in my database and inadvertently save the file without having any copies, I would like to know if spss saves temporary files of the database that is modified from time to time. If anyone could help me, I will be very grateful.

Sincerely,

Careless, (Javier Figueroa)

--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

===================== To manage your subscription to SPSSX-L, send a message to [hidden email]<mailto:[hidden email]> (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

________________________________

This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

Rich Ulrich

Do people still hold to the old tenets of database backing-up, from the main-frame days?

Even in modified form?  Make backups, and keep them in multiple locations ...


I was pleased that my computer center did weekly backups of everything.  Even when I

moved to PC for many analyses, I was doing a few other analyses on the mainframe (VAX)

so I had my final files in two places by virtue of necessity.  But I remember that the Pitt

Computer center respected the full prescription:  They kept a useful backup on-site, and

another (less-frequent) backup of everything at a remote site, safe (even) from fire or

natural catastrophe.


As it gets easier and faster to save your own data, moving from floppy disks to CDs to

thumb drives, all the hardware is also getting more reliable -- In my case, the "reliability"

probably out-weighs the ease, and backups are getting further apart.  But I don't have

vital data these days, either.  Is "the cloud"  used by many people? - for data, or for backup?


--
Rich Ulrich
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Recovering temporary files

John F Hall

Rich

 

Those of us who remember mainframes (CDC 2000 at LSE, Dec-10 and Vax cluster at PNL) learned the hard way to keep three copies of everything in rotation.  I lost a lot of data at PNL because it was seen as a teaching institution and some good student run surveys were lost during routine “spring cleaning“ until I sussed out what was going on.  When I retired an alert operator gave me seven 2,000ft mag tapes which she’d created for me as a personal back-up.  These spent a couple of years languishing in the UK Data Archive at Essex University before it transpired they no longer had a Dec-10, when they returned them together with two CDs to which everything had been copied. 

 

Before I could get SPSS for Windows on a PC, and because my exiting PC was DOS based, I’d had to borrow a Windows machine and learn Windows first.  See: http://surveyresearch.weebly.com/old-dog-old-tricks-using-spss-syntax-to-beat-the-mouse-trap.html   Of course, SPSS couldn’t read any of my old *.sys files or many of the others until I realised that they had edition numbers tagged on to the extensions.  When I changed all the *.sys to *.sav and got rid of the edition numbers, everything worked fine.  Some data are still on 5” floppies, some on 3½ but few PCs have these any more.  Essex are only interested in “big data” so I am the only repository for some smaller surveys, for which I been unable to track down the original researchers or to obtain permission to deposit, but Edinburgh have recently taken one off my hands: hopefully they will eventually take more.

 

Nowadays I always save SPSS files with matching names for *.sps and *.sav files (sometimes *.spv as well) each edition being numbered or lettered in sequence.  Files are also backed up to at least one external drive, sometimes two.  Most of the stuff I work on these days goes to the UKDS archive at Essex as well, so that’s a fall-back if necessary.

 

Just got a new PC (Lenovo ThinkCentre E73 desktop (64-bit, Win7Pro win8.1 pro, Core i7 - 4790s 8GB 1TB C: drive, DVDRW with additional Kingston 8GB DDR3 1600 Mhz 1.5V Non-ECC DIMM memory, Office 2016, giving 16gb RAM in total.) which keeps offering me cloud storage, but I’m a bit of a Luddite and prefer to keep stuff where I can see it.  It has taken me three weeks to get SPSS 24 on the new machine, but I succeeded at last this morning. 

 

Copied to Research Data Management list as it is relevant to their concerns.

 

John F Hall (Mr)

[Retired academic survey researcher]

 

Email:   [hidden email] 

Website: www.surveyresearch.weebly.com

SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop

 

PS  Outlook 2016 is a nightmare, so I’m still using Outlook 2013 on the old machine.

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Rich Ulrich
Sent: 11 April 2017 00:09
To: [hidden email]
Subject: Re: Recovering temporary files

 

Do people still hold to the old tenets of database backing-up, from the main-frame days?

Even in modified form?  Make backups, and keep them in multiple locations ...

 

I was pleased that my computer center did weekly backups of everything.  Even when I

moved to PC for many analyses, I was doing a few other analyses on the mainframe (VAX)

so I had my final files in two places by virtue of necessity.  But I remember that the Pitt

Computer center respected the full prescription:  They kept a useful backup on-site, and

another (less-frequent) backup of everything at a remote site, safe (even) from fire or

natural catastrophe.

 

As it gets easier and faster to save your own data, moving from floppy disks to CDs to

thumb drives, all the hardware is also getting more reliable -- In my case, the "reliability"

probably out-weighs the ease, and backups are getting further apart.  But I don't have

vital data these days, either.  Is "the cloud"  used by many people? - for data, or for backup?


--
Rich Ulrich

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD