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.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for backupfolders-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3896fbc70928d51b44b15729296783bfb625ad90fd5257a65a50b9199992385 |
|
MD5 | ca710055577a5bd7edaeea097f4b5cad |
|
BLAKE2b-256 | 44ddbf7840e62e010b05829173059474261bf665ae4eef80dd5875580bc11279 |