Backup your folders from one location to another with ease.
Project description
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, including any errors encountered.
Getting Started
Prerequisites
- Python 3.x
os
andshutil
libraries (usually included in Python standard library)
Installation
- Clone this repository to your local machine.
- Ensure you have Python installed.
- Navigate to the directory where the script is located.
Usage
- Open the
backup.py
script. - Modify the
main_path
,backup_folder_path
, andexclude_dirs
variables to suit your needs. - Run the script using Python:
python backup.py
.
Example
from backupfolders import Backup
# Define main path and backup folder path
main_path = "/path/to/source/directory"
backup_folder_path = "/path/to/backup/directory"
# Create an instance of the Backup class
backup_instance = Backup(main_path, backup_folder_path)
# Perform the backup
backup_instance.backup()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
backupfolders-0.2.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for backupfolders-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5123baf66ff2c01a0cc68b1ad9c20750b81114bfb05ea0c2b201f82bb57d94c |
|
MD5 | 874285271c3ef7c2aa43c8b73b92fc8e |
|
BLAKE2b-256 | 4f072ba5ba5c01c085d1c5767b572af62bee894f5de774b9ec684f6a3fef15e2 |