Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How to get all file/folder data as a backup of an Ubuntu computer?

  1. #1
    Join Date
    Dec 2023
    Location
    USA
    Beans
    24
    Distro
    Ubuntu

    Lightbulb How to get all file/folder data as a backup of an Ubuntu computer?

    sudo rsync -vrlDAXpHogtU --delete --open-noatime --exclude=(copy to directory) --exclude=(USB mounted at) / (copy to directory)

    That is like best I got so far for backups. What I would prefer is a program that writes all exact to system exactness properties of an Ubuntu system and can have most of them on a USB and restore those properties to new system exactness on any Ubuntu computer. I already have like my own Ruby file properties recorder for like my home directory. If such a program or similar exists maybe tell me. For backups anything that transfers created at would be an improvement. Anyway, trying for a full backup that can be understood on a Windows computer or maybe any computer and is not a system image. Why I do not want a system image is simplicity of copy to other things, no need to install extra stuff. Is there any automated way to do this so I do not have to do one by one all files and folders? Feel free to use this idea and maybe some day a full backup like this will be possible. I heard rsync could transfer all this back to an Ubuntu computer and overwrite system files, but to be sure, can that be done? Maybe do not do that --delete on rsync back to computer first time then a second time do it. All as per one might be maybe or might not be maybe, maybe or maybe not, maybe.

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How to get all file/folder data as a backup of an Ubuntu computer?

    or...
    Code:
    sudo rsync -aAXP --one-file-system / /mnt/backups/backup
    That would copy entire file system hierarchy from logical drive to the backup point, avoids crossing a filesystem boundary when recursing, and excludes the backup point.

    You can still use excludes and other options to that... I use -P instead of -r, to see progress instead of a files list.

    That would be initial. Vary that for incrementals.

    Restore:
    Code:
    sudo rsync -aAXP –delete /mnt/backups/backup /

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #3
    Join Date
    Dec 2023
    Location
    USA
    Beans
    24
    Distro
    Ubuntu

    Post Re: How to get all file/folder data as a backup of an Ubuntu computer?

    Backup
    sudo rsync -vrlDAXpHogtUP --delete --open-noatime --one-file-system --exclude=(USB at) / (copy to directory)

    Restore:
    sudo rsync -vrlDAXpHogtUP --delete --open-noatime --one-file-system (copy from directory) /

    So that is what I should use to backup full? I notice yours lacks some options for getting some data. Still want creation times. Thanks for that. Anyway, I guess I may need to make like my own program for created at times. I already have a Ruby one. On restore, how do I make sure that USB contents are not overridden upon restore? All as per one might be maybe or might not be maybe, maybe or maybe not, maybe.
    Last edited by norvel4; December 29th, 2023 at 09:38 PM. Reason: Restore maybe

  4. #4
    Join Date
    Dec 2023
    Location
    USA
    Beans
    24
    Distro
    Ubuntu

    Re: How to get all file/folder data as a backup of an Ubuntu computer?

    I just realized I should have E directly after P on that maybe or maybe not, maybe.

  5. #5
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,790

    Re: How to get all file/folder data as a backup of an Ubuntu computer?

    Maybe look at fsarchiver.

  6. #6
    Join Date
    Feb 2019
    Location
    Virginia
    Beans
    366
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: How to get all file/folder data as a backup of an Ubuntu computer?

    -a is the same thing as -rlptgoD

    You should review the manpage for rsync. It is a great tool for keeping two directories in sync. I also use it for one way copying of files.

    I only use rsync for our household documents, pictures, videos, music, etc.

    For system files on ext4+LVM, or just ext4, I prefer rdiff-backup. This is a versioning backup tool. I run this command consistently every day to pull backups of certain root locations that I know have custom configuration files that I would want to have should I need to restore my system? My restore is always a fresh install and then go to my rdiff-backups to get the custom configs I need.

    I never attempt a system clone or replication, and ever expected that to work.
    Last edited by aljames2; January 1st, 2024 at 07:39 PM.

  7. #7
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: How to get all file/folder data as a backup of an Ubuntu computer?

    There is LuckyBackup GUI .. and GRsync GUI .. for first testing .. see "dry run" feature

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to get all file/folder data as a backup of an Ubuntu computer?

    Quote Originally Posted by aljames2 View Post
    -a is the same thing as -rlptgoD

    You should review the manpage for rsync. It is a great tool for keeping two directories in sync. I also use it for one way copying of files.

    I only use rsync for our household documents, pictures, videos, music, etc.

    For system files on ext4+LVM, or just ext4, I prefer rdiff-backup. This is a versioning backup tool. I run this command consistently every day to pull backups of certain root locations that I know have custom configuration files that I would want to have should I need to restore my system? My restore is always a fresh install and then go to my rdiff-backups to get the custom configs I need.

    I never attempt a system clone or replication, and ever expected that to work.

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
    This, 1000x this ... er ... except I use rsync only for large, static, media files. Documents and other small files are versioned using rdiff-backup. I don't have enough money to support having 180 copies of media files, but I can easily hold 180 versions of smaller files, easily, as provided by rdiff-backup.

    But the OP has something set in his brain about having 100% exact restores (including creation times) for some reason and anything less won't fit that mindset. Screw that creation time is a security consideration.

  9. #9
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How to get all file/folder data as a backup of an Ubuntu computer?

    +1 to TheFu & aljames2

    I was going to suggest searching this Forum on threads started by TheFu, on rdiff-backup... He is spot on with that.

    Him and I, having similar backgrounds coming from Unix, and our views on "Disaster Recovery" are similar: Volume managers to take snap shots and incremental backup strategies of what you need beyond the OS itself. The Basic OS can be reinstalled much faster than it can be restored. Tailoring and using the backups to restore where you need to be beyond that, for recovery or migrations. His writings on that are well thought out, easy to follow, and sound.

    I have to admit that many decades ago, the strategy was to do full disk imaging and restores from that. Usually done about once a month.

    Decades of experience has shown me that that methodology doesn't make sense anymore, when the primary goal is "uptime" and to be back up within a very short window of acceptable loss... Or how long will it take to be back up (online) with your services.

    That is a learning and perspective change from what things used to be, from maybe about 30 years ago. It can still be done, but that doesn't mean it's a good idea.

    I am still rewriting and adapting my backup strategies in my own scripts from lessons learned.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  10. #10
    Join Date
    Dec 2023
    Location
    USA
    Beans
    24
    Distro
    Ubuntu

    Re: How to get all file/folder data as a backup of an Ubuntu computer?

    I know this may not be what you want to hear but I would prefer a full backup no matter how long it takes to reinstall. If it helps I made a property recorder and restoration script set that includes all timestamps and user and group. Also, am I missing anything for a full or as full as I can get backup with rsync. rsync is a step up from system image because it is incremental and with like my Bash scripts I can get practically all. Anyway, I seem to have solved like my own problem.

    Also, I do not want a multiple "versions" of like my computer saved, one is plenty. Sure it takes about 220MB for me to have timestamps but I think it is worth it. Also, store it on ext4, it stores more of what is on Ubuntu than FAT or NTFS. For Windows compatibility use an ext4 reader and maybe open up like with nogroup and nobody your important files that should be accessible on any computer. I understand there are other tools that mostly back up but I prefer a full backup even if like once a month is more practical. Thanks for trying to help, I think I got this. All as per one might be maybe or might not be maybe, maybe or maybe not, maybe.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •