Skip to content

Automatically backup files on an external hard drive on insertion.

License

Notifications You must be signed in to change notification settings

ItaiShek/AutoBackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

General Info

Automatically backup files on an external hard drive on insertion.

How to use

  1. Installation.

    1. Download the compressed file.
    2. Extract it to the desired directory.
  2. Creating a backup list.

    1. Open BackupList.txt.
    2. Enter each file/directory you want to back up in a new line.
      For example:
    C:\Users\MyUser\Documents\Passwords.kdbx
    C:\Users\MyUser\Documents\Recipes\Krabby Patty.doc
    C:\Cat Photos\
    
  3. Creating a devices list.

    1. Open VolumeList.txt.
    2. Connect your external devices.
    3. Open the terminal and run the command vol X: where X is your external device.
      For example:
    C:\>vol E:
     Volume in drive E is SSD ExternalHD
     Volume Serial Number is 201A-5BA1
    
    1. Copy each serial number in a new line. Make sure you remove the hyphen and add a "0x" prefix.
    2. After each serial number add a semicolon and add the path to the directory on the device (SN;PATH).
      For example:
    0x404329D6;X:\Backup
    0xad12cb34;X:\Important
    1078143446;X:\Tools\KeePassXC
    
  4. Creating a scheduled task.

    1. Open the task scheduler (Click ⊞ Win+R, then type taskschd.msc and press enter).
    2. Optional: Create a new folder named My Tasks.
    3. Create a basic task by clicking right mouse key > Create Basic Task... or clicking in the menu Action > Create Basic Task...
      1. Enter a name and a description and click Next.
      2. Set the trigger to When I log on.
      3. Select Start A Program in Action and click next.
      4. In the Program/Script: field browse and choose AutoBackup.exe file.
        In the Start in field choose the directory that holds the program's files (Important).
      5. Optional: In the Add arguments field you can add the value nocopy if you don't want to create another copy (see notes).
Notes
  • The files VolumeList.txt and BackupList.txt are read once on program startup.
  • The program will start the backup process when the device is inserted.
  • If the backup directory specified doesn't exists on the external device the program will not create it, and the backup process will stop.
  • If the backup file already exists on your external device, then the program will copy it to the same directory with the prefix "original_", and overwrite the backup file with a new copy of the system's backup file.
    This is done in order to prevent overwriting the backup file with a corrupted file.
    If you don't want to create another copy (recommended for large files/directories)add the argument nocopy in the task properties (Action tag).
  • The program will overwrite the backup file only if it's older than the file on the system.
  • You can add the serial number as an integer (without 0x prefix)

About

Automatically backup files on an external hard drive on insertion.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages