wiki:linux:logiciels:sauvegarde
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| wiki:linux:logiciels:sauvegarde [2025/11/13 16:15] – [En interface] mael | wiki:linux:logiciels:sauvegarde [2025/11/14 10:52] (Version actuelle) – [En interface] mael | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| ===== En bash ===== | ===== En bash ===== | ||
| - | |||
| * Borg Backup | * Borg Backup | ||
| Ligne 8: | Ligne 7: | ||
| ===== En interface ===== | ===== En interface ===== | ||
| - | |||
| * TimeShift (instantanés système) | * TimeShift (instantanés système) | ||
| * Pika Backup (instantanés fichiers) | * Pika Backup (instantanés fichiers) | ||
| + | * FreeFileSync | ||
| ===== Pour la synchronisation : ===== | ===== Pour la synchronisation : ===== | ||
| - | |||
| * [[syncthing|Syncthing]] | * [[syncthing|Syncthing]] | ||
| + | |||
| + | |||
| + | ===== Pour démarrer un programme au branchement d'un support USB ===== | ||
| + | |||
| + | | ||
| + | |||
| + | Post by goebbe » Tue Oct 08, 2024 3:17 am | ||
| + | |||
| + | The following describes how to run commands automatically when a specific USB-device is plugged in. | ||
| + | |||
| + | This howto has been tested on Linux Mint 22 (based on Ubuntu 24.04). The howto uses systemd. No special privileges are required. | ||
| + | |||
| + | Possible use case: Run a backup script automatically, | ||
| + | |||
| + | Howto run a script or a command automatically when a specific .mount unit becomes available: | ||
| + | |||
| + | - Plugin the USB device - by default the device is mounted. | ||
| + | - In the terminal: List all .mount units of the current user to identify the .mount-unit of the USB-device: | ||
| + | |||
| + | systemctl --user list-units -t mount | ||
| + | |||
| + | - Identify the .mount unit for your USB-device. For example, for a USB-device with label " | ||
| + | |||
| + | - In your text editor: Create/ Place the following Systemd .service-file in ~/ | ||
| + | Adapt/ edit the .service file: yourusername, | ||
| + | |||
| + | [Unit] | ||
| + | description=Runs command automatically when the specified usb .mount-unit becomes available | ||
| + | | ||
| + | [Service] | ||
| + | Type=oneshot | ||
| + | ExecStart=/ | ||
| + | | ||
| + | [Install] | ||
| + | WantedBy=media-yourusername-yourUSBlabel.mount | ||
| + | |||
| + | Important: The user has to be able to run / | ||
| + | |||
| + | - In the terminal: Start the new service: | ||
| + | |||
| + | systemctl start --user auto-usb-command.service | ||
| + | |||
| + | - Enable the service: | ||
| + | |||
| + | systemctl enable --user auto-usb-command.service | ||
| + | |||
| + | Now, whenever you plugin/ mount your USB-device, the specified command will run. | ||
| + | |||
| + | - Finally, after the command has finished, unmount/ safely remove your USB-device. | ||
| + | |||
| + | |||
| + | Maintenance: | ||
| + | |||
| + | Check the status of the new service: | ||
| + | |||
| + | systemctl status --user auto-usb-command.service | ||
| + | |||
| + | After changing the .service file, one has to reload: | ||
| + | |||
| + | systemctl --user daemon-reload | ||
| + | |||
| + | Detailed Systemd logs: | ||
| + | |||
| + | | ||
| + | |||
| + | |||
wiki/linux/logiciels/sauvegarde.1763046932.txt.gz · Dernière modification : de mael
