diff --git a/QuantumNexusProtocol/backup_data.py b/QuantumNexusProtocol/backup_data.py new file mode 100644 index 000000000..48c4e25ad --- /dev/null +++ b/QuantumNexusProtocol/backup_data.py @@ -0,0 +1,16 @@ +import shutil +import os +from datetime import datetime + +def backup_data(): + source_dir = "/path/to/blockchain/data" + backup_dir = f"/path/to/backup/{datetime.now().strftime('%Y%m%d_%H%M%S')}" + + try: + shutil.copytree(source_dir, backup_dir) + print(f"Backup completed successfully to {backup_dir}.") + except Exception as e: + print("Error during backup:", e) + +if __name__ == "__main__": + backup_data()