My journey in to the land of Linux

2»

Comments

  • drasnordrasnor Starship Operator Hawthorne, CA

    I don't know what a best way is, it depends on what you're trying to get out of your backup system. If you're like me and just want to have the same set of files on multiple machines at all times, neglecting security considerations, rsync is a good choice. If you think you have a good chance of getting hacked then you will need to do things differently.

  • BlackHawkBlackHawk Bible music connoisseur There's no place like 127.0.0.1
    edited May 2017

    Well, I don't believe I'll get hacked. Only have one service that's internet facing and it's on my Windows desktop. I'm just covering bases with hypotheticals. Push comes to shove, I don't mind losing the data. I just want a copy in case I format or something and can easily restore, since I'm bound to mess something up.

    I'd like to know about imaging and incremental backups for Linux. Preferably without using the GUI and if it happens to work with Windows as well then sweet.

    Edit:

    For now I've made a script for rsync, tested it and made a crontab entry for it.

  • drasnordrasnor Starship Operator Hawthorne, CA

    Imaging a Linux box can be done many ways.

    At the simplest, you boot up from a different hard drive and use dd to do a byte-for-byte copy of the disk to a file or another disk. dd does not know or care about things like files and can't be used for incremental. dd images are super useful for drive forensics though for the same reason (ddrescue). dd works on any file and since everything in Linux is a file that means you can use it for imaging partitions too. Restoring partitions is tricky because the partition table is not part your image so you have to recreate that separately. dd does not work well with files that change during copy which is why you don't use it on mounted drives.

    LVM allows you to create incremental snapshots of your logical volumes. These images can be created while mounted and are smaller than dd images since they cover only your actual filesystem and not the entire disk. This approach is useful if you've defined multiple logical volumes (e.g. separate /home from /) so that you can have different backup policies for each LV. Restoring the backup is similar to other partition-level backup/restore options.

    Rsync and rsnapshot allow you to make copies of files and incrementally update individual changed files. These are powerful tools which can be used at the simplest to just mirror volumes but with some clever scripting you can setup rotating incremental backups. This can be used with both Linux and Windows with some nontrivial setup: http://rsnapshot.org/faq.html

    You can also pay for software which provides offsite incremental file backup. This is what I do: http://icrontic.com/discussion/100732/cloud-storage-2017 . This utility has GUI.

    There's a kernel of truth in @Thrax's quip; nearly all system utilities are CLI only. This is because these utilities are used broadly and the vast majority of the systems they're used with don't run desktop environments. A GUI would be a distraction to development and reduce reliability (is it GNOME-native or KDE-native? which FreeDesktop version? these decisions drive heavyweight dependencies).

  • BlackHawkBlackHawk Bible music connoisseur There's no place like 127.0.0.1

    I guess I'll put the backup thing on hold for now. I don't have files not on services like Dropbox/Google Drive that must be backed up.

  • GargGarg Purveyor of Lincoln Nightmares

    "Mossad or not-Mossad" is the best.

Sign In or Register to comment.