low power mode

If you sleep only, data is retained. If you want to physically switch off the board, look for a flash storage library or EEPROM emulation library to save data on the flash memory (not too often!).