back and forth
Backwards and forwards; in a backward and forward motion.
The chair is rocking back and forth.
The tiger is pacing back and forth in his cage.
The restless lion kept pacing back and forth along the front of its cage.
Grandmother finds it relaxing to sit in her rocking chair and move back and forth.