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

U.S. crude oil jumps after Iran says it attacked a tanker

March 6, 2026

The State of Social Media Engagement in 2026: 52M+ Posts Analyzed

March 6, 2026

Anthropic to challenge DOD’s supply-chain label in court

March 6, 2026
Facebook Twitter Instagram
Friday, March 6
  • 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

Anthropic to challenge DOD’s supply-chain label in court

March 6, 2026

An interview with Tim Sweeney on the Google/Epic settlement, what Play Store changes mean for developers, why Epic’s case against Apple is different, and more (Dean Takahashi/GamesBeat)

March 6, 2026

‘Our consciousness is under siege’: Michael Pollan on chatbots, social media and mental freedom | Well actually

March 6, 2026

Your next Oura Ring powered by voice or gesture? What this AI buy means for Oura Ring 5

March 6, 2026
LATEST UPDATES

U.S. crude oil jumps after Iran says it attacked a tanker

March 6, 2026

The State of Social Media Engagement in 2026: 52M+ Posts Analyzed

March 6, 2026

Anthropic to challenge DOD’s supply-chain label in court

March 6, 2026

Better’s new ChatGPT app targets lenders Rocket and UWM

March 6, 2026

Your Boss Isn’t the Problem. Your Expectations Are

March 6, 2026

US Treasury signals global tariff hike to 15% as Trump trade policy returns

March 6, 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
  • U.S. crude oil jumps after Iran says it attacked a tanker
  • The State of Social Media Engagement in 2026: 52M+ Posts Analyzed
  • Anthropic to challenge DOD’s supply-chain label in court
© 2026 BusinessCircle.co
  • Privacy Policy
  • Terms and Conditions
  • Cookie Privacy Policy
  • Disclaimer
  • DMCA

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