formatting v2

main
Mel 3 years ago
parent 8a9b9c3407
commit 7fbc07353e

@ -1,8 +1,39 @@
{ {
"userAdmonitions": {}, "userAdmonitions": {
"command": {
"type": "command",
"color": "0, 66, 169",
"icon": {
"name": "terminal",
"type": "font-awesome"
},
"command": false,
"title": "command"
},
"path": {
"type": "path",
"color": "120, 88, 0",
"icon": {
"name": "folder-open",
"type": "font-awesome"
},
"command": false,
"title": "path"
},
"code": {
"type": "code",
"color": "56, 87, 26",
"icon": {
"name": "code",
"type": "font-awesome"
},
"command": false,
"title": "Code"
}
},
"syntaxHighlight": false, "syntaxHighlight": false,
"copyButton": false, "copyButton": false,
"version": "6.3.2", "version": "6.3.3",
"autoCollapse": false, "autoCollapse": false,
"defaultCollapseType": "open", "defaultCollapseType": "open",
"syncLinks": true, "syncLinks": true,

File diff suppressed because one or more lines are too long

@ -1,7 +1,7 @@
{ {
"id": "obsidian-admonition", "id": "obsidian-admonition",
"name": "Admonition", "name": "Admonition",
"version": "6.3.2", "version": "6.3.3",
"minAppVersion": "0.11.0", "minAppVersion": "0.11.0",
"description": "Admonition block-styled content for Obsidian.md", "description": "Admonition block-styled content for Obsidian.md",
"author": "Jeremy Valentine", "author": "Jeremy Valentine",

@ -200,6 +200,33 @@ input.is-invalid {
color: #dc3545; color: #dc3545;
} }
.suggestion-content.admonition-icon {
display: flex;
align-items: center;
justify-content: space-between;
flex-flow: row wrap;
}
.suggestion-content.admonition-icon > .suggestion-text.admonition-text {
width: fit-content;
}
.suggestion-content.admonition-icon
> .suggestion-flair.admonition-suggester-icon {
width: min-content;
position: relative;
top: unset;
left: unset;
right: unset;
bottom: unset;
display: flex;
align-items: center;
}
.suggestion-content.admonition-icon > .suggestion-note {
width: 100%;
}
.admonition-suggester-icon svg { .admonition-suggester-icon svg {
width: 1em; width: 1em;
} }

File diff suppressed because one or more lines are too long

@ -1,8 +1,8 @@
{ {
"id": "obsidian-dice-roller", "id": "obsidian-dice-roller",
"name": "Dice Roller", "name": "Dice Roller",
"version": "7.0.1", "version": "7.1.2",
"minAppVersion": "0.12.0", "minAppVersion": "0.12.15",
"description": "Inline dice rolling for Obsidian.md", "description": "Inline dice rolling for Obsidian.md",
"author": "Jeremy Valentine", "author": "Jeremy Valentine",
"authorUrl": "", "authorUrl": "",

@ -148,7 +148,7 @@
left: 0; left: 0;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
pointer-events: none; pointer-events: none;
z-index: 9999999; z-index: 9999999;
transition: opacity 1s ease-out; transition: opacity 1s ease-out;
@ -231,11 +231,20 @@
margin-bottom: 0; margin-bottom: 0;
} }
.dice-roller-view .dice-roller-results-container h4 { .dice-roller-view .dice-roller-results-container .dice-roller-results-header {
margin-top: 6px; display: flex;
justify-content: space-between;
align-items: center;
margin: 6px 0px;
width: 100%; width: 100%;
border-bottom: 1px solid var(--background-modifier-border); border-bottom: 1px solid var(--background-modifier-border);
} }
.dice-roller-view
.dice-roller-results-container
.dice-roller-results-header
h4 {
margin: 0px;
}
.dice-roller-view .dice-roller-results { .dice-roller-view .dice-roller-results {
display: flex; display: flex;

@ -9,7 +9,7 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "Admin/Templates/Template Travel.md", "file": "Reading list/@Reading master.md",
"mode": "preview" "mode": "preview"
} }
} }
@ -68,7 +68,7 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "Admin/Templates/Template Travel.md", "file": "Reading list/@Reading master.md",
"collapseAll": false, "collapseAll": false,
"extraContext": false, "extraContext": false,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
@ -96,26 +96,27 @@
} }
}, },
{ {
"id": "f60d9c317853dd8a", "id": "745da70f72b221b1",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "DICE_ROLLER_VIEW", "type": "DICE_ROLLER_VIEW",
"state": {} "state": {}
} }
} }
] ],
"currentTab": 3
}, },
"active": "c1cbd199334b4022", "active": "c1cbd199334b4022",
"lastOpenFiles": [ "lastOpenFiles": [
"Admin/Templates/Template Travel.md", "Reading list/@Reading master.md",
"Admin/Templates/Template Task.md", "Reading list/Comprendre l'islam.md",
"Admin/Templates/Template Source.md", "Travels/Ethiopia.md",
"Admin/Templates/Template Server.md", "Networks/Configuring UFW.md",
"Admin/Templates/Template Product.md", "Networks/Selfhosting.md",
"Admin/Templates/Template Pocket Source.md", "Networks/Server Alias.md",
"Admin/Templates/Template Place.md", "Networks/Server Cloud.md",
"Admin/Templates/Template Note.md", "Networks/Server Tools.md",
"Admin/Templates/Template Investment.md", "Networks/VPS Console Dialogue.md",
"Admin/Templates/@Task Master.md" "Admin/Templates/Template Travel.md"
] ]
} }

@ -230,13 +230,21 @@ Running and troubleshooting for CertBot can be found [here](https://certbot.eff.
The service itself does not require particular management as all features are embedded in the client interface running from the docker container 'sl-app', including user management. The service itself does not require particular management as all features are embedded in the client interface running from the docker container 'sl-app', including user management.
Parameters can only be amended through the config file under the root user: Parameters can only be amended through the config file under the root user:
`sudo vim ~/simplelogin.env` ```ad-path
~~~
sudo vim ~/simplelogin.env
~~~
```
Sample configs can be found [here](https://github.com/simple-login/app/blob/master/example.env) Sample configs can be found [here](https://github.com/simple-login/app/blob/master/example.env)
Once the change is made, restart the app container: Once the change is made, restart the app container:
`docker restart sl-app` ```ad-command
~~~
docker restart sl-app
~~~
```
   
@ -244,11 +252,19 @@ Once the change is made, restart the app container:
Users will be defaulted to the 'Free' plan and asked to subscribe to the premium plan. In order to force users onto the Premium plan, please update the database: Users will be defaulted to the 'Free' plan and asked to subscribe to the premium plan. In order to force users onto the Premium plan, please update the database:
`docker exec -it sl-db psql -U (dbusername) simplelogin` ```ad-command
~~~
docker exec -it sl-db psql -U (dbusername) simplelogin
~~~
```
And then run: And then run:
`UPDATE users SET lifetime = 'TRUE' WHERE EMAIL = '(emailaddress)';` ```ad-command
~~~
UPDATE users SET lifetime = 'TRUE' WHERE EMAIL = '(emailaddress)';
~~~
```
And `\q` to exit the db. And `\q` to exit the db.

@ -132,10 +132,12 @@ A comprehensive tutorial on the MPM switch can be found [here](https://www.digit
**php.ini** files can be found at: **php.ini** files can be found at:
``` ```ad-path
~~~
/etc/php/7.4/fpm/php.ini /etc/php/7.4/fpm/php.ini
/etc/php/7.4/apache2/php.ini /etc/php/7.4/apache2/php.ini
/etc/php/7.4/cli/php.ini /etc/php/7.4/cli/php.ini
~~~
``` ```
   
@ -152,19 +154,28 @@ Nothing particular to note on MySQL apart from initial set-up and user managemen
Configuration file is under: Configuration file is under:
`/etc/mysql/mysql.conf.d/mysqld.cnf` ```ad-path
~~~
/etc/mysql/mysql.conf.d/mysqld.cnf
~~~
```
```ad-tip ```ad-code
title: Optimise memory usage of mysql title: Optimise memory usage of mysql
In the conf file under the **_[mysqld]_** tag, add: ~~~
  [mysqld]
% Disable performance schema to hugely reduce RAM usage % Disable performance schema to hugely reduce RAM usage
performance_schema = OFF performance_schema = OFF
~~~
``` ```
In order to restart mysql, the command is: In order to restart mysql, the command is:
`sudo service mysql restart` ```ad-command
~~~
sudo service mysql restart
~~~
```
   
@ -190,15 +201,27 @@ Memory caching addon for Nextcloud. Memory caching management is provided by Nex
1. **Define the cronjob** 1. **Define the cronjob**
`sudo crontab -u www-data -e` ```ad-command
~~~
sudo crontab -u www-data -e
~~~
```
2. **Add cronjob** 2. **Add cronjob**
> \*/5 * * * * php -f /var/www/html/nextcloud/cron.php --define apc.enable_cli=1 ```ad-code
~~~
\*/5 * * * * php -f /var/www/html/nextcloud/cron.php --define apc.enable_cli=1
~~~
```
3. **Verify that the cron job is added** 3. **Verify that the cron job is added**
`sudo crontab -u www-data -l` ```ad-command
~~~
sudo crontab -u www-data -l
~~~
```
   
@ -206,9 +229,11 @@ Memory caching addon for Nextcloud. Memory caching management is provided by Nex
SVG support is installed in the form of a package. SVG support is installed in the form of a package.
``` ```ad-command
~~~
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y libmagickcore-6.q16-6-extra sudo apt-get install -y libmagickcore-6.q16-6-extra
~~~
``` ```
##### UFW ##### UFW
@ -264,11 +289,19 @@ From the server's command line, Nextcloud offers the ability to perform some tas
[[Nextcloud]] offers a command-line tool which permission needs to be set to "executable". It is located here: [[Nextcloud]] offers a command-line tool which permission needs to be set to "executable". It is located here:
`/var/www/html/nextcloud/occ` ```ad-path
~~~
/var/www/html/nextcloud/occ
~~~
```
The tool needs to be invoked by the "www-data" user and compiled with PHP: The tool needs to be invoked by the "www-data" user and compiled with PHP:
`sudo -u www-data php /var/www/html/nextcloud/occ` ```ad-command
~~~
sudo -u www-data php /var/www/html/nextcloud/occ
~~~
```
   
@ -286,7 +319,11 @@ The tool needs to be invoked by the "www-data" user and compiled with PHP:
After each data transfer, run the following command to refresh [[Nextcloud]]'s webapp: After each data transfer, run the following command to refresh [[Nextcloud]]'s webapp:
`sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all` ```ad-command
~~~
sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all
~~~
```
More info can be found [here](https://docs.nextcloud.com/server/22/admin_manual/configuration_server/occ_command.html) More info can be found [here](https://docs.nextcloud.com/server/22/admin_manual/configuration_server/occ_command.html)
@ -301,20 +338,28 @@ title: Data transfer tool
rClone uses a simple config interface to configure remote hosts (including [[Nextcloud]]): rClone uses a simple config interface to configure remote hosts (including [[Nextcloud]]):
`rclone config` ```ad-command
~~~
rclone config
~~~
```
The config data can be password-protected for security. The config data can be password-protected for security.
1. **Copy data** 1. **Copy data**
``` ```ad-command
~~~
rclone copy source:'datapath' dest:'datapath' rclone copy source:'datapath' dest:'datapath'
~~~
``` ```
2. **Sync data** 2. **Sync data**
``` ```ad-command
~~~
rclone sync source:'datapath' dest:'datapath' rclone sync source:'datapath' dest:'datapath'
~~~
``` ```
   
@ -332,11 +377,19 @@ rclone sync source:'datapath' dest:'datapath'
1. **Local file structure** 1. **Local file structure**
`/var/www/html/nextcloud/data/USERNAME/files` ```ad-path
~~~
/var/www/html/nextcloud/data/USERNAME/files
~~~
```
2. **Webdav file structure** 2. **Webdav file structure**
`/remote.php/dav/files/USERNAME` ```ad-path
~~~
/remote.php/dav/files/USERNAME
~~~
```
   

@ -153,15 +153,23 @@ LWERS4M7njDLiAJe5A6gkv9jRDabvnzBGyYk9vPr1F5dY0LMu47FSjB0v21BAE83rYTOksElzcYmioWA
Classic installation with a dedicated configuration: Classic installation with a dedicated configuration:
`sudo nano /etc/fail2ban/jail.d/sshd.local` ```ad-command
~~~
sudo nano /etc/fail2ban/jail.d/sshd.local
~~~
```
With the following parameters: With the following parameters:
>\[sshd\] ```ad-code
>enabled = true ~~~
>port=2227 [sshd]
>maxretry = 10 enabled = true
>bantime = 1m port=2227
maxretry = 10
bantime = 1m
~~~
```
   
@ -273,9 +281,17 @@ title: service parameters
2 files are used to configure the service: 2 files are used to configure the service:
`~/standalone/.env` ```ad-path
~~~
~/standalone/.env
~~~
```
`~/standalone/docker/auth/.env` ```ad-path
~~~
~/standalone/docker/auth/.env
~~~
```
Docs can be found [here](https://docs.standardnotes.com/self-hosting/docker). Docs can be found [here](https://docs.standardnotes.com/self-hosting/docker).
@ -317,11 +333,21 @@ One GitHub user is offering a [repo](https://github.com/iganeshk/standardnotes-e
* **Configuration file** * **Configuration file**
`~/standardnotes-extensions/.env` ```ad-command
~~~
~/standardnotes-extensions/.env
~~~
```
* **Repository update** * **Repository update**
`sudo python3 build_repo.py` In the main folder. ```ad-command
~~~
sudo python3 build_repo.py
~~~
```
In the main folder.
   
@ -374,20 +400,24 @@ User management has not been parametered to exclude new users but an admin panel
##### Utilities ##### Utilities
```ad-bug ```ad-path
title: Config file title: Config file
~~~
~/gitea/gitea/gitea/conf/app.ini ~/gitea/gitea/gitea/conf/app.ini
~~~
``` ```
   
```ad-bug ```ad-code
title: email setup title: email setup
Gitea can work on internal mail points through: Gitea can work on internal mail points through:
>ENABLED = true ~~~
>FROM = (user addresss) ENABLED = true
>USE_SENDMAIL = false FROM = (user addresss)
>HOST = (hostname):25 USE_SENDMAIL = false
HOST = (hostname):25
~~~
``` ```
   
@ -424,7 +454,11 @@ List of monitored services:
#### Cert storage #### Cert storage
`/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/` ```ad-path
~~~
/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/
~~~
```
   

@ -77,21 +77,21 @@ It is usual to change password:
#### User accounts #### User accounts
```ad-info ```ad-command
title: Add user title: Add user
~~~ ~~~
sudo adduser 'username' sudo adduser 'username'
~~~ ~~~
``` ```
```ad-info ```ad-command
title: Delete user title: Delete user
~~~ ~~~
sudo userdel -r 'username' sudo userdel -r 'username'
~~~ ~~~
``` ```
```ad-info ```ad-command
title: Grant admin privileges title: Grant admin privileges
~~~ ~~~
usermod -aG sudo 'username' usermod -aG sudo 'username'
@ -102,17 +102,29 @@ usermod -aG sudo 'username'
#### Switch between user accounts #### Switch between user accounts
`su - (username)` ```ad-command
~~~
su - (username)
~~~
```
   
#### Reboot #### Reboot
`Sudo reboot now` ```ad-command
~~~
sudo reboot now
~~~
```
Or Or
`sudo systemctl reboot` ```ad-command
~~~
sudo systemctl reboot
~~~
```
   
@ -120,11 +132,19 @@ Or
1. **Check the static hostname** 1. **Check the static hostname**
`sudo hostnamectl` ```ad-command
~~~
sudo hostnamectl
~~~
```
2. **Change the hostname** 2. **Change the hostname**
`sudo hostnamectl set-hostname (hostname)` ```ad-command
~~~
sudo hostnamectl set-hostname (hostname)
~~~
```
   
@ -148,9 +168,17 @@ This section gives an overview of how to switch signing-in to a machine without
2 simple commands to prepare the server: 2 simple commands to prepare the server:
`mkdir -p ~/.ssh` ```ad-command
~~~
mkdir -p ~/.ssh
~~~
```
`chmod 700 ~/.ssh` ```ad-command
~~~
chmod 700 ~/.ssh
~~~
```
   
@ -158,13 +186,21 @@ This section gives an overview of how to switch signing-in to a machine without
On Linux & MacOS clients, the process is simple: On Linux & MacOS clients, the process is simple:
`ssh-keygen -t rsa` ```ad-command
~~~
ssh-keygen -t rsa
~~~
```
And follow the prompts. And follow the prompts.
You can then send the public key to the server: You can then send the public key to the server:
`ssh-copy-id -i ~/.ssh/(key name).pub (user)@(server)` ```ad-command
~~~
ssh-copy-id -i ~/.ssh/(key name).pub (user)@(server)
~~~
```
   
@ -174,11 +210,19 @@ You can then send the public key to the server:
In order to active SSH Agent, run: In order to active SSH Agent, run:
`ssh-agent $BASH` ```ad-command
~~~
ssh-agent $BASH
~~~
```
To add any key to the agent: To add any key to the agent:
`ssh-add ~/.ssh/(key name)` ```ad-command
~~~
ssh-add ~/.ssh/(key name)
~~~
```
   
@ -186,20 +230,31 @@ To add any key to the agent:
SSH can understand scripting for ease of use. To create and edit a config file on the local machine: SSH can understand scripting for ease of use. To create and edit a config file on the local machine:
`touch/vim ~/.ssh/config` ```ad-command
~~~
touch/vim ~/.ssh/config
~~~
```
The declaration of a connection follows this nomenclature: The declaration of a connection follows this nomenclature:
```ad-code
>Host (scriptname) (serverIP) ~~~
> HostName (serverIP) Host (scriptname) (serverIP)
> IdentityFile ~/.ssh/(private key path) HostName (serverIP)
> User (remoteusername) IdentityFile ~/.ssh/(private key path)
User (remoteusername)
~~~
```
Once set up, a connection can be called from Terminal with the following command: Once set up, a connection can be called from Terminal with the following command:
`ssh (scriptname)` ```ad-command
~~~
ssh (scriptname)
~~~
```
   
@ -207,67 +262,91 @@ Once set up, a connection can be called from Terminal with the following command
To open the config file: To open the config file:
`sudo (nano/vim) /etc/ssh/sshd_config` ```ad-command
~~~
sudo (nano/vim) /etc/ssh/sshd_config
~~~
```
The following parameters enable to restrict access to the server: The following parameters enable to restrict access to the server:
```ad-code
> // **Enables SSH Key authentication** ~~~
// Enables SSH Key authentication
PubkeyAuthentication yes PubkeyAuthentication yes
>
> // **Disables password authentication (not recommended)** // Disables password authentication (not recommended)
PasswordAuthentication no PasswordAuthentication no
>
> // **Disable root access (to diminish a known attack surface)** // Disable root access (to diminish a known attack surface)
PermitRootLogin no PermitRootLogin no
>
> // **Disables empty passwords** // Disables empty passwords
PermitEmptyPasswords no PermitEmptyPasswords no
>
> // **Set a Banner** // Set a Banner
Banner /etc/issue.net Banner /etc/issue.net
>
> // **Manage White/Blacklists** // Manage White/Blacklists
AllowUsers (username) AllowUsers (username)
AllowGroups (groupname) AllowGroups (groupname)
DenyUsers (username) DenyUsers (username)
DenyGroups (groupname) DenyGroups (groupname)
>
> // **Change connection Port** // Change connection Port
Port xxxxx Port xxxxx
~~~
```
After any change of the config file, restart the SSH service: After any change of the config file, restart the SSH service:
`sudo systemctl restart sshd` ```ad-command
~~~
sudo systemctl restart sshd
~~~
```
**Note**: **Note**:
issue.net needs to be set: issue.net needs to be set:
`sudo nano/vim /etc/issue.net` ```ad-command
~~~
sudo nano/vim /etc/issue.net
~~~
```
With a text as set out below: With a text as set out below:
> Warning! Authorised use only. ```ad-code
> This server is the property of mydomain.example ~~~
Warning! Authorised use only.
This server is the property of mydomain.example
~~~
```
   
#### Network monitoring #### Network monitoring
```ad-info ```ad-command
title: simple port monitoring title: simple port monitoring
`sudo netstat -an` ~~~
sudo netstat -an
~~~
``` ```
```ad-info ```ad-command
title: acti r port monitoring title: acti r port monitoring
`sudo netstat -anp (IP/TCP/UDP)` ~~~
sudo netstat -anp (IP/TCP/UDP)
~~~
``` ```
```ad-info ```ad-info
title: simple port stats title: simple port stats
`sudo netstat -sp (IP/TCP/UDP)` ~~~
sudo netstat -sp (IP/TCP/UDP)
~~~
``` ```
   
@ -290,32 +369,46 @@ Simple commands to access files on the server.
#### File navigation #### File navigation
```ad-note ```ad-command
title: Explore current directory title: Explore current directory
`ls -alh` ~~~
ls -alh
~~~
``` ```
```ad-note ```ad-command
title: Change directory title: Change directory
`cd (folder path)` ~~~
cd (folder path)
~~~
``` ```
```ad-note ```ad-command
title: Find a file title: Find a file
`sudo find / -iname (filename)` ~~~
sudo find / -iname (filename)
~~~
``` ```
   
#### Create file #### Create file
`touch (filepath/name)` ```ad-command
~~~
touch (filepath/name)
~~~
```
   
#### Edit file #### Edit file
`vi (filepath/name)` ```ad-command
~~~
vi (filepath/name)
~~~
```
1. Press 'i' for the edit mode 1. Press 'i' for the edit mode
2. 'Esc' key to exit edit mode 2. 'Esc' key to exit edit mode
@ -325,14 +418,18 @@ title: Find a file
#### Delete files & folders #### Delete files & folders
```ad-note ```ad-command
title: Delete file title: Delete file
`rm (file path & name)` ~~~
rm (file path & name)
~~~
``` ```
```ad-note ```ad-command
title: Delete folder and contents title: Delete folder and contents
`rm -r (folder path)` ~~~
rm -r (folder path)
~~~
``` ```
   
@ -341,19 +438,21 @@ title: Delete folder and contents
##### Checking file permissions ##### Checking file permissions
```ad-note ```ad-command
title: Permissions title: Permissions
For a file: `ls -l (file path & name)` **For a file**: ls -l (file path & name)
For a folder: `ls -ld (folder path)` **For a folder**: ls -ld (folder path)
``` ```
   
##### Changing file permissions ##### Changing file permissions
```ad-note ```ad-command
title: Change permissions title: Change permissions
`chmod xxx (folder/file path)` ~~~
chmod xxx (folder/file path)
~~~
``` ```
For x: For x:
@ -361,28 +460,36 @@ For x:
2. write: 2 2. write: 2
3. execute: 1 3. execute: 1
```ad-note ```ad-command
title: Change owner title: Change owner
`chown (owner):(group) (folder/file path)` ~~~
chown (owner):(group) (folder/file path)
~~~
``` ```
```ad-note ```ad-command
title: Change group title: Change group
`chgrp -R (new group) (folder/file path)` ~~~
chgrp -R (new group) (folder/file path)
~~~
``` ```
   
##### Bulk changes ##### Bulk changes
```ad-note ```ad-command
title: Change file permission in a folder title: Change file permission in a folder
`find (folder path) -type f -exec chmod xxx {} \;` ~~~
find (folder path) -type f -exec chmod xxx {} \;
~~~
``` ```
```ad-note ```ad-command
title: Change sub-folder permission in a folder title: Change sub-folder permission in a folder
`find (folder path) -type d -exec chmod xxx {} \;` ~~~
find (folder path) -type d -exec chmod xxx {} \;
~~~
``` ```
   
@ -405,7 +512,11 @@ Instructions to use rclone for file transfers can be found [[Server Cloud#Cloud2
Create a directory for backup: Create a directory for backup:
`sudo mkdir /Backup` ```ad-command
~~~
sudo mkdir /Backup
~~~
```
   
@ -413,11 +524,19 @@ Create a directory for backup:
Best is to launch the command from the Backup folder: Best is to launch the command from the Backup folder:
`cd /Backup` ```ad-command
~~~
cd /Backup
~~~
```
Command: Command:
`sudo tar -cvpfz /Backup/backup.tar.gz --exlude=/Backup/backup.tar.gz --exlude=/proc --exlude=/tmp --exlude=/mnt --exlude=/dev --exlude=/sys --exlude=/run --exlude=/var/cache/apt/archives --exlude=/usr/src/linux-headers* --exlude=/home/*/.gvfs --exlude=/home/*/.local/share/Trash /` ```ad-command
~~~
sudo tar -cvpfz /Backup/backup.tar.gz --exlude=/Backup/backup.tar.gz --exlude=/proc --exlude=/tmp --exlude=/mnt --exlude=/dev --exlude=/sys --exlude=/run --exlude=/var/cache/apt/archives --exlude=/usr/src/linux-headers* --exlude=/home/*/.gvfs --exlude=/home/*/.local/share/Trash /
~~~
```
Once created, the backup can be transferred using the [[#File transfer]] script. Once created, the backup can be transferred using the [[#File transfer]] script.
@ -433,11 +552,19 @@ After transfer, [[#Delete files folders|delete]] the .tar.gz file from its folde
1. From the server: 1. From the server:
`sudo nc -l 1024 | sudo tar -xvpzf - -C /media/backup` ```ad-command
~~~
sudo nc -l 1024 | sudo tar -xvpzf - -C /media/backup
~~~
```
2. From the Client's machine, instruct: 2. From the Client's machine, instruct:
`cat (backup path & name.tar.gz) | nc -q 0 (hostname) 1024` ```ad-command
~~~
cat (backup path & name.tar.gz) | nc -q 0 (hostname) 1024
~~~
```
   
@ -446,18 +573,30 @@ Or through **FTP**:
1. Send backup to the root folder over FTP 1. Send backup to the root folder over FTP
2. Copy /boot/grub/menu.lst to menu.lst.bak 2. Copy /boot/grub/menu.lst to menu.lst.bak
3. Restore 3. Restore
`sudo tar xvpfz backup.tar.gz -C /` ```ad-command
4. Recreate excluded directories ~~~
sudo tar xvpfz backup.tar.gz -C /
~~~
``` ```
4. Recreate excluded directories
```ad-command
~~~
mkdir proc mkdir proc
Mkdir lost+found Mkdir lost+found
mkdir mnt mkdir mnt
mkdir sys mkdir sys
... ...
~~~
``` ```
5. Replace the restored *menu.lst* file with the *.bak* created in Step 2 (dropping bak) 5. Replace the restored *menu.lst* file with the *.bak* created in Step 2 (dropping bak)
6. MAC address may need to be change 6. MAC address may need to be change
Check `/etc/udev/rules.d/70-persistent-net.rules` Check:
```ad-path
~~~
/etc/udev/rules.d/70-persistent-net.rules
~~~
```
@ -475,29 +614,49 @@ Check `/etc/udev/rules.d/70-persistent-net.rules`
And how many instances: And how many instances:
`sudo ps ax | grep (program)` ```ad-command
~~~
sudo ps ax | grep (program)
~~~
```
   
#### Check what program uses a port #### Check what program uses a port
`sudo netstar -lntup | grep (port#)` ```ad-command
~~~
sudo netstar -lntup | grep (port#)
~~~
```
   
#### List all programs #### List all programs
`sudo apt list --installed` ```ad-command
~~~
sudo apt list --installed
~~~
```
   
#### Remove a package #### Remove a package
`sudo apt remove (package name)` ```ad-command
~~~
sudo apt remove (package name)
~~~
```
For cleaner removal: For cleaner removal:
`sudo apt purge (package name)` ```ad-command
~~~
sudo apt purge (package name)
~~~
```
   

Loading…
Cancel
Save