BookmarkSubscribeRSS Feed
paulinalawson
Obsidian | Level 7
Hi,

 

One of our user accidentally overwrote the original dataset. Could anyone please tell me how to recover previous version of the dataset?

 

I appreciate the help.

 

Regards,

Paulina

9 REPLIES 9
Reeza
Super User

Are you on Windows or Unix? SAS Server? If its windows and on a local drive and you have versioning set up, go to the parent folder, click properties, see previous versions - may have to a wait a few minutes for it to populate (literally a few minutes). 

 

paulinalawson
Obsidian | Level 7

SAS Server is on Windows. Under Previous Versions it says "There are no previous versions available". 

 

I see that Shadow Copies of Shared Folders to make Previous Versions available is not enabled and configured on the file server.

Reeza
Super User

:'( then its bye bye unless you can get a backup copy from a nightly/weekly backup. That's usually time intensive/$$.

SASKiwi
PROC Star

If this dataset was stored in a server folder, check with your IT folks regarding server backups, and whether you can get the dataset restored from backup. If this was stored on a PC then it is unlikely to be backed up anywhere and SAS does not do backups itself.

paulinalawson
Obsidian | Level 7

Dataset has been stored on server folder.

paulinalawson
Obsidian | Level 7

Hi,

 

One of our user accidentally overwrote the original dataset. Could anyone please tell me how to recover previous version of the dataset?

 

I appreciate the help.

 

Regards,

Paulina

nayakig
Obsidian | Level 7
Not sure how you can do that in SAS, but restore-backup team in your company should be able to recover that for you ! you just need to tell them the date and time that you want the dataset or any file for that matter..! for example if your friend over write the dataset on 12 today, you ask them to restore the same dataset from 11.59 or before..!


ballardw
Super User

@paulinalawson wrote:

Hi,

 

One of our user accidentally overwrote the original dataset. Could anyone please tell me how to recover previous version of the dataset?

 

I appreciate the help.

 

Regards,

Paulina


If you do not have a backup (after checking with your IT staff) then how was the data set created initially? If it was read from another data source did you keep that program and source file? If so, rerun that code (and any cleaning/modification step up do but not the code which destroyed.

Now, go back through all of your code and change all the instances of

 

Data olddataset;

   set olddataset;

 

to something like

Data newerdataset;

    set olddataset;

 

to prevent this.

 

And beat all the programmers/users that use that old/old syntax with wet spaghetti noodles until they promise to stop.

It might not hurt to bill the time/effort cost to the offending persons project budget as a lesson if possible.

Kurt_Bremser
Super User

@paulinalawson wrote:
Hi,

 

One of our user accidentally overwrote the original dataset. Could anyone please tell me how to recover previous version of the dataset?

 

I appreciate the help.

 

Regards,

Paulina


Very easy. Restore from your backup.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 16616 views
  • 2 likes
  • 6 in conversation