Business CircleBusiness Circle
  • Home
  • AI News
  • Startups
  • Markets
  • Finances
  • Technology
  • More
    • Human Resource
    • Marketing & Sales
    • SMEs
    • Lifestyle
    • Trading & Stock Market
What's Hot

The Bafta games awards showed me again that honouring art over commerce is a win for all | Games

April 23, 2026

What You 100% Absolutely Need to Know Before Even Thinking About Investing in the SpaceX IPO

April 23, 2026

How Small Businesses Can Build a Reliable Team Without Increasing Headcount?

April 23, 2026
Facebook Twitter Instagram
Thursday, April 23
  • Advertise with us
  • Submit Articles
  • About us
  • Contact us
Business CircleBusiness Circle
  • Home
  • AI News
  • Startups
  • Markets
  • Finances
  • Technology
  • More
    • Human Resource
    • Marketing & Sales
    • SMEs
    • Lifestyle
    • Trading & Stock Market
Subscribe
Business CircleBusiness Circle
Home » How to back up a Linux directory to a remote machine with rsync
Technology

How to back up a Linux directory to a remote machine with rsync

Business Circle TeamBy Business Circle TeamJanuary 29, 2024Updated:August 21, 2025No Comments4 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
How to back up a Linux directory to a remote machine with rsync
Share
Facebook Twitter LinkedIn Pinterest Email


keyboard-fingers2gettyimages-1010651100

gorodenkoff/Getty Pictures

Linux is probably the most versatile working system in the marketplace. With this open-source platform, you are able to do excess of you’ll be able to along with your proprietary OS, with out spending a dime on software program.

When taking your first steps with Linux, you may most likely wish to keep away from the command line as a result of it may be a bit daunting. Finally, nonetheless, you would possibly discover you are able to see simply how way more energy and adaptability you’ll be able to eke out of your distribution of alternative. One very useful (and helpful) factor you are able to do is discover ways to again up an area listing to a distant one with the assistance of the rsync command. And that is precisely what I will present you.

Prepared? Let’s do it.

Additionally: Here is one more reason why Linux is approach cooler than your working system

Tips on how to again up a Linux listing with rsync 

What you may want: To make this work, you may want two cases of Linux, one for the native (that homes the listing you wish to again up) and one for the distant (that you’re going to again the listing as much as). You will additionally want a consumer with sudo privileges on each machines. Lastly, you may have to know the IP addresses of each machines (which will be discovered with the ip a command). I will display this on two Ubuntu-based machines. If you happen to’re utilizing a Fedora or Arch-based distribution, the one factor you may want to change is the set up command.

The very first thing to do is set up rsync, which will be achieved with the next command:

sudo apt-get set up rsync -y

Subsequent, we have to configure rsync on the distant machine. Create a brand new configuration file with the command:

sudo nano /and so on/rsyncd.conf

In that file, paste the next content material:

[backup]
path=REMOTE_DIRECTORY
hosts permit = LOCAL_IP
hosts deny = *
record = true
uid = root
gid = root
learn solely = false

The place REMOTE_DIRECTORY is the listing on the distant machine that may home the backed-up information and LOCAL_IP is the IP handle for the native machine.

Additionally: The very best Linux distributions for learners: Skilled examined and reviewed

Save and shut the file with the Ctrl+X keyboard shortcut.

Begin and allow rsync with the command:

sudo systemctl allow --now rsync

We’ll now take a look at the backup course of. In your native machine, you may run the rsync command like this:

rsync -avz LOCAL_DIRECTORY REMOTE_IP::backup

The place LOCAL_DIRECTORY is the listing you wish to again up and REMOTE_IP is the IP handle of the distant machine. Discover the ::backup. That’s the title of the backup we used within the configuration file on the distant machine (the road [backup]). The backup ought to run and full pretty rapidly (except you have got a considerable amount of information within the listing).

Additionally: Why I take advantage of a number of working techniques to get my work achieved 

Automate the backup

As I mentioned, Linux may be very versatile. We will automate this course of with the assistance of the built-in cron software. What we’ll do is create a bash script for the backup with the command:

In that file, kind the identical command you used earlier to run the backup, solely we’ll add the q choice to suppress output, so it seems like this:

rsync -avzq LOCAL_DIRECTORY REMOTE_IP::backup

Save and shut the file. Give the file executable permissions with the command:

Now, we’ll create a cron job with the command:

In that file, paste the next:

00 01 * * * /residence/USER/rsync.sh

The place USER is your username. Save and shut the file.

Your new cron job will run the rsync backup day by day at 1 a.m., so that you at all times have a contemporary backup of that listing.

Additionally: This might be the perfect Linux distro of the 12 months (and it isn’t even shut)

And that, my associates, is all there may be to making a primary distant backup job on Linux.





Source link

Directory Linux Machine Remote rsync
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Business Circle Team
Business Circle Team
  • Website

Related Posts

The Bafta games awards showed me again that honouring art over commerce is a win for all | Games

April 23, 2026

The shadowy SIM farms behind those incessant scam texts – and how to stay safe

April 23, 2026

Microsoft's full-screen Xbox experience is now available to Windows 11 Insiders

April 22, 2026

Invincible season 4 episode 8 ending explained: does Eve [spoiler], will there be a season 5, and more on the Prime Video show’s latest finale

April 22, 2026
LATEST UPDATES

The Bafta games awards showed me again that honouring art over commerce is a win for all | Games

April 23, 2026

What You 100% Absolutely Need to Know Before Even Thinking About Investing in the SpaceX IPO

April 23, 2026

How Small Businesses Can Build a Reliable Team Without Increasing Headcount?

April 23, 2026

How Figma Scaled PLG to Enterprise Sales

April 23, 2026

What Is Reward Card Software and How Does It Work?

April 23, 2026

Jio Financial Services, Allianz Group ink 50:50 general, health insurance JV

April 23, 2026

Subscribe to Updates

Get the latest sports news from SportsSite about soccer, football and tennis.

Business, Finance and Market Growth News Site

Important Pages
  • Advertise with us
  • Submit Articles
  • About us
  • Contact us
Recent Posts
  • The Bafta games awards showed me again that honouring art over commerce is a win for all | Games
  • What You 100% Absolutely Need to Know Before Even Thinking About Investing in the SpaceX IPO
  • How Small Businesses Can Build a Reliable Team Without Increasing Headcount?
© 2026 BusinessCircle.co
  • Privacy Policy
  • Terms and Conditions
  • Cookie Privacy Policy
  • Disclaimer
  • DMCA

Type above and press Enter to search. Press Esc to cancel.