Halfway through a long command it can turn out you need to check something first. Deleting the line loses the work, and Ctrl-c does too. Alt-# keeps it, which I find the neatest way out.
Press Alt-# (or Esc then #) anywhere on the line. Bash puts a # in front and accepts the line as if you pressed Enter:
$ #rsync -av --delete /srv/media/ /mnt/backup/media/
Since it starts with #, the shell treats it as a comment and runs nothing. But it is now in your history. Check what you needed, press Up to get the line back, remove the # with Ctrl-a and Delete, and run it.
There is a nice extra: with a numeric argument, like Alt-1 and then Alt-#, it works as a toggle, so on a line that already starts with # bash removes the comment and runs the line.
In a script history is not involved, so this is for the interactive prompt only. Watch out with commands that hold a password, because the commented line lands in your history file just like any other. On a Mac, the Option key has to act as Meta in your terminal settings for Alt-#; the Esc then # version always works.
Further reading: Bash manual: Miscellaneous Commands (insert-comment)