SAP Backup: What You Need to Back Up Yourself
In an SAP system, there are two types of backups, and they are often confused. The administrator backs up the system. You are responsible for backing up what you have created within it.
In short: The operator’s database backup protects against system failure, not against a deleted program or a misconfigured setting. You can retrieve your own objects in four ways: abapGit for the code, transport requests for development and Customizing, the source code download for a quick snapshot, and SE16N for table contents. The mapping table below specifies what is included in each case and what is not.
Something just went missing
What can still be saved depends on what has been lost and what you do in the next few minutes. Almost no one knows the most common way to save it.
About Emergency AidI want to take preventive measures
The most common types of loss and the assignment table: which items are secured with which tools, and where the typical gaps are.
As usually happensEmergency Aid
Something's missing. What now?
First, the most important rule: do not continue working, do not save again, and do not activate. Every time you save, the source code in the system is overwritten. As long as you don't make any further changes, most of your options for recovery will remain open.
ABAP code has been overwritten or deleted
- Do not continue working, do not save again, and do not activate. Each time you save, the source code in the system is overwritten.
- If you've only saved your work and haven't activated it yet, you can still view and restore the most recent active version in the editor. This is the workaround that works most often—and that hardly anyone knows about.
- Open Version Management: In the Editor, go to Tools, Versions, Version Management. It is important to know when a version is actually created: when a transport request containing the object is released, and when you save a version in the Editor itself. No version is created when you save or activate the object. If your object has never been part of a released transport request—for example, because it is stored as a local object in $TMP—Version Management will be empty.
- If the object is completely gone, check the released transport requests. Once a request has been released, it contains the status it had at that time. To recover a deleted program, recreate it with the exact same name and then drag the old version into it.
- If a Git repository exists, retrieve the latest commit.
- Only if none of that works should you consider using the provider's backup—and that's only possible if the system belongs solely to you.
- Next, open the TADIR table in SE16N and filter the DEVCLASS field using the pattern $*. This will show you all local packages, not just $TMP, because any package that starts with a $ is local. Anything listed there will be deleted during the next system change unless you assign it to a transportable package beforehand.
Customizing settings were changed
- First, check whether logging took place at all. Table logging only takes effect if the rec/client parameter is enabled in the system profile and the table in question is marked as requiring logging. The default value for rec/client is OFF, and it is often set to OFF in test and training systems as well. It cannot be enabled retroactively.
- If logging is running, analyze it using transaction SCU3. There, you can view the old and new values and manually reset the setting—which is usually faster than any restore.
- If there is a previously released Customizing request, its data file contains the data as it was at that time. An open request is of no help: It contains only the keys of the entries; the values themselves are not read from the table until the request is released—that is, in their current, already updated state.
- If neither of these helps, try comparing it to another client where the settings are still correct.
Table contents or master data are missing
- Check whether an export exists, either in SE16N or using a custom report.
- For master data, it is often helpful to rebuild it using the Migration Cockpit or LSMW from an old list.
- Transaction data cannot be retrieved; it must be re-entered. With test data, this is usually faster than any recovery process.
The entire system or client is no longer usable
- Notify the operator, including the time and what happened most recently.
- As long as the cause remains unclear, do not make any further changes to the system.
- Restoring from the backup is the operator's responsibility. In a shared system, this affects all clients and is therefore performed only in the event of an actual failure.
These steps apply regardless of who hosts your system. Only the last step—restoring from a backup—depends on the provider and the type of system.
The most common case
How Developments Are Actually Lost
This isn't an isolated case, but rather a pattern that keeps recurring in forums and projects:
Someone spends weeks building reports and utilities in a test system. When creating them, the system asks for a package. Selecting “Local Object” is one click faster, and you can always clean things up later. Everything works fine—for weeks.
Then the system is reinstalled, the client is overwritten, or the “ Access ” expires. Everything that was stored as a local object is gone—not because something broke, but because it was never included in a transport request and therefore could never leave the system.
The tricky part is that you don't notice the loss until it's too late. Until then, there's no error message and no indication of a problem—on the contrary, everything seems to be running smoothly.
What Brings Clarity in Five Minutes
In SE16N, open the TADIR table and filter the DEVCLASS field using the pattern $* and your username in the AUTHOR field. It is important to use this pattern instead of $TMP: Any package whose name begins with a $ is local and cannot be transported. Whatever is listed there will be lost the next time the system is changed.
Two things to keep in mind so you don’t lull yourself into a false sense of security. AUTHOR is the person responsible for the object directory entry—not necessarily the investor—so be sure to check without this filter as well; otherwise, you’ll miss objects that a colleague created for you. And a Z-package without a transport layer is just as untransportable as $TMP, but it doesn’t appear when this filter is applied. You can check this in SE21 or in the Object Navigator.
Next, use the Object Navigator to assign the items you want to keep to a transportable package and add them to a job. This takes just a moment per object and is the most effective single action on this entire page.
The Assignment
What You've Built and How You Secure It
This table is the core of the page. The left column lists what can be generated in an SAP system, and the right column lists the tool you can use to extract it from the system. Switch between the summary view for a quick overview and the detailed explanation.
| What You've Built | How to back it up |
|---|---|
| ABAP Code: Programs, Classes, Function Modules | abapGit or Workbench JobabapGit writes your objects as files to a Git repository. Alternatively, you can place them in a Workbench job and have the transport files exported. |
| CDS Views, Fiori Development | CDS and code; for Fiori, additional Customizing for the LaunchpadCDS views, such as ABAP code: abapGit or Workbench job. They are edited in Eclipse using the ABAP Development Tools, but are still stored in the system. Fiori is divided into two parts: The app resides in the repository as a BSP application and is included in the Workbench job, whereas the Launchpad content—that is, catalogs, groups, tiles, and target mappings—is client-specific and belongs in a Customizing job. If you back up the app and forget the Launchpad content, you’ll end up with an app without tiles after rebuilding it. |
| Tables, Structures, Data Elements | Definition is added automatically; content is added only indirectlyThe definition is automatically included in the Workbench request, but the rows within it are not. You can still get the content into a request: either add an entry “R3TR TABU” manually in the request’s object list, specifying the table name and keys, or create the table as a Customizing table (delivery class C with standard records); the system will then automatically write the entries to a Customizing request when you maintain it via SM30. For large data sets, exporting remains the better option. |
| Content of Your Own Z-Tables | SE16N ExportOpen SE16N and export the list as a file. If you need to do this regularly, write a small report using GUI_DOWNLOAD and add it to a transport request yourself. |
| Customizing: Organizational Structure, Document Types, Pricing | Customizing RequestWhen saving in SPRO, the system prompts you for a Customizing request. Approve this request and have it exported; the setting will then be saved. |
| Roles and Permission Profiles | Transport Order from PFCGPlace it in a transport request from the role maintenance screen. The role itself is transferred in its entirety along with it. |
| Who Plays What Role | Not included in the transport by default; list via SUIMBy default, the assignment of users to roles is excluded from the transport. When transporting roles from PFCG, you can explicitly include this assignment; however, in the target system, the entire assignment for that role will be replaced, and whether it is imported at all is determined by the USER_REL_IMPORT flag in the PRGN_CUST table. To create a backup, the list is the easier option: evaluate it in SUIM or export the AGR_USERS table using SE16N. |
| Master Data: Material, Customer, Supplier, Business Partner | SE16N Export, Return via Migration CockpitExport using SE16N. You cannot import the data back into the system by importing the file; instead, you must use the Migration Cockpit or LSMW. |
| Transaction Data: Documents, Orders, Postings | Export for Reference OnlyAn export is for reference purposes only; it does not restore data. Entries are recreated by posting them, either manually or via script-driven transactions. |
| Number Ranges | Transport only via intervals; meter readings are always out of dateUse only the system’s own transport function, and proceed with caution. Intervals are not automatically recorded in a request during maintenance; instead, you must use the “Transport Intervals” function in SNRO or SNUM. During import, the system first deletes all existing intervals for this number range object in the target system and replaces them with the transported ones. The number counts are carried over with the values they had at the time of export, so they are out of date in the target system. Be sure to read the current count from SNRO beforehand and update it manually afterward; otherwise, you’ll run into duplicate errors. |
| Report Variants | Report RSTRANSPUsing the RSTRANSP report, or in the Editor via variant maintenance and the "Transport Request" menu option. Important: This applies only to programs with a transportable package; it does not work for local objects. |
| SAP Queries, InfoSets, User Groups | Global in the Workbench job, standard scope via RSAQR3TRIt depends on the work area you see in SQ02 under Environment, Query Areas. In the global area, the objects are cross-client, are assigned a package, and are included in a normal Workbench job. In the standard scope—the default setting—they are client-specific and run via report RSAQR3TR, in the order: user group, InfoSet, query. Variants and layouts are processed separately in both cases. |
The three points that most often come as a surprise: The contents of a standard Z-table are not automatically included in the transport; user-to-role mappings are included only if you explicitly check the corresponding box; and counter readings from number ranges always arrive in the target system as outdated.
The dividing line
What the operator covers and what it does not
Everything in the table above is your responsibility. At the system level below that, the operator's responsibility begins, regardless of whether the system is located in your own data center or is leased.
| What | How and by whom |
|---|---|
| The database containing all of the system's clients | Database backup performed by the operator. With IDES24, this is done daily, with a retention period of 14 days. |
| A complete client as a copy | Client copy created by the operator. On a shared system, this cannot be done on demand because it affects other clients. |
| System Parameters, Authentication Rules, Logging | They apply system-wide and are managed by the operator. You can set them yourself on a dedicated server. |
| HTTP Services and Interfaces | System-wide, so it's up to the operator. At IDES24, the technical team will set it up for you. |
The key point is this: The operator backs up the system, not your work within it. A database backup helps if the hard drive fails. It doesn't help if you overwrite a class on Friday afternoon, because that would require rolling back the entire system to an earlier state.
For a leased system
If your system is hosted by a provider, that provider handles all system-level management. At IDES24, this means: daily backups, 14 days of retention, and free restoration following an outage on our end. Our technical team configures system-wide settings, but you can also set them yourself on a dedicated server.
There is one important difference to note: On a dedicated server, you can restore a previous state at your request—though it does involve some effort. On a shared system, this isn’t possible on demand, because the entire database is always reset—never a single tenant. The only alternative would be to use a fallback system and a copy of the tenant, which takes time and costs money. That’s why having your own backup isn’t just a convenience—it’s the safeguard you can rely on.
The Tools
The Four Ways Out of the System
abapGit: Your code in a Git repository
abapGit is an open-source tool that runs within the SAP system and saves your development objects as files in a Git repository. This gives you a version history outside the system that no one but you can delete.
Check three things beforehand. You need at least SAP_BASIS 7.02; it will not run on an ECC 6.0 system without an enhancement package. For a repository on the Internet, the application server requires an outbound HTTPS connection and the appropriate certificates in STRUST. If the connection is missing, use an offline repository and export the current state as a ZIP file; this is sufficient for backup purposes. And abapGit covers development objects—no Customizing, no table contents, and no role assignments.
Let’s clear up a common misunderstanding right away: Eclipse with the ABAP Development Tools is not a backup solution. While it does create a temporary cache in the workspace, and the Local History records the most recent versions on your computer—limited by number and age and without the object context—it’s useful as a way to recover from a mistake, but not as a backup. When it comes to CDS views, there’s no getting around Eclipse; when it comes to backups, there’s no getting around abapGit.
Transport Order: Development and Customizing Together
Der Transportauftrag ist das einzige Format, das Entwicklungsobjekte und Customizing gemeinsam mitnimmt. Sie legen Ihre Objekte in einen Auftrag, geben ihn frei und sichern die entstehenden Dateien. Ein Transport besteht dabei aus zwei Dateien: dem Cofile K<Nummer>.<SID> im Unterverzeichnis cofiles und dem Datafile R<Nummer>.<SID> im Unterverzeichnis data, beide unterhalb des Transportverzeichnisses, meist /usr/sap/trans. Die Objekte selbst stecken im Datafile, das Cofile enthält Ablaufschritte und Status. Sichern Sie immer beide, denn nur dann lässt sich der Auftrag später über die normale Transportverwaltung importieren.
There are two types of requests, and the distinction is not between development and Customizing, but between client-specific and cross-client. A Customizing request includes client-specific settings—that is, everything that applies only to the client in which you configured it. A Workbench job includes development objects as well as cross-client Customizing settings, such as factory calendars or country and currency settings. The system automatically suggests the appropriate type when you save.
Source Code Download: A Quick Update
For individual programs, the editor offers a direct download as a text file. This doesn't replace any of the other options, but it's the right solution when you don't want to lose three hours of work.
SE16N: Table Contents as a File
Everything contained in tables is exported via SE16N: the contents of your Z-tables, master data, and reports. If you need this regularly, create a small report using GUI_DOWNLOAD and add it yourself to a transport request; that way, the tool will be included in the backup the next time you run it.
Who retrieves the transport files from the system depends on your permissions. In your own system landscape, the Basis department handles this; for a leased system, depending on the product, either you or the provider's team does it.
Pitfalls
Eight Things That Regularly Go Wrong
This is the part that isn't compiled anywhere else. Every single item has already cost someone a day's work.
Local objects cannot be transported
The most common reason for lost work. Anything saved as a local object when it was created is not included in any transport request. This also applies to variants of such programs. If you want to transport the object later, assign it to a transportable package first.
The structure of a Z-table moves along automatically, but the rows within it do not
This is the error that is most often noticed only after the import. There is one exception: For Customizing tables with standard logging, the system automatically logs the entries in a request when they are maintained using SM30. This does not happen with a normal Z table.
Eclipse with ADT is not a backup
It doesn’t work entirely without a local copy, though: There’s a temporary cache in the Eclipse workspace, and the Local History records your most recent save and activation states on your computer—accessible by right-clicking in the editor, selecting “Team,” then “Local History.” It’s worth checking there if you make a mistake. But you shouldn’t rely on it: These entries are limited in number and duration, contain only the source code without the object context, and disappear along with the workspace. The most reliable way to access a Git repository is through abapGit.
Cofile and Datafile go together
If the datafile is missing, the content is lost. If the cofile is missing, the content is still there, but retrieving it becomes a basic task. And both are located in the server’s file system, not in the database: They are periodically purged and disappear along with the system. They only count as a backup once you have copied them to a separate storage medium.
An export is a backup, not a restore point
Restoring data is a lot of work: importing transports, loading data via Migration Cockpit or LSMW. If you need to resume work immediately after a loss, you need a system with on-demand recovery.
Transports are tied to the release
An order from a newer system cannot be imported into an older one. So when switching versions, check beforehand where the backup should be saved.
"Client-specific" is not the same as "system-wide"
Don't assume that an incorrectly selected task will be noticed during the release process. Although a Customizing task does not contain any development objects, the reverse is true: A Workbench task may contain client-specific Customizing. During import, it will end up in the standard client of the transport route—not necessarily where you want it to be.
On a shared system, there is no "jump back" command
The entire database is always restored; never a single client. Technically, the only option is a workaround: The operator restores the backup to a secondary system and retrieves your client from there via a client copy. This requires available hardware and a target system at the same version level; it takes time and costs money. It’s never a quick process, which is why having your own backup there isn’t just a convenience—it’s the safeguard you can rely on.
In practice
A rhythm that doesn't require discipline
Backups rarely fail because of the tool; they almost always fail because they aren't performed. For a team that works in the system every day, this process has proven effective:
- Daily: Commit via abapGit, or download the source code for whatever you're currently working on.
- Once a week: Approve pending transport orders, back up files, and note the storage location.
- Monthly: Export data from your own tables, retrieve role assignments from SUIM, and record meter readings for the number ranges.
- Before any major renovation: Complete all three steps once before making the first change.
Ten minutes a week is all it takes. That's less than it costs to reconstruct a single lost report.
Frequently Asked Questions
Questions About Backups in the SAP System
Who backs up the SAP system—the operator or me?
Both, but in different ways. The system administrator backs up the system as a whole—that is, the database, clients, and system settings. You back up your own objects—that is, code, Customizing settings, roles, and table contents—yourself using transport requests, abapGit, and exports.
Does a transport request include the contents of my tables?
Not on its own. The request transfers the table definition, not the rows within it. There are two exceptions: For Customizing tables with standard logging, the entries are automatically logged when maintained via SM30, and an R3TR TABU entry can be added manually to any request. For master data and transaction data, as well as for larger volumes, the SE16N export or a custom download report remains the method of choice.
How do I back up ABAP code outside the SAP system?
Use abapGit to commit changes to your own Git repository. Eclipse with the ABAP Development Tools is no substitute for this: The workspace only provides limited temporary storage and a local history, both of which are deleted when the workspace is closed.
What happens if I accidentally overwrite a program?
Do not save anything else, and do not activate it. If you have only saved it, you can still view the most recent active version in the editor. Next, check version control: Versions are created when a transport request is released, not when it is activated. If the object was never part of a released transport request, there will be nothing there. What remains are released transport requests and, if applicable, a Git repository.
Can I restore a system state from yesterday on a rented SAP system?
On a dedicated server, yes—but it requires some effort. On a shared system, it’s not something that can be done on demand: The entire database is always restored; never a single client. That would leave the workaround of using a fallback system and a client copy, which requires spare hardware, takes time, and costs money.
Do users and their role assignments migrate with a transport?
The role, along with its authorization data, yes. The user assignment is included only if you explicitly check the box for it during transport from PFCG, and even then, it may be blocked in the target system via the USER_REL_IMPORT switch in the PRGN_CUST table. To back up this data, the most reliable method is to run a report in SUIM or export the AGR_USERS table.
Why are my progress records gone after a system change?
Most of the time, this is because they were saved as local objects. Local objects are not included in any transport request and cannot leave the system. In SE16N, the TADIR table—with the DEVCLASS filter set to $*—shows which objects are affected, since every package that begins with a $ is local.
How do I transfer an SAP Query?
That depends on the scope. In the global scope, query objects are cross-client and are included in a normal Workbench job. In the standard scope (the default setting), this is done using report RSAQR3TR, and the order is important: first the user group, then the InfoSet, then the query.
How often should I back up my data?
Code daily if you develop daily. Customizing and transports once a week. Table contents monthly and always before a major redesign.
If your test system is leased
This page was written by someone who rents out SAP systems. That's why the line between operator and user is drawn so clearly here: We get asked this question regularly, and the honest answer sometimes leads to the sale of the smaller product.
The Sandbox Finder will help you determine which system is right for your project by asking just a few questions—no registration required.
Find the Right SystemSources and Tools
The transactions and reports listed are part of SAP Standard and are available in every ERP or S/4HANA system: SE09 and SE10 for transport requests, SE38 and SE80 for source code, SE16N for table contents, SNRO for number ranges, SUIM for user and role reports, RSAQR3TR for queries, and RSTRANSP for variants. abapGit is an open-source tool and is not part of the SAP standard; it is installed in the system. SAP provides the ABAP Development Tools for Eclipse.