portautos.blogg.se

Automated folder backup linux
Automated folder backup linux






automated folder backup linux

The output will look similar to this: lsblk output This will list the drives attached to your computer and their partitions. Then, at the command line, type the following: lsblk Mount your external backup drive at startupĬheck that your external drive is plugged into your computer. Now change ownership of the new directory to your user with the following command: sudo chown username:username usbhddĬhange username to your username and usbhdd to the name of the folder you created. You can call this directory whatever you wish: sudo mkdir usbhddĬhange usbhdd to whatever name you prefer. Then create a mount directory for your drive.

automated folder backup linux

Replace username with your username, e.g. Go to the media directory for your user: cd /media/ username There are different conventions, I tend to put mine in the ‘media’ directory if they are removable drives. This is the directory in the file system that you can go to to see the contents of your drive. This is to ensure that any subsequent commands to access the drive will work.ĭecide where you would like to mount the drive. The first step is to ensure that each time the computer is turned on, the external drive (if it is plugged in) will be mounted in the same location in the filesystem. Create a mount directory for your external backup drive The backup uses ‘ rsync’ which is a command that compares the files between the two locations then only transfers files which have changed. The contents of your home folder can be backed up to the external drive or vice versa whenever you wish.

AUTOMATED FOLDER BACKUP LINUX PLUS

This simple arrangement gives you a backup of your home directory on an external drive plus the ability to synchronise multiple computers so that the contents of their home directories are always the same.Īlthough the processes are automated to run at start-up and shutdown, if you forget to plug the external drive in the scripts can be run manually at any other time. This therefore updates your home directory should any changes have been made to the files on the external drive whilst in use on another computer. When you turn your computer on, if the drive is plugged into your computer it will synchronize all the files on the external drive with your home directory. A backup is therefore created on the external drive. If your external drive is plugged into your computer then when you turn your computer off it will synchronise all the files in your home directory with the external drive. If you’re looking for something more robust and full-featured then see my posts on Nextcloud. This is written for the Linux Gnome desktop, but I’m sure could be adapted to other environments without a lot of trouble.

automated folder backup linux

All you have to remember is to plug an external drive into your computer – everything else is automated. It’s not fool proof, but it’s an awful lot better than nothing. No home server, no online access or accounts are required. Here is a simple file backup and synchronisation solution that only needs you to have one external drive.








Automated folder backup linux