# Restarting a data loading job after an error

If a bulk loading job encounters an error that causes it to shut down while in a _partially written_ [stage](https://aerospike.com/docs/graph/3.1.0/develop/data-loading/distributed#bulk-data-loading-job-stages-and-steps) of the bulk loading process, you can use the `-resume` flag to restart the job at the point at which it stopped.

Allowable flags:

-   `-resume`: Resume a bulk loading job from the point at which it failed.
-   `-resume -incremental_load`: Resume an incremental load job from the point at which it failed.

## Starting a job over from scratch

If a bulk loader job fails and you want to start over from scratch, you can use the `-clear_existing_data` flag.

::: note
The `-clear_existing_data` and `-resume` flags are mutually exclusive and may not be used together.
:::

See [Spark job flags](https://aerospike.com/docs/graph/3.1.0/develop/data-loading/distributed#spark-job-flags) for a complete list of valid flags.