How to backup your data: Synching, rsync & backup hardware.
A backup is a duplicate or a copy on a different storage medium. File synchronization is the process of ensuring that two or more locations contain the same, up to date, files, i.e., the same data is updated across multiple locations and platforms.
A backup strategy is a plan made to ensure that essential data is backed up and ready to restore if there is any kind of disaster and data loss. It is highly necessary but it is often neglected.
File-sharing services are the easiest ways to back up and sync files and directories among computers. They usually include file sharing, synchronization across multiple devices, and collaboration features.
Dropbox “is a free service that lets you bring all your photos, docs, and videos anywhere. After you install Dropbox on your computer, any file you save to your Dropbox will automatically save to all your computers, your Android device, and even the Dropbox website! With the Dropbox app, you can take everything that matters to you on the go.” Other alternatives are Google Drive, pCloud, and OneDrive.
Let’s install Dropbox in Arch. Firstly, we clone its repository: git clone https://aur.archlinux.org/dropbox.git, cd dropbox. Secondly, we create a package, install the package and missing dependencies after a successful build: makepkg -si. Finally, we want the service to autostart on boot with systemd: sudo systemctl edit dropbox@user (e.g., dropbox@nmaximo7):
Some backup solutions you may consider are:
Clonezilla is a partition and disk imaging/cloning program. It is a free alternative to Norton Ghost.
Timeshift is an open-source backup and restore application for Linux similar to the Time Machine tool in Mac OS. It protects your system by taking incremental snapshots of the file system at regular intervals.
rsync is a free, fast, and extraordinary versatile utility for transferring files and synchronizing local and remote directories.
AOEMI Backupper is a free and easy data backup, disk clone and file sync software for personal PCs and iOS devices.
Syncthing is a continuous file synchronization program. It is a really good free alternative to Dropbox and Google Drive. It synchronizes files between two or more computers.
Let’s install it on Ubuntu: sudo apt install syncthing-gtk (the GTK3-based GUI for syncthing, it will also install the package syncthing). Arch: sudo pacman -S syncthing.
Next let’s edit its config file (vi /home/user/.config/syncthing/config.xml) and change 127.0.0.1:8384 (only listening to localhost) to 0.0.0.0:8384.
If you are in Ubuntu, the installation is made so that the service is run as root. You may want to check its status: sudo systemctl status firstname.lastname@example.org However, you need to enable and start the system service (syncthing@yourUser.service) in Arch:
Install Mac (client). We should be able to access it: IP’s address:8384.
For security purposes you may want to change your password: Actions, Settings, GUI Authentication User, GUI Autentication Password.
Syncthing uses port 22000. If your computer has enabled the UFW firewall, then you need to allow traffic on port 22000: sudo ufw allow 22000/tcp
You need to ensure Synching has been installed and configured on all systems. After that, _each device must be told about the other devices by exchanging device IDs. Obtain your Device ID (Server Ubuntu): Actions, Show ID (Copy). Client Mac: Add Remote Device, Device ID (Paste), Device Name (LinuxServer).
Refresh the Web interface on the first device, the Ubuntu server. You will see the following message: Device…. wants to connect. Add new device? Click on Add Device (Device Name: MacClient) and wait patiently till Remote Devices, MacClient (Up to Date).
We can synchronize two folders now. Click the Add Folder to add a new folder and give it a descriptive label and set the folder path (/mnt/discoExterno/documentos). On the Sharing tab, select MacClient.
You need to wait till you see a message in your MacClient: LinuxServer wants to share folder “documentos”. Add new folder? Select Add, and define Folder Path.
rsync lets you transfer and synchronize data between different machines and directories. A good example is rsync -av ‐‐delete /home/myUser/Dropbox/ /mnt/discoExterno/.
These options are: -av, v = increase verbosity, a = recursion and preserve almost everything; ‐‐delete, it synchronizes the local and remote directory. It will delete files in the destination directory if they don’t exist in the source directory.
rsync can transfer and synchronize files and directories from and to remote servers: rsync -aAXv ‐‐delete $HOME/Dropbox/ pi@dirIP:/media/pi/BackupPi.
Dual bay hdd docking stations like Tacens Portum Duo II allow you to access and transfer data simultaneously between your computer and two SATA hard drives as if they were installed inside the computer or clone drives offline at faster transfer speeds.The OTB function, i.e., One Touch Backup lets you backup your data by just pressing one button. It is as easy as it gets, just follow the next steps:
Put the source and the destination disks into the A and B bays respectively. Make sure that the power adapter is connected and powered on.
Press the CLONE button, and keep on pressing it for three seconds to begin duplication.
When the green, red, yellow, and orange LEDs all stay solid, the clonation process is done. Next, you may want to press the power button to turn off the docking station and remove your drives from the dock.
Be careful, your drives may be very hot after the cloning process.