back up the entire home-directory of a notebook: one-liner that runs on command line


Recommended Posts

good day dear friends, hello to everyone, 🙂

today i want to work on the backup of a notebook:  what is wanted: hmmm - well all i want to achive is to copy just everything from my home directory to an external drive

Including the following data: 

 

  • hidden files 
  • documents 
  • browser bookmarks and profiles 
  • application settings 


to say what is needed:  important first thoughts: i do not want to copy the entire filesystem (/) no not: — that said i think that this will cause severe and serious permissions problems, So to spell it out clearly: system files are not needed, and it risks copying mounted system paths.

What i need is the entire user’s home directory, because all personal data that i am interested are inside /home/<username>

that said: all hidden files ( guess that all that stuff is quite starting with the following "sign" .) are probably included there ( as i think herein are the following datasets: browser profiles, app configs, SSH keys, etc.)

hmm  do i really need system-level settings, well i can back up only specific directories.

the main goal i want to achieve is just to copy  all stuff and everything from my home directory to an external drive

hmm - i guess that this can be done safely and fully with one command in terminal. 
that said: i think that this can be done safely and fully with one so calles "onliner command".

the question is:  hmm what is the cleanest possible  method to back up everything in my home directory (including all hidden files) before reinstalling.

assumptions on the process - ideas how to start this: 

to backup the Entire Home Directory (where everything i need is included) - i think i have to make sure my external drive is mounted

Usually it appears somewhere like:

/media/<myusername>/<drive-label>/


i think that we can verify with:

 

bash ls /media ls /media/<myusername>

 

well can i do this so: 

any ideas!?

have a great day - greetings🙂   

update  after doing some research i found out. - there are some command that support me here - and that help out..

 well regarding tar: 

tar packs all the files into a one tiny single file "archive, " which can then be compressed to save space - ant a tar file that can be very handy and easy to port over.

regarding the rsync: 

afaik the rsync will copy exact files, and besides that it can speed up by only copying what has changed - thats pretty very smart and clever. 

so i thnk that the concrete commands then would look like so: 
 

tar -cJpf /media/<the concrete username>/bkup.tar.xz /home/<username>

rsync -aHAX --progress /home/<the concrete username>/ /media/<username>/

 

.....Well that sain - i guess that i am in a very convinient and good situation-  i have now very handy commands that support the process

 

have a great day greetings

 

Edited by thedhubs

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • draw.io Desktop 30.2.6 by Razvan Serea draw.io desktop is a downloadable security-first diagramming application that runs on Windows, MacOS and Linux. Creating diagrams in the desktop app doesn’t need an internet connection. This is useful when you are disconnected or when you must create diagrams in a highly secure environment, where data protection is of the utmost importance. When you use the draw.io desktop app, your diagrams will be stored on your local device. Because this is a stand-alone application, also designed to run offline, there are no interfaces to cloud storage platforms available. Of course, you can still store your diagrams in folders that are synchronised to your cloud storage if you wish. Easy-to-use diagram editor The draw.io apps work just like the office and drawing tools you are used to using. Drag and drop shapes from the shape libraries and drag to draw connectors between them. Drag connectors to add waypoints and set a precise shape and position, or let them reroute automatically. Double click and start typing to add a label to anything. Create tables and swimlane flows with a familiar tool. Style shapes and connectors with customisable palettes, sketch options, fonts and text formatting tools. Search for shapes, including in open-source icon libraries. Use our vast libraries of shapes and templates, organised into logical categories, to create a range of diagrams and infographics. Generate diagrams from text descriptions using our smart templates. Diagram faster with keyboard shortcuts. draw.io Desktop 30.2.6 changelog: Uses electron 42.5.0 #2452 Updates to draw.io core 30.2.6. Download: draw.io 64-bit | Standalone (Open Source) Download: draw.io 32-bit | ARM64 | ARM64 Standalone Links: draw.io Home Page | Project page @GitHub | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • One Month Later
      Excellence2025 earned a badge
      One Month Later
    • Week One Done
      Excellence2025 earned a badge
      Week One Done
    • Week One Done
      flexorcist earned a badge
      Week One Done
    • One Month Later
      Woland13 earned a badge
      One Month Later
    • Week One Done
      Woland13 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      500
    2. 2
      +Edouard
      209
    3. 3
      PsYcHoKiLLa
      146
    4. 4
      Steven P.
      74
    5. 5
      FloatingFatMan
      70
  • Tell a friend

    Love Neowin? Tell a friend!