Skip to main content

Python Backup Script

This Python script performs backups of a specified directory to another location. It can be useful for creating regular backups of important data.

Features

  • Backup Functionality: Automatically copies files from a specified directory to a backup folder.
  • Exclude Directories: Allows excluding specific directories from the backup process.
  • Logging: Logs the start and completion of each backup operation.

Getting Started

Prerequisites

  • Python 3.x
  • os and shutil libraries (usually included in Python standard library)

Installation

Install the module using:

  • Windows:
    • pip install backupfolders.
  • MacOs:
    • pip3 install backupfolders.

Usage

from backupfolders import backupfolders

# source directory
mainPath = r"C:\Users\HP\Desktop\New folder (2)\flappy-bird"

# backup directory
destinationPath = r"D:\Backups"

# exclude folders not to backup
exclude_folders = [] #if any folder needs to be excluded from backup

backupdir = backupfolders.Backup()

backupdir.backup(mainPath, destinationPath, exclude_folders)

There will be a txt file created in which there will be backup log, of which folder you created backup and when it started and completed all this information

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or create a pull request

License

This project is licensed under the MIT License.

Acknowledgments

This script was inspired by the need for a simple backup solution. Special thanks to the Python community for their valuable contributions and support.

Metadata

Release files for backupfolders 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backupfolders 0.6
File Size Uploaded Provenance
backupfolders-0.6.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for backupfolders 0.6
File Interpreter ABI Platform
backupfolders-0.6-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / backupfolders-0.6.tar.gz

Download URL backupfolders-0.6.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
74deec9e7d30f6d109b348b372c08071dbba3e1a291cbbc63f73dcf30d3ee8fa
BLAKE2b-256 checksum
How to use checksums
e929c8bd007ee6d93e16cae551470f0d6acc81f5ab6bd6903cbe85efd183a7f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / backupfolders-0.6-py3-none-any.whl

Download URL backupfolders-0.6-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf6c6b13b1c5b4abd16ddad815c29c8c95dbc93f623ac6ee570018929307b404
BLAKE2b-256 checksum
How to use checksums
b54a631d738a8cdb8543f4450f15ced4494c3f98a139baba7ff199c17404ba4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Security for backupfolders 0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page