Backup and restoring files in linux in hindi

Linux mein files aur directories ka backup banana aur unhe restore karna mahatvapurna hai taki data loss ki sthiti mein aap apne mahatvapurna data ko punarsthapit kar saken.

Backup and restoring files in linux in hindi

Linux mein is kaam ke liye tarah-tarah ke tools aur methods available hain. Niche main aapko ek sadsya tarike se samjhata hoon:

Backup Banane (Creating a Backup):

  1. Tar Command (Tar Command):
  • tar ek command line tool hai jo files aur directories ko ek tarball file mein compress karke rakhne mein madadgar hota hai. Tarball ek file hai jisme aapke backup ki gayi files aur directories hoti hain.
  • Backup create karne ke liye, aap yeh command istemal kar sakte hain: tar -cvzf backup.tar.gz /path/to/source
    • -c: Create a new tarball.
    • -v: Verbose mode, shows the progress.
    • -z: Compress the tarball.
    • -f: Specify the file name.
  • /path/to/source ko aap un files aur directories ki location ke saath replace karen jise aap backup karna chahte hain.
  1. rsync Command (rsync Command):
  • rsync ek powerful tool hai jo files aur directories ko remote aur local systems ke beech mein sync (synchronize) karne mein madad karta hai.
  • Local backup create karne ke liye, aap yeh command istemal kar sakte hain: rsync -av /path/to/source /path/to/backup
    • -a: Archive mode, maintains file permissions and other attributes.
    • -v: Verbose mode, shows the progress.

Backup Ko Restore Karna (Restoring a Backup):

  1. Tar Command (Tar Command):
  • Tarball ko restore karne ke liye, aap yeh command istemal kar sakte hain: tar -xvzf backup.tar.gz -C /path/to/destination
    • -x: Extract the tarball.
    • -v: Verbose mode, shows the progress.
    • -z: Decompress the tarball.
    • -f: Specify the tarball file.
  • /path/to/destination ko aap jahan par files aur directories ko restore karna chahte hain, us location ke saath replace karen.
  1. rsync Command (rsync Command):
  • Backup ko restore karne ke liye, aap rsync command ka istemal kar sakte hain reverse mode mein: rsync -av /path/to/backup /path/to/destination
    • -a: Archive mode, maintains file permissions and other attributes.
    • -v: Verbose mode, shows the progress.

Backup aur restore karne se pehle dhyan de ki aapka backup location aur destination location sahi ho taki aap apne data ko surakshit tarike se punarsthapit kar saken.

Leave a Comment