Skip to content
Snippets Groups Projects
Select Git revision
  • 22c8856aea5f07b5fea9877762ad6a8722c511bb
  • mui5-annotation-on-video-stable default
  • get_setter_canvasSizeInformations
  • fix-error-div-into-p
  • annotation-on-video-v2
  • detached
  • annotation-on-video-r17
  • mui5
  • mui5-react-18
  • jacob-test
  • annotation-on-video protected
  • master
  • test-antoinev1
  • 20-fetch-thumbnail-on-annotation
  • add-research-field
  • Save
  • add-plugin
  • 14-wip-no-seek-to
  • 14-bug-on-video-time-control
  • 9_wip_videotests
  • _upgrade_material_ui
  • latest-tetras-16
  • v3.3.0
  • v3.2.0
  • v3.1.1
  • v3.1.0
  • v3.0.0
  • v3.0.0-rc.7
  • v3.0.0-rc.6
  • v3.0.0-rc.5
  • v3.0.0-rc.4
  • v3.0.0-rc.3
  • v3.0.0-rc.2
  • v3.0.0-rc.1
  • v3.0.0-beta.10
  • v3.0.0-beta.9
  • v3.0.0-beta.8
  • v3.0.0-beta.7
  • v3.0.0-beta.6
  • v3.0.0-beta.5
  • v3.0.0-beta.3
41 results

workspace.js

Blame
  • backup_demo-tibox.sh 1.88 KiB
    #!/bin/bash
    #
    #-----------------------------------------------------------------------
    #
    # Script to backup all needed data upon USB hard disk insertion
    # It is called thru UDEV with :
    #  - the device name (sda1, ...) given as the first parameter
    #
    #-----------------------------------------------------------------------
    # Voir sur http://bernaerts.dyndns.org/linux/75-debian/54-debian-udev-backup
    
    # Log beggining of backup
    echo "Sauvegarde - démarrage le `date`"
    # if needed, create the mount directory
    if [ ! -d /mnt/backup ] ; then mkdir /mnt/backup ; fi
    
    # On rend la partition du disque USB visible
    /bin/mount -t auto $1 /mnt/backup
    
    # Sauvegarde du serveur lui-même
    echo "Sauvegarde - Configuration /etc/"
    /usr/bin/rsync -rtv --modify-window=2 /etc/ /mnt/backup/etc
    
    # On exclue le contenu des bibliothèques
    echo "Sauvegarde - Configuration Seafile"
    /usr/bin/rsync -rtv --exclude 'seafile-data/storage' --modify-window=2 /srv/seafile.lesfeesrosses.org/ /mnt/backup/srv_seafile.lesfeesrosses.org/
    
    # On sauvegarde le contenu des bibliothèques
    echo "Sauvegarde - Contenu Seafile"
    if [ ! -d /mnt/seafile-fuse ] ; then mkdir /mnt/seafile-fuse ; fi
    # Demonte le dossier si file au cas ou le dernier backup l'ait laisse dans un drole d'etat
    fusermount -zu /mnt/seafile-fuse
    /srv/seafile.lesfeesrosses.org/seafile-server-latest/seaf-fuse.sh start /mnt/seafile-fuse
    /usr/bin/rsync -rtv --exclude 'seafile-data/storage' --modify-window=2 /mnt/seafile-fuse/ /mnt/backup/contenus_seafile/
    
    # You can add here some other backups ...
    #echo "Backup - other files"
    #/usr/bin/rsync -rtv --del --modify-window=2 /path/to/your/files/other /mnt/backup
    
    # force sync of files to disk before unmounting
    /bin/sync
    
    # unmount the backup disk
    /srv/seafile.lesfeesrosses.org/seafile-server-latest/seaf-fuse.sh stop
    /bin/umount /mnt/backup
    
    # TODO: remove me for test only
    sleep 10
    
    # Log end of backup
    echo "Sauvegarde - terminée le `date`"