Backup all your personnal files, easily, using TrueCrypt
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Backup all your personnal files, easily, using TrueCrypt.

This script aims to help users making simple, secure and efficient backups using TrueCrypt and rsync. Using rsync, it will synchronize a source folder to a destination folder (inside a TrueCrypt container) coping only the files that changed and delete the ones that are not present anymore on the source since the last run. That means that the first time you run the script, it will copy all the source folder to the destination folder. Depending on the amount of files, it can take time, but then, depending on the changes of the source's folder, it will only copy the files that changed.


The script aims to help people doing their backups. I'm not responsable in case of lost data, faulty backups, files corruption and so on. You are responsable of your data, this script only tries to help you doing it, but without any warranty.




Setting up


  • Install TrueCrypt
  • Move the files include_to_backup.conf and exclude_from_backup.conf to /usr/local/etc/
  • Move the file backup2tc to /usr/local/bin and make it executable: chmod +x /usr/local/bin/backup2tc


  • Install TrueCrypt
  • Install Cygwin with rsync
  • Move the files include_to_backup.conf and exclude_from_backup.conf to C:\cygwin\usr\local\etc\
  • Move the file backup2tc to C:\cygwin\usr\local\bin
  • Optional: You can put the file Backup.bat on the desktop so you do not have to go to the command line to backup your files.


The first thing to do is to edit the include_to_backup.conf, exclude_from_backup.conf and backup2tc for your need.

On Linux, the path is standard, from the root folder: /media/ludelafo/the_partition_name/one\ folder/

On Windows, using Cygwin, the path should always be like this: /cygdrive/letter_of_the_parition/one\ folder/

include_to_backup.conf and exclude_from_backup.conf

These two files are used to know which folders you would like to backup and which folders inside the folders included to the backup you want to ignore.


This file defines where is the TrueCrypt's file, where should the TrueCrypt's container should be mounted and other few parameters. Just open it and change it for your needs. The most importants lines are these:

TRUECRYPT_FILE_PATH="/cygdrive/f/" # File path to the TrueCrypt container

MOUNT_POINT="/media/TrueCrypt" # TrueCrypt container's mount destination (Unix only)
WINDOWS_MOUNT_POINT="Z:" # Windows's mount point's letter

You may also change the programs' path.


Just open a terminal, and type backup2tc or use the Backup.bat (for Windows' users only) to run the backup.

The script will ask you the password of the TrueCrypt's container and mount it. When this is done, the user have to press 'Enter' to continue. The backup begins and when it's done, the script will lock the TrueCrypt's container and notify the user of the end.