If I understand well, this code will do the job simply and quickly by using the partitionBy option :
df = spark.read.format('avro').load("/user/test/data/data_backlog")
df.write.partitionBy("dt").format('avro').save("/user/test/data/data_backlog_backup")