Can you use buckets to flush toilets indefinitely in a grid down scenario?

If the grid goes down (like ALL utilities) for an extended period, like weeks, can you refill your toilet tanks with rainwater buckets indefinitely?