backup to directory or S3