Example of a backup script under Linux (CentOS/RedHat/Oracle).
This script exports all data (exluding some specific tables) from a set of schemas, exports a few Apex applications and their workspace, makes a .tar.gz file out of all these files plus the backup script file(s), and copies the resulting .tar.gz file to a remote backup location.
The script can be run as root - user oracle is probably also possible but root is easier.
Note that this script copies the export file to OneDrive, which is what I happen to use, but of course any other (network/cloud) storage option is fine.
If you want to use OneDrive, the info at https://www.maketecheasier.com/sync-onedrive-linux/
is very helpful.
The script now uses SQLcl.
In Apex 22.1 APEXExport has been deprecated (and later it was desupported).
So while it still seems to work I have switched to SQLcl.
And once again, I spent way too much time figuring out how to do that, just because Oracle (and every other website I looked at) refuses to supply a working example...
Info on downloading and installing SQLcl: https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/download/
I chose /home/oracle as the installation directory; just update the script below if yours is different.
Create the parameter file "backup.parm" for expdp:
Create the parameter file "backup.sqlcl" for SQLcl:
Create the backup script "backup.sh" itself:
Note that (depending on the database version you use) you may have to change the values for ORACLE_HOME & APEX_HOME, and also change the CLASSPATH path to point to another version of the ojdbc jar file.
Execute as OS user root (oracle may also work, see above): ./backup.sh