Skip to content

kobzcode/linux-backup-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linux Backup Automation

Script python permettant d'automatiser la sauvegarde de dossier

Pourquoi ce projet ?

Ce projet a ete realiser pour pratiquer l'automatisation sur linux et comprendre les problematiques reel de la gestion des systemes et de la sauvegarde.

Features

  • Sauvergarde automatique
  • Compression des fichiers sauvegarde en .tar.gz
  • Gestion de logs
  • Configuration via un fichier JSON
  • Automatisation avec cron

Tech Stack

  • Linux
  • Python3
  • Libraries : os, tarfile, json, datetime, logging

Installation

git clone https://github.com/kobzcode/linux-backup-automation.git

Configuration

Modifier le fichier config.json :

{
  "source": "your folder source",
  "destination": "your folder destination"
}

Usage

python3 main.py

Automatisation

crontab -e

0 2 * * * /usr/bin/python3 /pwd/main.py

Exemple Output

2026-04-04 17:45:41,937 -- INFO -- Backup started
2026-04-04 17:45:41,947 -- INFO -- Backup created : backups/backup_2026-04-04.tar.gz
2026-04-04 17:45:41,947 -- INFO -- Backup done

Structure du projet

backup_project/
├── main.py
├── config.json
├── logs/
└── backups/

Auteur

About

Automated backup script in Python for Linux with compression, logging, and cron scheduling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages