# \[Solved\] Backup in another pc in the same network

**URL:** https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189
**Category:** General Discussion
**Created:** [15 January 2022 16:29 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189 "2022-01-15T16:29:22Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [15 January 2022 16:29 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/1 "2022-01-15T16:29:22Z")

</div>

Hi everybody again,  
I know this could be a very strange question:  
Do you think it’s possible to schedule a diet-pi’s daily backup on a drive installed in another PC in the same network?  
I’m using a diet-pi as a personal cloud and I noticed it’s possible to schedule a periodical backup of the system but I saw it can be done only on a drive mounted on the board. Is this correct?  
Any suggestion is much appreciated 😉

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [15 January 2022 17:08 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/2 "2022-01-15T17:08:27Z")

</div>

this could be done if the 2nd system is running a NFS server. Just mount the NFS share on DietPi and should be able to backup on another system.

---

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [16 January 2022 09:48 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/3 "2022-01-16T09:48:43Z")

</div>

My 2nd system runs a ubuntu desktop. Can it be compatible with NFS server?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [16 January 2022 10:36 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/4 "2022-01-16T10:36:48Z")

</div>

Usually it should be possible to run NFS server on Ubuntu

---

<div class="post-metadata">

### Author: ![WarHawk](https://dietpi.com/forum/user_avatar/dietpi.com/warhawk/32/21_2.png) [@WarHawk](https://dietpi.com/forum/u/WarHawk)
#### Post date: [18 January 2022 00:29 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/5 "2022-01-18T00:29:56Z")

</div>

hopefully this might help  
[https://phoenixnap.com/kb/ubuntu-nfs-server](https://phoenixnap.com/kb/ubuntu-nfs-server)

---

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [18 January 2022 14:53 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/6 "2022-01-18T14:53:13Z")

</div>

thanks WarHawk for the suggestions.  
I fallow the instructions until the tutorial says: “Edit NFS Export File to Grant Server Access to Clients”

At this point, giving in the terminal the command

```nohighlight
sudo vi /etc/exports

```

, it opened the file but I wasn’t able to modify it and wasn’t able to close it without closing the terminal.

When I try to open that file in another terminal window it shows me this warning:

```nohighlight
E325: ATTENTION
Found a swap file by the name "/etc/.exports.swp"
          owned by: root dated: mar gen 18 15:28:38 2022
         file name: /etc/exports
          modified: YES
         user name: root host name: NASCasaGhezzi
        process ID: 16408
While opening file "/etc/exports"
             dated: mer mag 12 21:30:06 2021

(1) Another program may be editing the same file. If this is the case,
    be careful not to end up with two different instances of the same
    file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /etc/exports"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/etc/.exports.swp"
    to avoid this message.
"/etc/exports" 10 lines, 389 characters
Press ENTER or type command to continue

```

How can I fix it?

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [18 January 2022 15:54 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/7 "2022-01-18T15:54:47Z")

</div>

Try:

```nohighlight
rm /etc/.exports.swp

```

Probably Vim is still opened as dead process, check htop and in case kill it.

Generally /etc/exports should be editable. Not sure whether it’s an issue with filesystem access or Vim. Try:

```nohighlight
sudo nano /etc/exports

```

---

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [18 January 2022 16:42 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/8 "2022-01-18T16:42:19Z")

</div>

Looks like is not possible to delete it.  
It says I’m not allowed 🤔

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [18 January 2022 17:00 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/9 "2022-01-18T17:00:16Z")

</div>

are you root user or using sudo?

---

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [18 January 2022 18:56 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/10 "2022-01-18T18:56:02Z")

</div>

mmm Not sure. I think sudo.  
this is the Output:

```nohighlight
ghezzia@NASCasaGhezzi:~$ rm /etc/.exports.swp
rm: rimuovere il file regolare protetto dalla scrittura '/etc/.exports.swp'? Y
rm: impossibile rimuovere '/etc/.exports.swp': Permesso negato

```

How can I run as root?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [18 January 2022 19:04 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/11 "2022-01-18T19:04:24Z")

</div>

Try following

```nohighlight
sudo rm /etc/.exports.swp

```

---

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [18 January 2022 19:13 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/12 "2022-01-18T19:13:29Z")

</div>

It worked. I delated the swp file but still when I try to run

```nohighlight
sudo vi /etc/exports

```

It opens the file but it doesn’t let me modify it.  
Also, I can’t find any command to exit the file and go back. I should exit the terminal leaving the file pending…

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [18 January 2022 19:16 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/13 "2022-01-18T19:16:38Z")

</div>

I guess you need to pess i to enter the Insert mode. Now you can type in your text.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [18 January 2022 19:23 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/14 "2022-01-18T19:23:08Z")

</div>

You you know how to use vi/Vim, right? Hitting exit, then typing :q and hitting return should do it. If you are not comfortable with Vim (which indeed requires some learning), I recommend to use nano:  
sudo nano /etc/exports  
It is a bit simpler to manage, navigate and edit via arrow buttons etc, exit via CTRL+X, where you are asked whether to save changes.

If that does not work, what are the modes of the file?

```nohighlight
ls -l /etc/exports

```

EDIT: Here is a nice beginners guide for Vim. When learning it, it indeed speeds up console text editing 😃: [https://thevaluable.dev/vim-commands-beginner/](https://thevaluable.dev/vim-commands-beginner/)

---

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [18 January 2022 21:30 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/15 "2022-01-18T21:30:42Z")

</div>

OK, using nano, it worked perfectly.  
I follow all the steps suggested till the end, but the last command sudo ufw status gives me this output:

```nohighlight
$ sudo ufw status
Stato: inattivo

```

That means inactive.  
but I’m not sure I need to use the ufw…  
Assuming everything is correct and I don’t need ufw, should I continue with the following steps described, to set up the client in the dietpi?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [18 January 2022 21:37 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/16 "2022-01-18T21:37:15Z")

</div>

Usually ufw is not needed if the system is not internet facing. On DietPi you could use dietpi-drive\_manager to connect to NFS network drive

---

<div class="post-metadata">

### Author: ![WarHawk](https://dietpi.com/forum/user_avatar/dietpi.com/warhawk/32/21_2.png) [@WarHawk](https://dietpi.com/forum/u/WarHawk)
#### Post date: [19 January 2022 03:55 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/17 "2022-01-19T03:55:51Z")

</div>

$ is user, # on command prompt is root

Either type sudo su, then user password (careful with this because you can REALLY screw up a system if you aren’t careful)

Or type

```nohighlight
sudo command

```

and it will run it

As long as your dietpi machine is behind your firewall/router and you haven’t opened WAN facing ports to that particular machine/IP, you don’t need to activate UFW or any firewall for that device (unless you are really paranoid about someone hacking into your network)

Good call ghezzia and Joulinar

---

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [19 January 2022 10:55 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/18 "2022-01-19T10:55:40Z")

</div>

Let me try to explain what I’ve done:  
On dietpi (installed on a pi zero) I installed ownclud in order to create my owncloud.  
Since I activate also a DDNS to reach the cloud also outside my network, we installed also pi-hole to manage and try to bypass my router (vodafone) which is not able to recognize my DDNS inside my network.  
Does it mean the dietpi is opened WAN facing ports to that particular machine/IP?  
What you mean with

> $ is user, # on command prompt is root
> 
> Either type sudo su, then user password (careful with this because you can REALLY screw up a system if you aren’t careful)
> 
> Or type  
> CODE: SELECT ALL
> 
> sudo command  
> and it will run it

?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [19 January 2022 14:11 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/19 "2022-01-19T14:11:48Z")

</div>

yes in your case DietPi is reachable on port 80/443. This is the port forwarding you activated on your router.

---

<div class="post-metadata">

### Author: ![ghezzia](https://dietpi.com/forum/user_avatar/dietpi.com/ghezzia/32/1932_2.png) [@ghezzia](https://dietpi.com/forum/u/ghezzia)
#### Post date: [19 January 2022 15:53 UTC](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189/20 "2022-01-19T15:53:50Z")

</div>

> [@](#):
>
> yes in your case DietPi is reachable on port 80/443. This is the port forwarding you activated on your router.

this means that activating UFW is recommended for me, isn’t it?

[Next page](https://dietpi.com/forum/t/solved-backup-in-another-pc-in-the-same-network/6189.md?page=2)
