Link to home
Start Free TrialLog in
Avatar of End N
End NFlag for France

asked on

Backup implementation - Ubuntu server ftp

Hello,
Looking for the possibly opensource backup solution of Ubuntu server, specifically the configuration of ubuntu server ftp which includes user accounts, passwords,folder permissions, groups, folders, etc

In case of server crash, simply reinstall server physically and restore the configuration so that remote users systems can access ftp as before withtout any interruption and also this avoid reconfiguring from zero which is time consuming.

Likely similar to backing up VM using VDP applicance.

Just wondering also, if this is realy possible to implement this kind of solution.

thanks !!




Avatar of noci
noci

Check out amanda which is a very good backup system.
Now ANY Backup & Restore solution will take time to make the backup depending on the size of the files stored there. and restore proababaly takes a litle more time.
If you need near instantanous recovery you need to investigate High Availability. (seconds / minutes for failover. instead of near hour ).
Build two (or more) servers, use VRRP based solotions (keepelived f.e.) to switch between nodes.

You will need some solution to sync the content of the servers or use a shared storage on the backend... (NFS, BeeGFS, GFS, ...).
It might be a lot easier to NOT use FTP (which is a security nightmare), but use a WEBDAV based solution instead. (Nextcloud, OwnCloud etc.).


Avatar of End N

ASKER

thanks
To clarify : ubuntu server is installed on barre metal, not a VM.
Still possible with an agent ? If yes What the config files need to be backup ? I dont worry about data. 


a backup is a backup.

what type of a setup do you have, flat file, /etc/ shadow/password
ldap backend for user
mysql, mariadb, postresql etc.

Cpanel?

The options are endless based on implementation of the first will dictate the ease or complexity of recovery post.


i.e. backup once at the start, or before/after every change beofre (just in case) after (to have a snapshot)
Then you backup the DB on a frequent basis
not sure why you picked FTP, but having two for redundancy.... with the data either replicated or the head units ....
Avatar of End N

ASKER

Actually this is ssh ftp. No databases, no ldap. Just used for data exchange, a standalone server. It contains only user accounts pwds folders groups.
So that no requirement to backup all the datas. Just configuration is important in case of crash and reinstall because the sftp users should be able to access folders as before without seeing the new alerts related to keys. 

SFTP != FTP    it doesn't even look like it from a systems perspective.

If you don't care about the data then go a different route....
- use LDAP for authentication
- use a bare install of say debian net-install + ansible/puppet/....
- use puppet, ansible , ... to deploy a default config (using ldap for authentication).
- for data you may take nfs to store it outside of the system or if it really is  not of value leave it local.

It might be easier if you run these things inside an LXD container... (if there are several of this small dedicated setups).

if you still want a backup /etc is sufficient in most cases. (/var/lib  might have valuable data as well).
Avatar of End N

ASKER

@noci, means backing up /etc and /var/lib contains all permissions given to groups, user accounts, folders will remain in case for restore in fresh installed server ? 
1) Never use FTP, unless you're looking to be hacked, in a very short amount of time...

Hacked, meaning, anyone can log into your FTP server + copy/modify your data.

2) Use SFTP instead.

3) Neither FTP or SFTP makes for a good backup solution, they just don't have enough intelligence to correctly pull either newly created files or transfer only the diff of changes, for changed files.

With FTP/SFTP you'll end up doing whole file transfers every time + depending on how the server is configured, you may end up pulling 100% of all files, every backup cycle.

4) For efficient backups, use rsync + ssh, which will only pull new files + diffs of changes.

5) There's no difference between machine/container/VM. What files you can backup depends on the privilege of the user logging in to run the backup.

If you login as root, you can backup everything.

Only use non-root logins to backup specific files, like a Webserver's files.

To backup privileged files (only root can access), then you'll login as root.... which includes backing up user/group files + most /var/lib/* files.
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial